odoo/industry#2889

Created by fw-bot
Merged at 86f4e11af3cf17aff7829188b7206dc640da0ee1

Statuses:

label
odoo-dev:saas-19.1-19.0-rrb-invoice-date-trcaz-561355-fw
head
80d4ca74639bd9f408de21eb7cb792c88b28fbd9
merged
1 week ago by Tristan Cazier (trcaz)
odoo/industry
19.0 #2866
saas-19.1 #2889
saas-19.2 #2895
saas-19.3 #2898
saas-19.4 #2900
master #2902

[IMP] recurring_rental_billing: only write SO invoiced date on invoice confirm

Before this commit, when creating a draft invoice using the custom button Consolidated Down Payment, all the invoice amount was immediately considered invoiced, even if the draft invoice was deleted, with no way of creating another one with said button.

In this commit, we add new fields and an automation on invoice confirmation to allow the creation of multiple draft invoices at the same time, deletions, etc., only considering the amount invoice when one of those invoices is confirmed by storing the invoice's date and delaying the SO's x_last_invoice date field write.

In addition, this commit changes the 'to invoice' amount computation by not considering the cancelled SOs anymore.

task-6512188

Forward-Port-Of: #2866