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

[IMP] - Improve unit tests
13.0-mig-contract
sbejaoui 6 years ago
committed by Administrator
parent
commit
6b5ca7f585
  1. 1
      contract/tests/test_contract.py
  2. 8
      contract/views/abstract_contract_line.xml

1
contract/tests/test_contract.py

@ -102,6 +102,7 @@ class TestContractBase(common.SavepointCase):
cls.acct_line = cls.env['account.analytic.invoice.line'].create( cls.acct_line = cls.env['account.analytic.invoice.line'].create(
cls.line_vals cls.line_vals
) )
cls.acct_line.product_id.is_auto_renew = True
class TestContract(TestContractBase): class TestContract(TestContractBase):

8
contract/views/abstract_contract_line.xml

@ -49,9 +49,6 @@
</group> </group>
</group> </group>
<group name="recurrence_info"> <group name="recurrence_info">
<group>
<field name="recurring_invoicing_type"/>
</group>
<group> <group>
<label for="recurring_interval"/> <label for="recurring_interval"/>
<div> <div>
@ -61,7 +58,10 @@
class="oe_inline" nolabel="1"/> class="oe_inline" nolabel="1"/>
</div> </div>
</group> </group>
<group>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
</group>
</group> </group>
</sheet> </sheet>
</form> </form>

Loading…
Cancel
Save