=== 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-01-24 13:29:08 +0000 @@ -234,7 +234,6 @@ rule_pool = self.pool.get('base.action.rule') rule_ids = rule_pool.search(cr, uid, [], context=context) self._register_hook(cr, uid, rule_ids, context=context) - rules = self.browse(cr, uid, rule_ids, context=context) for rule in rules: model = rule.model_id.model @@ -369,8 +368,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(reg_name) + _result = ptrn.search(obj.name) if not _result: result_name = False regex_n = not reg_name or result_name @@ -460,7 +459,6 @@ context.update({'action': True}) if not scrit: scrit = [] - for action in self.browse(cr, uid, ids, context=context): for obj in objects: if self.do_check(cr, uid, action, obj, context=context): === modified file 'mail/mail_message.py' --- mail/mail_message.py 2011-12-19 16:54:40 +0000 +++ mail/mail_message.py 2012-01-24 13:14:32 +0000 @@ -453,7 +453,9 @@ msg['body_text'] = body msg['attachments'] = attachments - + # For encoding trouble: encode the string in unicode, ignoring unkown byte + if 'body_html' in msg and isinstance(msg['body_html'],str): + msg['body_html'] = unicode(msg['body_html'], errors='ignore') # for backwards compatibility: msg['body'] = msg['body_text'] msg['sub_type'] = msg['subtype'] or 'plain'