odoo/industry#2902

Created by fw-bot
Merged at 6ea83c3f3269d84aa552e4bd2d8c78dd3ce924b6

Statuses:

label
odoo-dev:master-19.0-rrb-invoice-date-trcaz-563103-fw
head
8aa600df517622ab7a1db6a9352054de4c43886d
merged
2 days 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: #2889
Forward-Port-Of: #2866