From 3cc3ba4ebc07a18e0af00bf9bb6cfcdd4a28359b Mon Sep 17 00:00:00 2001 From: Hpar Date: Thu, 8 Nov 2018 16:13:38 +0100 Subject: [PATCH] Remove onchange on exception_type No more empty fields after changing type. --- base_exception/models/base_exception.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/base_exception/models/base_exception.py b/base_exception/models/base_exception.py index ee0af7239..825ec15be 100644 --- a/base_exception/models/base_exception.py +++ b/base_exception/models/base_exception.py @@ -93,13 +93,6 @@ class ExceptionRule(models.Model): self.ensure_one() return safe_eval(self.domain) - @api.onchange('exception_type',) - def onchange_exception_type(self): - if self.exception_type == 'by_domain': - self.code = False - elif self.exception_type == 'by_py_code': - self.domain = False - class BaseException(models.AbstractModel): _name = 'base.exception'