Skip to content

Commit

Permalink
[FIX] account: missing default for company_id in _convert
Browse files Browse the repository at this point in the history
  • Loading branch information
qdp-odoo committed Apr 23, 2018
1 parent 6d4eb69 commit fef9490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ def _compute_price(self):
if self.invoice_id.currency_id and self.invoice_id.currency_id != self.invoice_id.company_id.currency_id:
currency = self.invoice_id.currency_id
date = self.invoice_id._get_currency_rate_date()
price_subtotal_signed = currency._convert(price_subtotal_signed, self.invoice_id.company_id.currency_id, self.company_id, date or fields.Date.today())
price_subtotal_signed = currency._convert(price_subtotal_signed, self.invoice_id.company_id.currency_id, self.company_id or self.env.user.company_id, date or fields.Date.today())
sign = self.invoice_id.type in ['in_refund', 'out_refund'] and -1 or 1
self.price_subtotal_signed = price_subtotal_signed * sign

Expand Down

0 comments on commit fef9490

Please sign in to comment.