Use depends on TaxableMixin
issue8986 review282751002
This commit is contained in:
1 parent
77bd9d66a1
commit
5f24c941f0
1 file changed
+2
-1
@@ -381,6 +381,7 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
return self.currency.digits
|
||||
return 2
|
||||
|
||||
@fields.depends('party')
|
||||
def _get_tax_context(self):
|
||||
res = {}
|
||||
if self.party and self.party.lang:
|
||||
@@ -394,7 +395,7 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
return self.party.lang.code
|
||||
return Config.get_language()
|
||||
|
||||
@fields.depends('lines', 'currency', 'party')
|
||||
@fields.depends('lines', 'currency', methods=['_get_taxes'])
|
||||
def on_change_lines(self):
|
||||
self.untaxed_amount = Decimal('0.0')
|
||||
self.tax_amount = Decimal('0.0')
|
||||
|
||||
Reference in new issue
Block a user