[IMP] crm, base_action_rule : Small Change in methods.

bzr revid: uco@tinyerp.co.in-20100204053604-ae7yhrlrb7s7c4w1
This commit is contained in:
uco (OpenERP) 2010-02-04 11:06:04 +05:30
parent 1c2bd4c353
commit 309ca5e6f2
2 changed files with 4 additions and 6 deletions

View File

@ -125,7 +125,7 @@ class base_action_rule(osv.osv):
if ok:
if action.server_action_id:
context.update({'active_id':case.id,'active_ids':[case.id]})
context.update({'active_id': data.id,'active_ids': [data.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
for hist in history:
if hist[3]:
@ -164,7 +164,7 @@ class base_action_rule_line(osv.osv):
'trg_partner_categ_id': fields.many2one('res.partner.category', 'Partner Category'),
'trg_priority_from': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Minimum Priority'),
'trg_priority_to': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Maximim Priority'),
'trg_priority_to': fields.selection([('','')] + AVAILABLE_PRIORITIES, 'Maximum Priority'),
'act_method': fields.char('Call Object Method', size=64),

View File

@ -198,7 +198,7 @@ class base_action_rule(osv.osv):
history_obj.create(cr, uid, {'rule_id': case.id, 'res_id': case.name.id, 'date_action_last': lastDate, 'date_action_next': action_next})
caseobj = self.pool.get('crm.case')
case_ids = caseobj.search(cr, uid, [('state', 'not in', ('cancel','done'))])
while len(action_ids) and level:
newactions = []
actions = self.pool.get('base.action.rule').browse(cr, uid, action_ids, context)
@ -221,8 +221,6 @@ class base_action_rule(osv.osv):
(action.trg_partner_categ_id.id in map(lambda x: x.id, cs.partner_id.category_id or []))
)
)
ok = ok and (not action.trg_priority_from or action.trg_priority_from>=case.priority)
ok = ok and (not action.trg_priority_to or action.trg_priority_to<=case.priority)
reg_name = action.regex_name
result_name = True
@ -284,7 +282,7 @@ class base_action_rule(osv.osv):
if ok:
if action.server_action_id:
context.update({'active_id':cs.id,'active_ids':[cs.id]})
context.update({'active_id': cs.id,'active_ids': [cs.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
write = {}
if action.act_state: