Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Report 向qweb odoo报告中添加一行_Report_Odoo_Odoo 8_Qweb - Fatal编程技术网

Report 向qweb odoo报告中添加一行

Report 向qweb odoo报告中添加一行,report,odoo,odoo-8,qweb,Report,Odoo,Odoo 8,Qweb,我有一个qweb报告,我想在其中添加一行,其中包含报告中每个COL的总数: 这是我的qweb代码;这是关于创建工资单报告的,它包含11列,我想按列添加一行总计 <data> 佩伊杂志 奥佩里奥德酒店 圆周句 矩阵 雇佣 基础 素数 畜生 CNSS 萨尔因普 IRPP 前卫 付款人净额 试试这个: <t t-set="brut" t-value="0"/> <!-- initialize the variable--> <t t

我有一个qweb报告,我想在其中添加一行,其中包含报告中每个COL的总数: 这是我的qweb代码;这是关于创建工资单报告的,它包含11列,我想按列添加一行总计

   <data>






佩伊杂志 奥佩里奥德酒店





圆周句 矩阵 雇佣 基础 素数 畜生 CNSS 萨尔因普 IRPP 前卫 付款人净额


试试这个:

<t t-set="brut" t-value="0"/> <!-- initialize the variable-->
<t t-foreach="get_payslip_lines(p.line_ids)" t-as="l">
    <t t-if="l.code=='BRUT' ">
        <t t-set="brut" t-value="brut + l.total"/>
     </t>
</t>
<td t-esc="brut"></td> <!-- To show it on the report-->

这段代码添加了一个新列并做了同样的工作,我想创建一行来计算一个特殊列的总数col@BadreddineMakdoudi对用于显示列内容的变量执行相同的操作。
</data>
<t t-set="brut" t-value="0"/> <!-- initialize the variable-->
<t t-foreach="get_payslip_lines(p.line_ids)" t-as="l">
    <t t-if="l.code=='BRUT' ">
        <t t-set="brut" t-value="brut + l.total"/>
     </t>
</t>
<td t-esc="brut"></td> <!-- To show it on the report-->
<tr  t-foreach="get_all_payslip_per_period(data['form']['date_start'],data['form']['date_end'])" t-as="p" >
    </tr>
    <tr>
        <td><t t-esc='Total1'/></td>
        ...
    </tr>
</tbody>