Merge lp:~openerp-dev/openobject-addons/6.1-opw-575089-dhs into lp:openobject-addons/6.1

Proposed by Dhruti Shastri(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-575089-dhs
Merge into: lp:openobject-addons/6.1
Diff against target: 46 lines (+15/-5)
2 files modified
base_action_rule/base_action_rule.py (+12/-2)
crm/crm_action_rule.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-575089-dhs
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+106966@code.launchpad.net

Description of the change

To reproduce,

1) Install crm_claim
2) Define Automated Action having value in "Add Watchers"
3) True the Boolean field "Mail To Watchers"
4) Create claim

It will raise following error:

AttributeError: "Field 'act_email_cc' does not exist in object 'browse_record(crm.claim, 2)'"

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6807. By Dhruti Shastri(OpenERP)

[crm_claim] : act_email_cc Field not found in crm_claim when automated action is defined' (Case:575089)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_action_rule/base_action_rule.py'
2--- base_action_rule/base_action_rule.py 2012-04-26 08:03:00 +0000
3+++ base_action_rule/base_action_rule.py 2012-05-23 09:13:21 +0000
4@@ -432,12 +432,22 @@
5 }
6
7 if action.act_email_to:
8- emails.append(safe_eval(action.act_email_to, {}, locals_for_emails))
9+ email_to = tools.ustr(action.act_email_to)
10+ try:
11+ email_to = safe_eval(tools.ustr(action.act_email_to), {}, locals_for_emails)
12+ except:
13+ pass
14+ emails.append(email_to)
15
16 emails = filter(None, emails)
17 if len(emails) and action.act_mail_body:
18 emails = list(set(emails))
19- email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
20+ from_email= tools.ustr(action.act_email_from)
21+ try:
22+ from_email= safe_eval(tools.ustr(action.act_email_from), {}, locals_for_emails)
23+ except:
24+ pass
25+ email_from = from_email
26
27 def to_email(text):
28 return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
29
30=== modified file 'crm/crm_action_rule.py'
31--- crm/crm_action_rule.py 2012-03-16 14:42:51 +0000
32+++ crm/crm_action_rule.py 2012-05-23 09:13:21 +0000
33@@ -99,10 +99,10 @@
34 if hasattr(obj, 'email_cc') and action.act_email_cc:
35 if '@' in (obj.email_cc or ''):
36 emails = obj.email_cc.split(",")
37- if obj.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
38- write['email_cc'] = obj.email_cc + ',' + obj.act_email_cc
39+ if action.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
40+ write['email_cc'] = obj.email_cc + ',' + action.act_email_cc
41 else:
42- write['email_cc'] = obj.act_email_cc
43+ write['email_cc'] = action.act_email_cc
44
45 # Put state change by rule in communication history
46 if hasattr(obj, 'state') and hasattr(obj, 'message_append') and action.act_state: