Add missing _parent_rule.company to depends.

This commit is contained in:
Albert Cervera i Areny 2020-11-22 22:26:40 +01:00
parent a9ab6e1a7b
commit 98ed80f481

View file

@ -41,8 +41,8 @@ class AccountInvoiceAccountRuleLine(ModelSQL, ModelView, MatchMixin):
return True
return False
@fields.depends('rule')
def on_change_with_company(self, name="None"):
@fields.depends('rule', '_parent_rule.company')
def on_change_with_company(self, name=None):
if self.rule:
return self.rule.company.id
return Transaction().context.get('company') or None