[FIX] marketing_campaign: server actions always return None or False, and the return value of method _process_wi_action should return True whatever what the server action returns

If the server actions returned None instead of False, the next activity was not triggered, while it should
This commit is contained in:
Denis Ledoux 2014-05-19 12:30:20 +02:00
parent c2584c8cb0
commit 571e23f3d5
1 changed files with 2 additions and 4 deletions

View File

@ -494,11 +494,9 @@ class marketing_campaign_activity(osv.osv):
active_ids=[workitem.res_id],
active_model=workitem.object_id.model,
workitem=workitem)
res = server_obj.run(cr, uid, [activity.server_action_id.id],
server_obj.run(cr, uid, [activity.server_action_id.id],
context=action_context)
# server action return False if the action is performed
# except client_action, other and python code
return res == False and True or res
return True
def process(self, cr, uid, act_id, wi_id, context=None):
activity = self.browse(cr, uid, act_id, context=context)