From 98ccb8539e8e3470aab4bbba6484562bf3e69088 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 9 Feb 2016 10:44:08 +0100 Subject: [PATCH] [FIX] sale: invoice_status of a SO line from an advance payment When making an advance payment, the SO line created from this payment must have a qty_invoiced equal to 0 and the invoice line created for this SO line must have a quantity equal to 0. In this way, the SO line created is "Fully invoiced". opw:668844 --- addons/sale/wizard/sale_make_invoice_advance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 73798aa4695..a66bd83add9 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -81,7 +81,7 @@ class SaleAdvancePaymentInv(models.TransientModel): 'origin': order.name, 'account_id': account_id, 'price_unit': amount, - 'quantity': 1.0, + 'quantity': 0.0, 'discount': 0.0, 'uom_id': self.product_id.uom_id.id, 'product_id': self.product_id.id, @@ -131,6 +131,7 @@ class SaleAdvancePaymentInv(models.TransientModel): 'product_uom': self.product_id.uom_id.id, 'product_id': self.product_id.id, 'tax_id': [(6, 0, self.product_id.taxes_id.ids)], + 'qty_invoiced': 0.0, }) self._create_invoice(order, so_line, amount) if self._context.get('open_invoices', False):