[FIX] account : invoice_date should be called date_invoice

This commit is contained in:
mge-odoo
2015-04-17 13:26:24 +02:00
parent f7cfd60351
commit 13d53e7fa9
+1 -1
View File
@@ -1218,7 +1218,7 @@ class account_invoice_line(models.Model):
taxes = self.invoice_line_tax_id.compute_all(price, self.quantity, product=self.product_id, partner=self.invoice_id.partner_id)
self.price_subtotal = price_subtotal_signed = taxes['total']
if self.invoice_id.currency_id != self.invoice_id.company_id.currency_id:
price_subtotal_signed = self.invoice_id.currency_id.with_context(date=self.invoice_id.invoice_date).compute(price_subtotal_signed, self.company_id.currency_id)
price_subtotal_signed = self.invoice_id.currency_id.with_context(date=self.invoice_id.date_invoice).compute(price_subtotal_signed, self.company_id.currency_id)
sign = self.invoice_id.type in ['in_invoice', 'out_refund'] and -1 or 1
self.price_subtotal_signed = price_subtotal_signed * sign