[FIX] sale: do not overwrite invoice values specified by

`_prepare_invoice`

Since a3afb98, the `invoice_line_ids` value is replaced in
`_create_invoice`.
This broke some custom client overrides based on overrides of
`_prepare_invoice`.

This commit brings back the old behavior, ensuring that the
`invoice_line_ids` values
specified by `_prepare_invoice` are extended but not replaced.

closes odoo/odoo#68015

X-original-commit: 9beceb0fd4572bdada30cf4ded235c1ff634083c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
David Tran
2021-03-17 12:43:07 +00:00
committed by Victor Feyens
parent 167655e2ce
commit f86f92d462
+1 -1
View File
@@ -712,7 +712,7 @@ Reason(s) of this behavior could be:
)
invoice_item_sequence += 1
invoice_vals['invoice_line_ids'] = invoice_line_vals
invoice_vals['invoice_line_ids'] += invoice_line_vals
invoice_vals_list.append(invoice_vals)
if not invoice_vals_list: