Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-572461-rgo into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-572461-rgo/+merge/97221

Hello,

There is an issue with server action and below are the steps to reproduce it:

step 1) Define a server action on 'Task' Object with 'Email' as 'Action Type' 
and 'object.user_id.user_email' in 'Email Address'
step 2) Define an Automated Action(that sends an email to the task assigned 
person when a new task is created) with 'Object' = 'Task', 'State' = 'New', 
'Trigger Date' = 'None' and 'Server Action' = step 1's server action
step 3) creating a new task throws traceback saying "AssertionError: At least 
one valid recipient address should be specified for outgoing emails (To/Cc/Bcc)"

This fix fixes the issue.

Kindly review this.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-572461-rgo/+merge/97221
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-572461-rgo.
=== modified file 'base_action_rule/base_action_rule.py'
--- base_action_rule/base_action_rule.py	2011-12-27 09:27:00 +0000
+++ base_action_rule/base_action_rule.py	2012-03-13 13:41:23 +0000
@@ -389,7 +389,7 @@
             context = {}
 
         if action.server_action_id:
-            context.update({'active_id':obj.id, 'active_ids':[obj.id]})
+            context.update({'active_id':obj.id, 'active_ids':[obj.id], 'active_model':obj._name})
             self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
         write = {}
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to