Kuldeep Joshi(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-921442-kjo into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #921442 in OpenERP Addons: "[6.0/trunk] Encoding trouble in mail_message 
parsing and base_action_rule processing"
  https://bugs.launchpad.net/openobject-addons/+bug/921442

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-921442-kjo/+merge/92248

Encoding trouble in mail_message parsing and base_action_rule processin
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-921442-kjo/+merge/92248
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-921442-kjo.
=== 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-02-09 11:20:26 +0000
@@ -28,6 +28,7 @@
 import re
 import time
 import tools
+from openerp.loglevels import ustr 
 
 
 def get_datetime(date_field):
@@ -369,8 +370,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(ustr(reg_name))
+            _result = ptrn.search(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-02-09 11:20:26 +0000
@@ -27,6 +27,7 @@
 from osv import osv
 
 import crm
+from openerp.loglevels import ustr 
 
 class base_action_rule(osv.osv):
     """ Base Action Rule """
@@ -73,9 +74,9 @@
         regex = action.regex_history
         if regex:
             res = False
-            ptrn = re.compile(str(regex))
+            ptrn = re.compile(ustr(regex))
             for history in obj.message_ids:
-                _result = ptrn.search(str(history.name))
+                _result = ptrn.search(ustr(history.subject))
                 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