Browse Source

[IMP] - hide recurring_invoicing_type if recurring_rule_type is monthlylastday

for the monthlylastday case, pre-paid is logicly impossible,
if monthlylastday is set, we consider only post-paid case
pull/208/head
sbejaoui 6 years ago
committed by Thomas Binsfeld
parent
commit
639d2ee524
  1. 25
      product_contract/views/product_template.xml
  2. 24
      product_contract/views/sale_order.xml

25
product_contract/views/product_template.xml

@ -26,16 +26,21 @@
<group> <group>
<field name="contract_template_id" <field name="contract_template_id"
attrs="{'required':[('is_contract', '=', True)]}"/> attrs="{'required':[('is_contract', '=', True)]}"/>
<field name="recurring_invoicing_type"
attrs="{'required':[('is_contract', '=', True)]}"/>
<label for="recurring_interval" attrs="{'required':[('is_contract', '=', True)]}"/>
<div attrs="{'required':[('is_contract', '=', True)]}">
<field name="recurring_interval"
class="oe_inline" nolabel="1"/>
<field name="recurring_rule_type"
class="oe_inline" nolabel="1"/>
</div>
</group>
<group name="recurrence_info">
<group>
<label for="recurring_interval"/>
<div>
<field name="recurring_interval"
class="oe_inline" nolabel="1"/>
<field name="recurring_rule_type"
class="oe_inline" nolabel="1"/>
</div>
</group>
<group>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
</group>
</group> </group>
<group> <group>
<field name="is_auto_renew"/> <field name="is_auto_renew"/>

24
product_contract/views/sale_order.xml

@ -40,30 +40,30 @@
</xpath> </xpath>
<xpath expr="//field[@name='order_line']/form//field[@name='tax_id']/parent::group" <xpath expr="//field[@name='order_line']/form//field[@name='tax_id']/parent::group"
position="after"> position="after">
<field name="is_contract" invisible="1"/>
<separator colspan="4" string="Recurrence Invoicing" <separator colspan="4" string="Recurrence Invoicing"
attrs="{'invisible': [('is_contract', '=', False)]}"/> attrs="{'invisible': [('is_contract', '=', False)]}"/>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="is_contract" invisible="1"/>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('is_contract', '=', False)],
'required':[('is_contract', '=', True)]}"/>
</group>
<group attrs="{'invisible': [('is_contract', '=', False)]}"> <group attrs="{'invisible': [('is_contract', '=', False)]}">
<label for="recurring_interval"/> <label for="recurring_interval"/>
<div> <div>
<field name="recurring_interval" <field name="recurring_interval"
class="oe_inline" nolabel="1"
attrs="{'required':[('is_contract', '=', True)]}"/>
class="oe_inline" nolabel="1"/>
<field name="recurring_rule_type" <field name="recurring_rule_type"
class="oe_inline" nolabel="1"
attrs="{'required':[('is_contract', '=', True)]}"/>
class="oe_inline" nolabel="1"/>
</div> </div>
</group> </group>
<group attrs="{'invisible': [('is_contract', '=', False)]}"> <group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="date_start" attrs="{'required': [('is_contract', '=', True)]}"/>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
</group>
<group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="date_start"
attrs="{'required': [('is_contract', '=', True)]}"/>
</group> </group>
<group attrs="{'invisible': [('is_contract', '=', False)]}"> <group attrs="{'invisible': [('is_contract', '=', False)]}">
<field name="date_end" attrs="{'required': [('is_auto_renew', '=', True)]}"/>
<field name="date_end"
attrs="{'required': [('is_auto_renew', '=', True)]}"/>
</group> </group>
</xpath> </xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='price_total']" <xpath expr="//field[@name='order_line']/tree//field[@name='price_total']"

Loading…
Cancel
Save