[IMP] ignore rules for nonexisting objects

pull/2755/head
Holger Brunn 2015-01-28 15:06:44 +01:00 committed by Raf Ven
parent dc246870c5
commit 1f812b70af
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ class auditlog_rule(models.Model):
for rule in self: for rule in self:
if rule.state != 'subscribed': if rule.state != 'subscribed':
continue continue
if not self.pool.get(rule.model_id.model):
# ignore rules for models not loadable currently
continue
model_model = self.env[rule.model_id.model] model_model = self.env[rule.model_id.model]
# CRUD # CRUD
# -> create # -> create