[FIX]: crm: Name in domain for base_action_rule

bzr revid: rpa@tinyerp.com-20100726105949-fop8p9d2vdq6iwef
This commit is contained in:
rpa (Open ERP) 2010-07-26 16:29:49 +05:30
parent f2ded42800
commit a069671a8a
2 changed files with 3 additions and 1 deletions

View File

@ -282,6 +282,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
ok = ok and (not action.trg_state_from or action.trg_state_from==obj.state)
if state_to:
ok = ok and (not action.trg_state_to or action.trg_state_to==state_to)
elif action.trg_state_to:
ok = False
reg_name = action.regex_name
result_name = True
if reg_name:

View File

@ -429,7 +429,7 @@ class crm_case(object):
rule_obj = self.pool.get('base.action.rule')
model_obj = self.pool.get('ir.model')
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
def format_body(self, body):