mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: support pre-paid for monthlylastday
monthlylastday is (almost) not a special case anymore \o/. montlylastday is simply a montly period where the periods are aligned on month boundaries. The last bit of special casing is that postpaid generates invoice the day after the last dasy of the period, except for monthlylastday where the invoice is generated on the last day of the period. This last exception will disappear when we put the offset under user control. This is a breaking change because the post-paid/pre-paid mode becomes relevant for monthlylastday invoicing. The field becomes visible in the UI. Code that generate monthlylastday contract lines must now correctly set the pre-paid/post-paid mode too. Some tests have had to be adapted to reflect that.
This commit is contained in:
committed by
Ilyas
parent
5d7f879a98
commit
6977906e13
@@ -43,6 +43,7 @@ class TestSaleOrder(TransactionCase):
|
|||||||
'is_contract': True,
|
'is_contract': True,
|
||||||
'default_qty': 12,
|
'default_qty': 12,
|
||||||
'recurring_rule_type': "monthlylastday",
|
'recurring_rule_type': "monthlylastday",
|
||||||
|
'recurring_invoicing_type': "post-paid",
|
||||||
'contract_template_id': self.contract_template1.id,
|
'contract_template_id': self.contract_template1.id,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,8 +33,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_qty"/>
|
<field name="default_qty"/>
|
||||||
<field name="recurring_invoicing_type"
|
<field name="recurring_invoicing_type"/>
|
||||||
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
|||||||
@@ -58,8 +58,7 @@
|
|||||||
<field name="recurring_rule_type"/>
|
<field name="recurring_rule_type"/>
|
||||||
</group>
|
</group>
|
||||||
<group attrs="{'invisible': [('is_contract', '=', False)]}">
|
<group attrs="{'invisible': [('is_contract', '=', False)]}">
|
||||||
<field name="recurring_invoicing_type"
|
<field name="recurring_invoicing_type"/>
|
||||||
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group attrs="{'invisible': [('is_contract', '=', False)]}">
|
<group attrs="{'invisible': [('is_contract', '=', False)]}">
|
||||||
<field name="date_start"
|
<field name="date_start"
|
||||||
|
|||||||
Reference in New Issue
Block a user