Invoice may not be saved when recalling advance payment
In create_invoice
of sale_advance_payment
, the recalled lines have the invoice assigned before being saved. But the invoice
may not be already saved which may raise a warning since 280c22595cdd.
But also if the invoice is already saved (for example from a grouping), the recalled lines may be deleted later by the save of _process_invoice
of sale
module. This is because the lines are assigned to invoice
in sale
module (but they do not contain the recalled lines) and the ModelStorage.save
method will compare the assigned lines to the one stored (which will contain the recalled lines because they are added by saving the lines).