[ADD]empty group on customer invoice and sale order's form view to set left side block beside subtotal group
previously, difficult to set any fields to the left side of subtotal group in inherited views, now use <xpath expr="//group[@name='left_panel']" position="inside"> to add fields.
This commit is contained in:
parent
5dc9d9a6d6
commit
310e414497
@ -458,14 +458,19 @@
|
|||||||
</templates>
|
</templates>
|
||||||
</kanban>
|
</kanban>
|
||||||
</field>
|
</field>
|
||||||
<group class="oe_subtotal_footer oe_right">
|
<group>
|
||||||
<field name="amount_untaxed"/>
|
<group name="left_panel">
|
||||||
<field name="amount_tax"/>
|
|
||||||
<field name="amount_total" class="oe_subtotal_footer_separator"/>
|
</group>
|
||||||
<field name="payments_widget" colspan="2" nolabel="1" widget="payment"/>
|
<group class="oe_subtotal_footer oe_right">
|
||||||
<field name="residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
<field name="amount_untaxed"/>
|
||||||
<field name="reconciled" invisible="1"/>
|
<field name="amount_tax"/>
|
||||||
<field name="outstanding_credits_debits_widget" colspan="2" nolabel="1" widget="payment" attrs="{'invisible': [('state', 'not in', 'open')]}"/>
|
<field name="amount_total" class="oe_subtotal_footer_separator"/>
|
||||||
|
<field name="payments_widget" colspan="2" nolabel="1" widget="payment"/>
|
||||||
|
<field name="residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
||||||
|
<field name="reconciled" invisible="1"/>
|
||||||
|
<field name="outstanding_credits_debits_widget" colspan="2" nolabel="1" widget="payment" attrs="{'invisible': [('state', 'not in', 'open')]}"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<field name="comment" placeholder="Terms and conditions..."/>
|
<field name="comment" placeholder="Terms and conditions..."/>
|
||||||
</page>
|
</page>
|
||||||
|
@ -7,31 +7,17 @@
|
|||||||
<field name="inherit_id" ref="account.invoice_form"/>
|
<field name="inherit_id" ref="account.invoice_form"/>
|
||||||
<field name="priority" eval="20"/>
|
<field name="priority" eval="20"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="/form/sheet/notebook/page/group" position="replace">
|
<xpath expr="//group[@name='left_panel']" position="inside">
|
||||||
|
<separator string="Discount"/>
|
||||||
|
<field name="discount_method" attrs="{'readonly': ['|', ('origin', '!=', False), ('state', '!=', 'draft')]}"/>
|
||||||
|
<field name="discount_amount" attrs="{'readonly': ['|', '|', ('origin', '!=', False), ('state', '!=', 'draft'), ('discount_method', '=', False)], 'invisible': [('discount_method', '=', 'per')]}"/>
|
||||||
|
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': ['|', ('origin', '!=', False), ('state', '!=', 'draft')]}"/>
|
||||||
|
<button name="calculate_discount" type="object" class="oe_edit_only oe_link" string="(Update Discount)" attrs="{'invisible': [('discount_method', '=', False)]}" confirm="If you want to apply global discount other discount methods will be reset."/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<field name='comment' position="before">
|
<xpath expr="//field[@name='amount_untaxed']" position="before">
|
||||||
<div>
|
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
<group>
|
|
||||||
<group class="pull-left">
|
|
||||||
<field name="discount_method" attrs="{'readonly': ['|', ('origin', '!=', False), ('state', '!=', 'draft')]}"/>
|
|
||||||
<field name="discount_amount" attrs="{'readonly': ['|', '|', ('origin', '!=', False), ('state', '!=', 'draft'), ('discount_method', '=', False)], 'invisible': [('discount_method', '=', 'per')]}"/>
|
|
||||||
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': ['|', ('origin', '!=', False), ('state', '!=', 'draft')]}"/>
|
|
||||||
<button name="calculate_discount" type="object" class="oe_edit_only oe_link" string="(Update Discount)" attrs="{'invisible': [('discount_method', '=', False)]}" confirm="If you want to apply global discount other discount methods will be reset."/>
|
|
||||||
</group>
|
|
||||||
<group class="oe_subtotal_footer oe_right">
|
|
||||||
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<field name="discount" string="Discount"/>
|
<field name="discount" string="Discount"/>
|
||||||
<field name="amount_untaxed" string="Subtotal"/>
|
</xpath>
|
||||||
<field name="amount_tax"/>
|
|
||||||
<field name="amount_total" class="oe_subtotal_footer_separator"/>
|
|
||||||
<field name="payments_widget" colspan="2" nolabel="1" widget="payment"/>
|
|
||||||
<field name="residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
|
||||||
<field name="reconciled" invisible="1"/>
|
|
||||||
<field name="outstanding_credits_debits_widget" colspan="2" nolabel="1" widget="payment" attrs="{'invisible': [('state', 'not in', 'open')]}"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
</flectra>
|
</flectra>
|
||||||
|
@ -363,13 +363,18 @@
|
|||||||
</templates>
|
</templates>
|
||||||
</kanban>
|
</kanban>
|
||||||
</field>
|
</field>
|
||||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
<group>
|
||||||
<field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
<group name="left_panel">
|
||||||
<field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
</group>
|
||||||
<label for="amount_total" />
|
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
||||||
</div>
|
<field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||||
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
<field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||||
|
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
||||||
|
<label for="amount_total" />
|
||||||
|
</div>
|
||||||
|
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<field name="note" class="oe_inline" placeholder="Setup default terms and conditions in your sales settings ..."/>
|
<field name="note" class="oe_inline" placeholder="Setup default terms and conditions in your sales settings ..."/>
|
||||||
<div class="oe_clear"/>
|
<div class="oe_clear"/>
|
||||||
|
@ -17,27 +17,16 @@
|
|||||||
<field name="invoice_count" widget="statinfo" string="Invoices"/>
|
<field name="invoice_count" widget="statinfo" string="Invoices"/>
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//group[@name='sale_total']" position="replace">
|
<xpath expr="//group[@name='left_panel']" position="inside">
|
||||||
<div>
|
<separator string="Discount"/>
|
||||||
<group>
|
<field name="discount_method" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||||
<group class="pull-left">
|
<field name="discount_amount" attrs="{'invisible': [('discount_method', '=', 'per')], 'readonly': ['|', ('state', '!=', 'draft'), ('discount_method', '=', False)]}"/>
|
||||||
<field name="discount_method" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': [('state', '!=', 'draft')]}"/>
|
||||||
<field name="discount_amount" attrs="{'invisible': [('discount_method', '=', 'per')], 'readonly': ['|', ('state', '!=', 'draft'), ('discount_method', '=', False)]}"/>
|
<button name="calculate_discount" type="object" class="oe_edit_only oe_link" string="(Update Discount)" attrs="{'invisible': [('discount_method', '=', False)]}" confirm="If you want to apply global discount other discount methods will be reset."/>
|
||||||
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': [('state', '!=', 'draft')]}"/>
|
</xpath>
|
||||||
<button name="calculate_discount" type="object" class="oe_edit_only oe_link" string="(Update Discount)" attrs="{'invisible': [('discount_method', '=', False)]}" confirm="If you want to apply global discount other discount methods will be reset."/>
|
<xpath expr="//group[@name='sale_total']/field[@name='amount_untaxed']" position="before">
|
||||||
</group>
|
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
<field name="discount" string="Discount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<field name="discount" string="Discount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<field name="amount_untaxed" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<field name="amount_tax" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
|
||||||
<label for="amount_total"/>
|
|
||||||
</div>
|
|
||||||
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user