[MIG] account_invoice_constraint_chronology: Migration to 15.0

This commit is contained in:
Eduardo De Miguel
2022-03-22 16:31:02 +01:00
committed by Zina Rasoamanana
parent f01806efdd
commit 4981ff03d6
5 changed files with 13 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ class AccountJournal(models.Model):
@api.onchange("type")
def _onchange_type(self):
super()._onchange_type()
res = super()._onchange_type()
if self.type not in ["sale", "purchase"]:
self.check_chronology = False
return res