odoo/industry#2895

Created by fw-bot
Merged at c619e1af31bc35e40a4531aff1c2b90378e9fff3

Statuses:

label
odoo-dev:saas-19.2-19.0-rrb-invoice-date-trcaz-562811-fw
head
7a3fe1c24f0cc5f65ad62deaa24bb25ea91a612d
merged
4 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