[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,6 +458,10 @@
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
<group>
|
||||
<group name="left_panel">
|
||||
|
||||
</group>
|
||||
<group class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed"/>
|
||||
<field name="amount_tax"/>
|
||||
@ -467,6 +471,7 @@
|
||||
<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>
|
||||
<page string="Other Info" name="other_info">
|
||||
|
@ -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>
|
||||
<field name='comment' position="before">
|
||||
<div>
|
||||
<group>
|
||||
<group class="pull-left">
|
||||
<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."/>
|
||||
</group>
|
||||
<group class="oe_subtotal_footer oe_right">
|
||||
</xpath>
|
||||
<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,6 +363,10 @@
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
<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'}"/>
|
||||
@ -371,6 +375,7 @@
|
||||
</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"/>
|
||||
</page>
|
||||
|
@ -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">
|
||||
<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."/>
|
||||
</group>
|
||||
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
|
||||
</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'}"/>
|
||||
<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>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
Reference in New Issue
Block a user