Xavier ALT (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-382010-xal into 
lp:openobject-addons/6.1.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-382010-xal/+merge/95549


Hi,

This is a forward-port of v6.0 [OPW 382010], related to LP #921442.

Force conversion to unicode to handle case when regex contains non string 
characters.

Thanks,
Xavier
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-382010-xal/+merge/95549
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/6.1-opw-382010-xal into 
lp:openobject-addons/6.1.
=== 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-02 12:32:18 +0000
@@ -369,8 +369,8 @@
         reg_name = action.regex_name
         result_name = True
         if reg_name:
-            ptrn = re.compile(str(reg_name))
-            _result = ptrn.search(str(obj.name))
+            ptrn = re.compile(tools.ustr(reg_name))
+            _result = ptrn.search(tools.ustr(obj.name))
             if not _result:
                 result_name = False
         regex_n = not reg_name or result_name

=== modified file 'crm/crm_action_rule.py'
--- crm/crm_action_rule.py	2011-12-20 15:29:31 +0000
+++ crm/crm_action_rule.py	2012-03-02 12:32:18 +0000
@@ -73,9 +73,9 @@
         regex = action.regex_history
         if regex:
             res = False
-            ptrn = re.compile(str(regex))
+            ptrn = re.compile(tools.ustr(regex))
             for history in obj.message_ids:
-                _result = ptrn.search(str(history.name))
+                _result = ptrn.search(tools.ustr(history.name))
                 if _result:
                     res = True
                     break

_______________________________________________
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