Make currency_digits depend on company
issue9912 review329851002
This commit is contained in:
1 parent
cab75f28f2
commit
0a5b11e19e
1 file changed
+3
-3
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user