odoo/industry#2898

Created by fw-bot
Merged at 53c7c5b3b898f5567dac7275ad1ea70329cd03cd

Statuses:

label
odoo-dev:saas-19.3-19.0-rrb-invoice-date-trcaz-562903-fw
head
483cdc73adc93aad42d206e33fee6bd29692ceb2
merged
3 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