Merge lp:~openerp-dev/openobject-addons/6.0-opw-382010-rha into lp:openobject-addons/6.0

Proposed by Rifakat Husen (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 5058
Merged at revision: 5075
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-382010-rha
Merge into: lp:openobject-addons/6.0
Diff against target: 30 lines (+4/-4)
2 files modified
base_action_rule/base_action_rule.py (+2/-2)
crm/crm_action_rule.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-382010-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Rifakat Husen (OpenERP) (community) Needs Resubmitting
Review via email: mp+91264@code.launchpad.net

Description of the change

Hello,

It raises encoding error while Regex has non string character in "Automated Actions" (base_action_rule).

Kindly review this.

Thanks,
Rifakat

To post a comment you must log in.
5031. By Olivier Laurent (Open ERP)

[FIX] opw 50985

5032. By Olivier Laurent (Open ERP)

[FIX] opw 50985

5033. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5034. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5035. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5036. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5037. By tfr (Openerp)

[FIX] use employee id to lookup into the user table, now use the corresponding user_id

5038. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5040. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5041. By nel

[MERGE]

5042. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5043. By Stephane Wirtel (OpenERP)

[FIX] web_uservoice: Fix the reference about the translation

5044. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5045. By Olivier Laurent (Open ERP)

[FIX] opw 382100

5046. By tfr (Openerp)

[MERGE] opw 18200 : don't erase unit price when erasing the product in invoice line

5047. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5048. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5049. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5050. By tfr (Openerp)

[FIX] OPW 17161 : don't use the same relational field for two different osv_memory, avoid to mess up 'foreign key'

5051. By tfr (Openerp)

[REVERT] 5050

5052. By tfr (Openerp)

[FIX] mess up relation filled in picking wizard + solve key error 'wizard_pick_id', this error is due to the implementation of the read for one2many field in osv_memory, if a field in osv_memory is never written, the key is not present in the dict (representation of osv_memory) then we get the error key Error,
the workarount is defining default value for missing key (fields) in the osv_memory during the read, the correct fix should be done in the orm

5053. By nel

[MERGE]

5054. By nel

[MERGE]

5055. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

5056. By Olivier Laurent (Open ERP)

[FIX] fix needed for opw 51206. Is linked to a server fix for csv import

5057. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello

instead of removing the str you could use tools.ustr.

secondly there still other places where you need to change like in crm/crm_action_rule.py

Thanks,

review: Needs Fixing
5058. By Rifakat Husen (OpenERP)

[FIX] crm, base_action_rule: fix for the regex conversion

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Improved code as per your suggestion.

Please review it,
Rifakat

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

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-01-24 10:00:44 +0000
3+++ base_action_rule/base_action_rule.py 2012-02-15 11:06:20 +0000
4@@ -356,8 +356,8 @@
5 reg_name = action.regex_name
6 result_name = True
7 if reg_name:
8- ptrn = re.compile(str(reg_name))
9- _result = ptrn.search(str(obj.name))
10+ ptrn = re.compile(tools.ustr(reg_name))
11+ _result = ptrn.search(tools.ustr(obj.name))
12 if not _result:
13 result_name = False
14 regex_n = not reg_name or result_name
15
16=== modified file 'crm/crm_action_rule.py'
17--- crm/crm_action_rule.py 2011-01-14 00:11:01 +0000
18+++ crm/crm_action_rule.py 2012-02-15 11:06:20 +0000
19@@ -84,9 +84,9 @@
20 result_history = True
21 if regex:
22 res = False
23- ptrn = re.compile(str(regex))
24+ ptrn = re.compile(tools.ustr(regex))
25 for history in obj.message_ids:
26- _result = ptrn.search(str(history.name))
27+ _result = ptrn.search(tools.ustr(history.name))
28 if _result:
29 res = True
30 break