[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:
Stéphane Bidoul (ACSONE)
2019-12-08 12:31:04 +01:00
committed by Pedro M. Baeza
parent a3648ca0c9
commit 41468b0388
5 changed files with 402 additions and 15 deletions

View File

@@ -59,8 +59,7 @@
</div>
</group>
<group>
<field name="recurring_invoicing_type"
attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
<field name="recurring_invoicing_type"/>
</group>
</group>
</sheet>