openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #04824
[Bug 912841] Re: [6.0] crm/crm_action_rule - mail action doesn't send mails to user and watchers
About what I said on act_email_cc, I tested it a bit further
It tries to use act_email_cc of the object. (instead of the action ?)
However, the object crm.lead has no attribute act_email_cc.
------------------------------------------------------------------
crm/crm_action_rule.py @ line 117 - 124
If hasattr(obj, 'email_cc') and action.act_email_cc:
if '@' in (obj.email_cc or ''):
emails = obj.email_cc.split(",")
if obj.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
write['email_cc'] = obj.email_cc+','+obj.act_email_cc
else:
write['email_cc'] = obj.act_email_cc
------------------------------------------------------------------
We check if obj has email_cc but not if it has act_email_cc
So in case of a rule on a crm.lead
I get the following error :
Environment Information :
System : Linux-2.6.32-37-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-37-generic
Operating System Version : #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/addons/base_action_rule/base_action_rule.py", line 187, in make_call_old
self.pre_action(cr, uid, ids, model, context=context)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/addons/action_rule_trg_dates/action_rule.py", line 74, in pre_action
self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context), context=context)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/addons/base_action_rule/base_action_rule.py", line 469, in _action
self.do_action(cr, uid, action, model_obj, obj, context)
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/addons/crm/crm_action_rule.py", line 124, in do_action
write['email_cc'] = obj.act_email_cc
File "/home/yvaucher/Projects/bzr_c2c/c2c_openerpv6_migr/trunk/src/server/bin/osv/orm.py", line 294, in __getattr__
raise AttributeError(e)
AttributeError: "Field 'act_email_cc' does not exist in object 'browse_record(crm.lead, 7573)'"
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/912841
Title:
[6.0] crm/crm_action_rule - mail action doesn't send mails to user and
watchers
Status in OpenERP Addons (modules):
New
Bug description:
Hello,
Method do_action overwrite in crm_action_rule but it doesn't include
all email action informations.
Those fields are not considered :
- act_email_to
- act_email_from
- act_mail_to_user
- act_mail_to_watchers
- act_mail_to_email
and
act_email_cc is added to followers of the model like crm_case, but
those followers won't receive the current message if send to followers
is checked
The reason is certainly because base_action_rule evolved but crm
didn't follow.
Might this function do_action should be reviewed to split the part of
modifing object fields and the part of gathering emails ?
---------
And by the way tool tips of automated action seems weird for me maybe
there are some extra words. (but I'm not a native english speaker)
Here is an exemple
"Use a python expression to specify the right field on which one than we will use the 'To' field of the header"
I would say
"Specify the 'To' header field. A python expression can be used."
Regards,
Yannick
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/912841/+subscriptions
References