Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.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
Openerp 页脚加上one2many_列表中的总和odoo 9_Openerp_Odoo 9 - Fatal编程技术网

Openerp 页脚加上one2many_列表中的总和odoo 9

Openerp 页脚加上one2many_列表中的总和odoo 9,openerp,odoo-9,Openerp,Odoo 9,如何在one2many_列表下为sum定义灰色页脚,例如。 仅在One2many字段的嵌入树中添加sum=“Title”: ... .... ... 仅在One2many字段的嵌入树中添加sum=“Title”: ... .... ... 您只需将sum属性添加到duration字段 发票行的示例如下: <field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"> &

如何在one2many_列表下为sum定义灰色页脚,例如。

仅在One2many字段的嵌入树中添加sum=“Title”:


...
....
...

仅在One2many字段的嵌入树中添加sum=“Title”:


...
....
...

您只需将
sum
属性添加到
duration字段

发票行
的示例如下:

<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
<tree string="Invoice Lines" editable="bottom">
    <field name="sequence" widget="handle"/>
    <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)"/>
    <field name="name"/>
    <field name="company_id" invisible="1"/>
    <field name="account_id" groups="account.group_account_user" domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
    <field name="account_analytic_id" groups="analytic.group_analytic_accounting" domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('state','not in',('close','cancelled'))]"/>
    <field name="quantity"/>
    <field name="uos_id" groups="product.group_uom" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)"/>
    <field name="price_unit"/>
    <field name="discount" groups="sale.group_discount_per_so_line"/>
    <field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
    <field name="price_subtotal" sum='Total'/>
</tree>

应该是这样的:

<field name="field name" nolabel="1" widget="one2many_list">
    <tree editable="bottom">
        ...
        <field name="duration" sum='Total'/>
    </tree>
</field>

...

您只需将
sum
属性添加到
持续时间字段

发票行
的示例如下:

<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
<tree string="Invoice Lines" editable="bottom">
    <field name="sequence" widget="handle"/>
    <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)"/>
    <field name="name"/>
    <field name="company_id" invisible="1"/>
    <field name="account_id" groups="account.group_account_user" domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
    <field name="account_analytic_id" groups="analytic.group_analytic_accounting" domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('state','not in',('close','cancelled'))]"/>
    <field name="quantity"/>
    <field name="uos_id" groups="product.group_uom" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)"/>
    <field name="price_unit"/>
    <field name="discount" groups="sale.group_discount_per_so_line"/>
    <field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
    <field name="price_subtotal" sum='Total'/>
</tree>

应该是这样的:

<field name="field name" nolabel="1" widget="one2many_list">
    <tree editable="bottom">
        ...
        <field name="duration" sum='Total'/>
    </tree>
</field>

...