diff --git a/addons/account_discount/report/custom_invoice_report.xml b/addons/account_discount/report/custom_invoice_report.xml index acc8ed8b..d4b1a7be 100644 --- a/addons/account_discount/report/custom_invoice_report.xml +++ b/addons/account_discount/report/custom_invoice_report.xml @@ -4,7 +4,7 @@
-
+
diff --git a/addons/sales_discount/models/sale.py b/addons/sales_discount/models/sale.py index 98b2d170..d42e6504 100644 --- a/addons/sales_discount/models/sale.py +++ b/addons/sales_discount/models/sale.py @@ -145,13 +145,11 @@ class SaleOrder(models.Model): @api.multi def _prepare_invoice(self): - sale_order = self.env['sale.order'].browse( - self._context.get('active_ids', [])) invoice_vals = super(SaleOrder, self)._prepare_invoice() invoice_vals.update({ - 'discount_method': sale_order.discount_method, - 'discount_amount': sale_order.discount_amount, - 'discount_per': sale_order.discount_per, - 'discount': sale_order.discount, + 'discount_method': self.discount_method, + 'discount_amount': self.discount_amount, + 'discount_per': self.discount_per, + 'discount': self.discount, }) return invoice_vals
Gross Amount