[IMP] moved openerpweb into base.common to be renamed web.commom
[odoo/odoo.git] / addons / base_action_rule / base_action_rule.py
index 7494cb3..2db23e7 100644 (file)
@@ -277,8 +277,10 @@ the rule to mark CC(mail to any other person defined in actions)."),
             'object_date': hasattr(obj, 'date') and obj.date or False, 
             'object_description': hasattr(obj, 'description') and obj.description or False, 
             'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/', 
-            'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.user_email) or '/', 
-            'object_user_phone': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and           obj.partner_address_id.phone) or '/', 
+            'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and \
+                                     obj.user_id.user_email) or '/',
+            'object_user_phone': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and \
+                                     obj.partner_address_id.phone) or '/',
             'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/', 
             'partner_email': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and\
                                          obj.partner_address_id.email) or '/', 
@@ -302,8 +304,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
 
         body = self.format_mail(obj, body)
         if not emailfrom:
-            if hasattr(obj, 'user_id')  and obj.user_id and\
-                        obj.user_id.user_email:
+            if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.user_email:
                 emailfrom = obj.user_id.user_email
 
         name = '[%d] %s' % (obj.id, tools.ustr(obj.name))