summaryrefslogtreecommitdiff
path: root/addons/account/models/account_analytic_line.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-02-08 16:53:11 +0100
committerChristophe Simonis <chs@odoo.com>2019-02-08 16:53:11 +0100
commit9553240adc4a29d7b61d63708a53cbb612c0e123 (patch)
tree92a58e8ed74eaa6534f8789725f58487c701fe11 /addons/account/models/account_analytic_line.py
parentd260c53d12180bf3c2f4f06cf4cdcfb554fd4ba5 (diff)
parent9773be345e1ece19180727b748790b538949e473 (diff)
[MERGE] forward port branch saas-15 up to 9773be345e1
Diffstat (limited to 'addons/account/models/account_analytic_line.py')
-rw-r--r--addons/account/models/account_analytic_line.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_analytic_line.py b/addons/account/models/account_analytic_line.py
index 1d212d31bf8..c6337718333 100644
--- a/addons/account/models/account_analytic_line.py
+++ b/addons/account/models/account_analytic_line.py
@@ -44,7 +44,7 @@ class AccountAnalyticLine(models.Model):
# Compute based on pricetype
amount_unit = self.product_id.price_compute('standard_price', uom=unit)[self.product_id.id]
amount = amount_unit * self.unit_amount or 0.0
- result = self.currency_id.round(amount) * -1
+ result = (self.currency_id.round(amount) if self.currency_id else round(amount, 2)) * -1
self.amount = result
self.general_account_id = account
self.product_uom_id = unit