From 2a1754ff217b001546aca30b2ad479a030f574d0 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 26 Aug 2010 16:20:22 +0200 Subject: [PATCH 1/3] [FIX] base_action_rule: Use a flag on the object from the pool to disable the recursion issue bzr revid: stephane@openerp.com-20100826142022-9o0xyd3o3a30lsec --- addons/base_action_rule/base_action_rule.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 40eca6a254d..ff6321e599f 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -181,10 +181,12 @@ the rule to mark CC(mail to any other person defined in actions)."), for action_rule in self.browse(cr, uid, ids, context=context): model = action_rule.model_id.model obj_pool = self.pool.get(model) - obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context)) - obj_pool.__setattr__('write', self._write(obj_pool.write, model, context=context)) - return True + if not hasattr(obj_pool, 'base_action_ruled'): + obj_pool.create = self._create(obj_pool.create, model, context=context) + obj_pool.write = self._write(obj_pool.write, model, context=context) + obj_pool.base_action_ruled = True + return True def create(self, cr, uid, vals, context=None): res_id = super(base_action_rule, self).create(cr, uid, vals, context) self._register_hook(cr, uid, [res_id], context=context) From 0886361cc3a21d97b18556260518c1462170176e Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 26 Aug 2010 16:45:34 +0200 Subject: [PATCH 2/3] [FIX] project_issue: Remove the user_id in the domain of the actions for the dashboard bzr revid: stephane@openerp.com-20100826144534-hb9vlyu2lxnobua3 --- addons/project_issue/board_project_issue_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/project_issue/board_project_issue_view.xml b/addons/project_issue/board_project_issue_view.xml index 343d0e98b35..1173a63ce50 100644 --- a/addons/project_issue/board_project_issue_view.xml +++ b/addons/project_issue/board_project_issue_view.xml @@ -7,7 +7,7 @@ project.issue form tree,form - [('user_id','=',uid),('state','in',['draft','open'])] + [('state','in',['draft','open'])] @@ -16,7 +16,7 @@ project.issue form tree,form - [('user_id','=',uid),('state','=','pending')] + [('state','=','pending')] @@ -25,7 +25,7 @@ project.issue.report form graph - [('user_id','=',uid)] + [] @@ -47,7 +47,7 @@ project.issue.report form graph - [('user_id','=',uid)] + [] From 7f53a6c8d55a8042aa97d6ff86f89a95388287fe Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 26 Aug 2010 17:31:21 +0200 Subject: [PATCH 3/3] crm message_update check for priority bzr revid: al@openerp.com-20100826153121-krc4wfmbefhyvnp1 --- addons/crm/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 763e96b0ba4..5d5fb5d3114 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -344,7 +344,7 @@ class crm_lead(crm_case, osv.osv): if isinstance(ids, (str, int, long)): ids = [ids] - if msg.get('priority'): + if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES): vals['priority'] = msg.get('priority') maps = {