diff options
| author | Martin Trigaux <mat@odoo.com> | 2016-05-26 08:33:20 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2016-05-26 08:33:20 +0200 |
| commit | 37bbe87d5792c879130e5f1e491f743cbc50dc1e (patch) | |
| tree | d29a85e8fdc5fadb6e01079a4951fd9b3e533464 /addons/gamification/models | |
| parent | a4687c6e42a7b0ec6b8d98dc2af7fe2d1c3272d0 (diff) | |
[INP] gamification: skip check for not required fields
Could get a definition with a model only
Diffstat (limited to 'addons/gamification/models')
| -rw-r--r-- | addons/gamification/models/goal.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index 969d4321bab..42fd073b58e 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -152,6 +152,9 @@ class gamification_goal_definition(osv.Model): """ make sure the selected field and model are usable""" for definition in self.browse(cr, uid, ids, context=context): try: + if not definition.model_id or not definition.field_id: + continue + model = self.pool[definition.model_id.model] field = model._fields[definition.field_id.name] if not field.store: |
