|
@ -35,7 +35,7 @@ class BaseAutomation(models.Model): |
|
|
def create_refresh_rules(self, model_name): |
|
|
def create_refresh_rules(self, model_name): |
|
|
model = self.env['ir.model'].search( |
|
|
model = self.env['ir.model'].search( |
|
|
[('model', '=', model_name)], limit=1) |
|
|
[('model', '=', model_name)], limit=1) |
|
|
if model_name in self.env and len(model): |
|
|
|
|
|
|
|
|
if model_name in self.env and model: |
|
|
triggers = [ |
|
|
triggers = [ |
|
|
('on_create', 'Creation'), |
|
|
('on_create', 'Creation'), |
|
|
('on_write', 'Update'), |
|
|
('on_write', 'Update'), |
|
|