Amit Parik (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-943410-amp into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #943410 in OpenERP Addons: "Error in crm_Action_rule if action specifies
"Add Watchers (CC)""
https://bugs.launchpad.net/openobject-addons/+bug/943410
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-943410-amp/+merge/100947
Hello,
When gives Add Watchers (CC) on Automated Actions It will gives a error as bug
reported.
But other thing, CC will write on also Communication@history but when already
mail id as there, it will again write the CC , means the mail id is duplicated.
Please try this scenario.
1) Create a (base_action_rule) automated action with CC ([email protected], abc@com)
2) Just fix the object name on crm_action rule.py (action.act_email_cc instead
of obj.act_email_cc)
3) Create a project issue and set ([email protected], abc@com) on CC.
4) Check when automated action runs the mail id is duplicated.
I have checked all the condition when email is same or not.This will will solve
the problem.
Thanks!
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-943410-amp/+merge/100947
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-943410-amp.
=== modified file 'crm/crm_action_rule.py'
--- crm/crm_action_rule.py 2012-08-10 14:43:39 +0000
+++ crm/crm_action_rule.py 2012-08-31 12:46:29 +0000
@@ -99,10 +99,17 @@
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
+ action_emails = action.act_email_cc.split(",")
+ match_email =''
+ for action_email in action_emails:
+ if action_email in emails:
+ match_email = match_email
+ else:
+ match_email = match_email + action_email + ','
+
+ write['email_cc'] = obj.email_cc + ',' + match_email
+ else :
+ write['email_cc'] = action.act_email_cc
# Put state change by rule in communication history
if hasattr(obj, 'state') and hasattr(obj, 'message_append') and action.act_state:
_______________________________________________
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