Make currency_digits depend on company

issue9912
review329851002
This commit is contained in:
Sergi Almacellas Abellana committed 2020-12-06 18:25:08 +01:00
1 parent cab75f28f2
commit 0a5b11e19e
1 file changed
+3 -3
+3 -3
View File
@@ -307,10 +307,10 @@ class Asset(Workflow, ModelSQL, ModelView):
if self.company:
return self.company.currency.id
@fields.depends('currency')
@fields.depends('company')
def on_change_with_currency_digits(self, name=None):
if self.currency:
return self.currency.digits
if self.company:
return self.company.currency.digits
return 2
@fields.depends('supplier_invoice_line', 'unit')