[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>
|
||||
</kanban>
|
||||
</field>
|
||||
<group class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed"/>
|
||||
<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 name="left_panel">
|
||||
|
||||
</group>
|
||||
<group class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed"/>
|
||||
<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>
|
||||
<field name="comment" placeholder="Terms and conditions..."/>
|
||||
</page>
|
||||
|
@ -7,31 +7,17 @@
|
||||
<field name="inherit_id" ref="account.invoice_form"/>
|
||||
<field name="priority" eval="20"/>
|
||||
<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>
|
||||
<field name='comment' position="before">
|
||||
<div>
|
||||
<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'}"/>
|
||||
<xpath expr="//field[@name='amount_untaxed']" position="before">
|
||||
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="discount" string="Discount"/>
|
||||
<field name="amount_untaxed" string="Subtotal"/>
|
||||
<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>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</flectra>
|
||||
|
@ -363,13 +363,18 @@
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
||||
<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 name="left_panel">
|
||||
|
||||
</group>
|
||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
||||
<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>
|
||||
<field name="note" class="oe_inline" placeholder="Setup default terms and conditions in your sales settings ..."/>
|
||||
<div class="oe_clear"/>
|
||||
|
@ -17,27 +17,16 @@
|
||||
<field name="invoice_count" widget="statinfo" string="Invoices"/>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='sale_total']" position="replace">
|
||||
<div>
|
||||
<group>
|
||||
<group class="pull-left">
|
||||
<field name="discount_method" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="discount_amount" attrs="{'invisible': [('discount_method', '=', 'per')], 'readonly': ['|', ('state', '!=', 'draft'), ('discount_method', '=', False)]}"/>
|
||||
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': [('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" colspan="2" name="sale_total">
|
||||
<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 expr="//group[@name='left_panel']" position="inside">
|
||||
<separator string="Discount"/>
|
||||
<field name="discount_method" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="discount_amount" attrs="{'invisible': [('discount_method', '=', 'per')], 'readonly': ['|', ('state', '!=', 'draft'), ('discount_method', '=', False)]}"/>
|
||||
<field name="discount_per" attrs="{'invisible': ['|', ('discount_method', '=', 'fixed'), ('discount_method', '=', False)], 'readonly': [('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 expr="//group[@name='sale_total']/field[@name='amount_untaxed']" position="before">
|
||||
<field name="gross_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="discount" string="Discount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
Reference in New Issue
Block a user