Update currency when company is changed
issue11679
This commit is contained in:
1 parent
63572f0ffb
commit
bc31ea4fbd
1 file changed
+4
-1
+4
-1
@@ -256,10 +256,13 @@ class SaleOpportunity(
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@fields.depends('company')
|
||||
@fields.depends('amount', 'company')
|
||||
def on_change_company(self):
|
||||
self.payment_term = self.default_payment_term(
|
||||
company=self.company.id if self.company else None)
|
||||
if not self.amount:
|
||||
self.currency = self.default_currency(
|
||||
company=self.company.id if self.company else None)
|
||||
|
||||
@classmethod
|
||||
def default_currency(cls, **pattern):
|
||||
|
||||
Reference in new issue
Block a user