[FIX] sale: fix invoicing of orders with section line
This commit fixes an error being raised when it was attempted to create the invoice of a sales order containing a section line. task-id: 2052537 closes odoo/odoo#36326 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com> Co-authored-by: Damien Bouvy <dbo@odoo.com> Co-authored-by: Antoine Vandevenne <anv@odoo.com>
This commit is contained in:
committed by
Antoine Vandevenne (anv)
co-authored by
Damien Bouvy
Antoine Vandevenne
parent
92773b226f
commit
6ddfe775a3
@@ -527,7 +527,7 @@ class SaleOrder(models.Model):
|
||||
continue
|
||||
if line.qty_to_invoice > 0 or (line.qty_to_invoice < 0 and final):
|
||||
if pending_section:
|
||||
invoice_vals.append((0, 0, pending_section._prepare_invoice_line()))
|
||||
invoice_vals['invoice_line_ids'].append((0, 0, pending_section._prepare_invoice_line()))
|
||||
pending_section = None
|
||||
invoice_vals['invoice_line_ids'].append((0, 0, line._prepare_invoice_line()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user