[INP] gamification: skip check for not required fields
Could get a definition with a model only
This commit is contained in:
parent
a4687c6e42
commit
37bbe87d57
|
@ -152,6 +152,9 @@ class gamification_goal_definition(osv.Model):
|
||||||
""" make sure the selected field and model are usable"""
|
""" make sure the selected field and model are usable"""
|
||||||
for definition in self.browse(cr, uid, ids, context=context):
|
for definition in self.browse(cr, uid, ids, context=context):
|
||||||
try:
|
try:
|
||||||
|
if not definition.model_id or not definition.field_id:
|
||||||
|
continue
|
||||||
|
|
||||||
model = self.pool[definition.model_id.model]
|
model = self.pool[definition.model_id.model]
|
||||||
field = model._fields[definition.field_id.name]
|
field = model._fields[definition.field_id.name]
|
||||||
if not field.store:
|
if not field.store:
|
||||||
|
|
Loading…
Reference in New Issue