From d73648fe0dc1f571d08b76d8d6f7780dd20ed811 Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Fri, 27 May 2016 15:04:20 +0200 Subject: [PATCH] [FIX] crm,gamification: flexible reference to field The field generation is most of the time following the pattern `field__` but in case of name clash (e.g. res.partner.category - id and res.partner - category_id), the id of ir.model.field is added at the end of the external id during the field creation. The more flexible way to link to an ir.model.field is to use the syntax `search=[('model', '=', ), ('name', '=', )]` to avoid errors as in #12192 when the "first" external id no longer exists. Fixes #12192 Closes #12198 --- addons/crm/crm_action_rule_demo.xml | 2 +- addons/gamification_sale_crm/sale_crm_goals.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml index d77211a0f12..a0cd7e72084 100644 --- a/addons/crm/crm_action_rule_demo.xml +++ b/addons/crm/crm_action_rule_demo.xml @@ -22,7 +22,7 @@ 1 on_time - + 5 day diff --git a/addons/gamification_sale_crm/sale_crm_goals.xml b/addons/gamification_sale_crm/sale_crm_goals.xml index 06e57425c25..335d7b66985 100644 --- a/addons/gamification_sale_crm/sale_crm_goals.xml +++ b/addons/gamification_sale_crm/sale_crm_goals.xml @@ -20,7 +20,7 @@ count leads - + [('user_id','=',user.id), '|', ('type', '=', 'lead'), ('type', '=', 'opportunity')]