Thibault Delavallée (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-openchatter-3-5-user-partner-inherit-tde
 into lp:~openerp-dev/openobject-addons/trunk-openchatter-3-5-tde.

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

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-openchatter-3-5-user-partner-inherit-tde/+merge/118706

OpenChatter intra feature branch.

User inherits from partner. Addons-side branch :
- user_email -> email
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-openchatter-3-5-user-partner-inherit-tde/+merge/118706
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-openchatter-3-5-user-partner-inherit-tde
 into lp:~openerp-dev/openobject-addons/trunk-openchatter-3-5-tde.
=== modified file 'account/edi/invoice_action_data.xml'
--- account/edi/invoice_action_data.xml	2012-05-25 15:17:40 +0000
+++ account/edi/invoice_action_data.xml	2012-08-08 10:25:48 +0000
@@ -38,7 +38,7 @@
         <!--Email template -->
         <record id="email_template_edi_invoice" model="email.template">
             <field name="name">Automated Invoice Notification Mail</field>
-            <field name="email_from">${object.user_id.user_email or object.company_id.email or 'noreply@localhost'}</field>
+            <field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field>
             <field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
             <field name="email_to">${object.partner_id.email or ''}</field>
             <field name="model_id" ref="account.model_account_invoice"/>
@@ -58,7 +58,7 @@
        % if object.origin:
        &nbsp;&nbsp;Order reference: ${object.origin}<br />
        % endif
-       &nbsp;&nbsp;Your contact: <a href="mailto:${object.user_id.user_email or ''}?subject=Invoice%20${object.number}">${object.user_id.name}</a>
+       &nbsp;&nbsp;Your contact: <a href="mailto:${object.user_id.email or ''}?subject=Invoice%20${object.number}">${object.user_id.name}</a>
     </p>  
     
     <p>
@@ -133,7 +133,7 @@
        % if object.origin:
        | Order reference: ${object.origin}
        % endif
-       | Your contact: ${object.user_id.name} ${object.user_id.user_email and '<%s>'%(object.user_id.user_email) or ''}
+       | Your contact: ${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
 
 You can view the invoice document, download it and pay online using the following link:
     ${ctx.get('edi_web_url_view') or 'n/a'}
@@ -160,7 +160,7 @@
 
 
 --
-${object.user_id.name} ${object.user_id.user_email and '<%s>'%(object.user_id.user_email) or ''}
+${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
 ${object.company_id.name}
 % if object.company_id.street:
 ${object.company_id.street or ''}

=== modified file 'account_analytic_analysis/cron_account_analytic_account.py'
--- account_analytic_analysis/cron_account_analytic_account.py	2012-03-27 13:04:46 +0000
+++ account_analytic_analysis/cron_account_analytic_account.py	2012-08-08 10:25:48 +0000
@@ -53,7 +53,7 @@
             ('name', 'not ilike', 'maintenance'),
             ('partner_id', '!=', False),
             ('user_id', '!=', False),
-            ('user_id.user_email', '!=', False),
+            ('user_id.email', '!=', False),
             ('state', 'in', ('draft', 'open')),
             '|', ('date',  '<', time.strftime('%Y-%m-%d')), ('date', '=', False),
         ]
@@ -70,7 +70,7 @@
         for user, data in users.iteritems():
             subject = '[OPENERP] Reporting: Analytic Accounts'
             body = Template(MAKO_TEMPLATE).render_unicode(user=user, partners=data)
-            tools.email_send('[email protected]', [user.user_email, ], subject, body)
+            tools.email_send('[email protected]', [user.email, ], subject, body)
 
         return True
 

=== modified file 'base_action_rule/base_action_rule.py'
--- base_action_rule/base_action_rule.py	2012-06-25 13:42:53 +0000
+++ base_action_rule/base_action_rule.py	2012-08-08 10:25:48 +0000
@@ -292,7 +292,7 @@
             '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 '/',
+                                     obj.user_id.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 '/',
@@ -319,8 +319,8 @@
         mail_message = self.pool.get('mail.message')
         body = self.format_mail(obj, body)
         if not emailfrom:
-            if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.user_email:
-                emailfrom = obj.user_id.user_email
+            if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
+                emailfrom = obj.user_id.email
 
         name = '[%d] %s' % (obj.id, tools.ustr(obj.name))
         emailfrom = tools.ustr(emailfrom)
@@ -419,7 +419,7 @@
         emails = []
         if hasattr(obj, 'user_id') and action.act_mail_to_user:
             if obj.user_id:
-                emails.append(obj.user_id.user_email)
+                emails.append(obj.user_id.email)
 
         if action.act_mail_to_watchers:
             emails += (action.act_email_cc or '').split(',')

=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py	2012-07-25 16:58:56 +0000
+++ base_calendar/base_calendar.py	2012-08-08 10:25:48 +0000
@@ -245,7 +245,7 @@
                     continue
                 else:
                     result[id][name] = self._get_address(attdata.sent_by_uid.name, \
-                                        attdata.sent_by_uid.user_email)
+                                        attdata.sent_by_uid.email)
 
             if name == 'cn':
                 if attdata.user_id:
@@ -434,7 +434,7 @@
             if not organizer:
                 organizer = event_obj.user_id
             event_org.params['CN'] = [organizer.name]
-            event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
+            event_org.value = 'MAILTO:' + (organizer.email or organizer.name)
 
         if event_obj.alarm_id:
             # computes alarm data
@@ -535,7 +535,7 @@
             return {'value': {'email': ''}}
         usr_obj = self.pool.get('res.users')
         user = usr_obj.browse(cr, uid, user_id, *args)
-        return {'value': {'email': user.user_email, 'availability':user.availability}}
+        return {'value': {'email': user.email, 'availability':user.availability}}
 
     def do_tentative(self, cr, uid, ids, context=None, *args):
         """ Makes event invitation as Tentative
@@ -891,9 +891,9 @@
 
 """  % (alarm.name, alarm.trigger_date, alarm.description, \
                         alarm.user_id.name, alarm.user_id.signature)
-                    mail_to = [alarm.user_id.user_email]
+                    mail_to = [alarm.user_id.email]
                     for att in alarm.attendee_ids:
-                        mail_to.append(att.user_id.user_email)
+                        mail_to.append(att.user_id.email)
                     if mail_to:
                         mail_message.schedule_with_attach(cr, uid,
                             tools.config.get('email_from', False),
@@ -1097,8 +1097,8 @@
         user_pool = self.pool.get('res.users')
         user = user_pool.browse(cr, uid, uid, context=context)
         res = user.name
-        if user.user_email:
-            res += " <%s>" %(user.user_email)
+        if user.email:
+            res += " <%s>" %(user.email)
         return res
 
     _defaults = {

=== modified file 'base_calendar/wizard/base_calendar_invite_attendee.py'
--- base_calendar/wizard/base_calendar_invite_attendee.py	2012-07-20 13:46:54 +0000
+++ base_calendar/wizard/base_calendar_invite_attendee.py	2012-08-08 10:25:48 +0000
@@ -99,12 +99,12 @@
                     user = user_obj.browse(cr, uid, user_id)
                     res = {
                            'user_id': user_id,
-                           'email': user.user_email
+                           'email': user.email
                            }
                     res.update(ref)
                     vals.append(res)
-                    if user.user_email:
-                        mail_to.append(user.user_email)
+                    if user.email:
+                        mail_to.append(user.email)
 
             elif  type == 'external' and datas.get('email'):
                 res = {'email': datas['email']}
@@ -143,7 +143,7 @@
                                        self._columns['type'].selection))
                     raise osv.except_osv(_('Error!'), _("%s must have an email  address to send mail") %(name[0]))
                 att_obj._send_mail(cr, uid, attendees, mail_to, \
-                       email_from = current_user.user_email or tools.config.get('email_from', False))
+                       email_from = current_user.email or tools.config.get('email_from', False))
 
         return {'type': 'ir.actions.act_window_close'}
 

=== modified file 'base_status/base_stage.py'
--- base_status/base_stage.py	2012-06-11 05:36:44 +0000
+++ base_status/base_stage.py	2012-08-08 10:25:48 +0000
@@ -57,7 +57,7 @@
         if not context or not context.get('portal'):
             return False
         user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
-        return user.user_email
+        return user.email
 
     def _get_default_user(self, cr, uid, context=None):
         """ Gives current user id
@@ -301,15 +301,15 @@
         for case in self.browse(cr, uid, ids, context=context):
             if not destination and not case.email_from:
                 return False
-            if not case.user_id.user_email:
+            if not case.user_id.email:
                 return False
             if destination and case.section_id.user_id:
-                case_email = case.section_id.user_id.user_email
+                case_email = case.section_id.user_id.email
             else:
-                case_email = case.user_id.user_email
+                case_email = case.user_id.email
 
             src = case_email
-            dest = case.user_id.user_email or ""
+            dest = case.user_id.email or ""
             body = case.description or ""
             for message in case.message_ids:
                 if message.email_from and message.body_text:
@@ -366,8 +366,8 @@
             l=[]
             if case.email_cc:
                 l.append(case.email_cc)
-            if case.user_id and case.user_id.user_email:
-                l.append(case.user_id.user_email)
+            if case.user_id and case.user_id.email:
+                l.append(case.user_id.email)
             res[case.id] = l
         return res
     

=== modified file 'base_status/base_state.py'
--- base_status/base_state.py	2012-07-04 14:10:42 +0000
+++ base_status/base_state.py	2012-08-08 10:25:48 +0000
@@ -55,7 +55,7 @@
         if not context or not context.get('portal'):
             return False
         user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
-        return user.user_email
+        return user.email
 
     def _get_default_user(self, cr, uid, context=None):
         """ Gives current user id

=== modified file 'crm/crm_action_rule.py'
--- crm/crm_action_rule.py	2012-08-06 00:44:17 +0000
+++ crm/crm_action_rule.py	2012-08-08 10:25:48 +0000
@@ -49,8 +49,8 @@
         mail_message = self.pool.get('mail.message')
         body = self.format_mail(obj, body)
         if not emailfrom:
-            if hasattr(obj, 'user_id')  and obj.user_id and obj.user_id.user_email:
-                emailfrom = obj.user_id.user_email
+            if hasattr(obj, 'user_id')  and obj.user_id and obj.user_id.email:
+                emailfrom = obj.user_id.email
 
         name = '[%d] %s' % (obj.id, tools.ustr(obj.name))
         emailfrom = tools.ustr(emailfrom)

=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py	2012-08-06 07:56:24 +0000
+++ crm/crm_lead.py	2012-08-08 10:25:48 +0000
@@ -243,7 +243,7 @@
         'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True),
         'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True),
         'company_currency': fields.related('company_id', 'currency_id', 'symbol', type='char', string='Company Currency', readonly=True),
-        'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
+        'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
         'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),
 
         # Fields for address, due to separation from crm and res.partner
@@ -685,11 +685,11 @@
         """
         #TOFIX: mail template should be used here instead of fix subject, body text.
         message = self.pool.get('mail.message')
-        email_to = lead.user_id and lead.user_id.user_email
+        email_to = lead.user_id and lead.user_id.email
         if not email_to:
             return False
 
-        email_from = lead.section_id and lead.section_id.user_id and lead.section_id.user_id.user_email or email_to
+        email_from = lead.section_id and lead.section_id.user_id and lead.section_id.user_id.email or email_to
         partner = lead.partner_id and lead.partner_id.name or lead.partner_name
         subject = "lead %s converted into opportunity" % lead.name
         body = "Info \n Id : %s \n Subject: %s \n Partner: %s \n Description : %s " % (lead.id, lead.name, lead.partner_id.name, lead.description)

=== modified file 'crm_partner_assign/wizard/crm_forward_to_partner.py'
--- crm_partner_assign/wizard/crm_forward_to_partner.py	2012-04-02 08:57:18 +0000
+++ crm_partner_assign/wizard/crm_forward_to_partner.py	2012-08-08 10:25:48 +0000
@@ -80,7 +80,7 @@
         partner = partner_obj.browse(cr, uid, [partner_id])
         user_id = partner and partner[0].user_id or False
         data.update({'email_from': partner and partner[0].email or "", 
-                     'email_cc' : user_id and user_id.user_email or '', 
+                     'email_cc' : user_id and user_id.user or '', 
                      'user_id': user_id and user_id.id or False})
         return {'value' : data}
 
@@ -185,7 +185,7 @@
             if partner_assigned_id:
                 assigned_partner = partner.browse(cr, uid, partner_assigned_id, context=context)
                 user_id = assigned_partner.user_id and assigned_partner.user_id.id or False
-                email_cc = assigned_partner.user_id and assigned_partner.user_id.user_email or ''
+                email_cc = assigned_partner.user_id and assigned_partner.user_id.email or ''
                 email = assigned_partner.email
             
             res.update({

=== modified file 'event/email_template.xml'
--- event/email_template.xml	2012-02-28 18:00:11 +0000
+++ event/email_template.xml	2012-08-08 10:25:48 +0000
@@ -4,7 +4,7 @@
         <record id="confirmation_event" model="email.template">
         <field name="name">Confirmation of the Event</field>
         <field name="model_id" ref="event.model_event_registration"/>
-        <field name="email_from" >${object.user_id.user_email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'}</field>
+        <field name="email_from" >${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'}</field>
         <field name="email_to" >${object.email}</field>
         <field name="subject">Your registration at ${object.event_id.name}</field>
         <field name="body_text">
@@ -24,7 +24,7 @@
         <record id="confirmation_registration" model="email.template">
         <field name="name">Confirmation of the Registration</field>
         <field name="model_id" ref="event.model_event_registration"/>
-        <field name="email_from" >${object.user_id.user_email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'}</field>
+        <field name="email_from" >${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'}</field>
         <field name="email_to" >${object.email}</field>
         <field name="subject">Your registration at ${object.event_id.name}</field>
         <field name="body_text">

=== modified file 'event/event.py'
--- event/event.py	2012-07-25 15:24:55 +0000
+++ event/event.py	2012-08-08 10:25:48 +0000
@@ -230,7 +230,7 @@
         curr_reg_ids = register_pool.search(cr, uid, [('user_id', '=', user.id), ('event_id', '=' , ids[0])])
         #the subscription is done with SUPERUSER_ID because in case we share the kanban view, we want anyone to be able to subscribe
         if not curr_reg_ids:
-            curr_reg_ids = [register_pool.create(cr, SUPERUSER_ID, {'event_id': ids[0] ,'email': user.user_email, 'name':user.name, 'user_id': user.id, 'nb_register': num_of_seats})]
+            curr_reg_ids = [register_pool.create(cr, SUPERUSER_ID, {'event_id': ids[0] ,'email': user.email, 'name':user.name, 'user_id': user.id, 'nb_register': num_of_seats})]
         else:
             register_pool.write(cr, uid, curr_reg_ids, {'nb_register': num_of_seats}, context=context)
         return register_pool.confirm_registration(cr, SUPERUSER_ID, curr_reg_ids, context=context)

=== modified file 'hr/hr.py'
--- hr/hr.py	2012-08-07 16:22:16 +0000
+++ hr/hr.py	2012-08-08 10:25:48 +0000
@@ -252,7 +252,7 @@
     def onchange_user(self, cr, uid, ids, user_id, context=None):
         work_email = False
         if user_id:
-            work_email = self.pool.get('res.users').browse(cr, uid, user_id, context=context).user_email
+            work_email = self.pool.get('res.users').browse(cr, uid, user_id, context=context).email
         return {'value': {'work_email' : work_email}}
 
     def _get_default_image(self, cr, uid, context=None):

=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py	2012-08-06 10:28:54 +0000
+++ hr_recruitment/hr_recruitment.py	2012-08-08 10:25:48 +0000
@@ -228,7 +228,7 @@
                                 multi='day_close', type="float", store=True),
         'color': fields.integer('Color Index'),
         'emp_id': fields.many2one('hr.employee', 'employee'),
-        'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
+        'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
     }
 
     _defaults = {

=== modified file 'import_sugarcrm/import_sugarcrm.py'
--- import_sugarcrm/import_sugarcrm.py	2012-07-02 11:27:50 +0000
+++ import_sugarcrm/import_sugarcrm.py	2012-08-08 10:25:48 +0000
@@ -898,7 +898,7 @@
                 'context_lang' : 'context_lang',
                 'password' : 'password',
                 '.id' : '.id',
-                'user_email' : 'email1',
+                'email' : 'email1',
             }
         }
 
@@ -964,7 +964,7 @@
     }
     
     def _get_email_id(self, cr, uid, context=None):
-        return self.pool.get('res.users').browse(cr, uid, uid, context=context).user_email
+        return self.pool.get('res.users').browse(cr, uid, uid, context=context).email
     
     def _module_installed(self, cr, uid, model, context=None):
         module_id = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', model), ('state', "=", "installed")], context=context)

=== modified file 'lunch/report/order.rml'
--- lunch/report/order.rml	2011-12-21 09:08:11 +0000
+++ lunch/report/order.rml	2012-08-08 10:25:48 +0000
@@ -103,7 +103,7 @@
         <td>
           <para style="terp_default_8">[[ user.name ]] </para>
           <para style="terp_default_8">[[ user.login  ]]</para>
-          <para style="terp_default_8">[[ user.user_email ]]</para>
+          <para style="terp_default_8">[[ user.email ]]</para>
         </td>
       </tr>
     </blockTable>

=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py	2012-08-07 14:05:10 +0000
+++ mail/mail_thread.py	2012-08-08 10:25:48 +0000
@@ -330,7 +330,7 @@
                     'email_to': email_to,
                     # FIXME: virer hasattr, et puis en plus cette ligne est débile, il y a un email_from
                     'email_from': email_from or \
-                        (hasattr(thread, 'user_id') and thread.user_id and thread.user_id.user_email),
+                        (hasattr(thread, 'user_id') and thread.user_id and thread.user_id.email),
                     'email_cc': email_cc,
                     'email_bcc': email_bcc,
                     'references': references,
@@ -753,7 +753,7 @@
         for thread in self.browse(cr, uid, ids, context=context):
             l = set()
             for message in thread.message_ids:
-                l.add((message.user_id and message.user_id.user_email) or '')
+                l.add((message.user_id and message.user_id.email) or '')
                 l.add(message.email_from or '')
                 l.add(message.email_cc or '')
             res[thread.id] = filter(None, l)
@@ -966,9 +966,9 @@
             if not user.notification_email_pref == 'all' and \
                 not (user.notification_email_pref == 'to_me' and user.id in user_to_push_from_parse_ids):
                 continue
-            if not user.user_email:
+            if not user.email:
                 continue
-            email_to = '%s, %s' % (email_to, user.user_email)
+            email_to = '%s, %s' % (email_to, user.email)
             email_to = email_to.lstrip(', ')
         
         # did not find any email address: not necessary to create an email
@@ -979,7 +979,7 @@
         user_writer = res_users_obj.browse(cr, uid, [uid], context=context)[0]
         email_from = message.email_from
         if not email_from:
-            email_from = user_writer.user_email
+            email_from = user_writer.email
         
         # get email content, create it using directly mail_message.create
         email_values = self.message_notification_get_email_dict(cr, uid, thread_record, message, user_writer, email_from, email_to, context=context)

=== modified file 'mail/res_users_view.xml'
--- mail/res_users_view.xml	2012-08-07 13:38:53 +0000
+++ mail/res_users_view.xml	2012-08-08 10:25:48 +0000
@@ -9,7 +9,7 @@
             <field name="inherit_id" ref="base.view_users_form_simple_modif"/>
             <field name="arch" type="xml">
             <data>
-                <field name="user_email" position="before">
+                <field name="email" position="before">
                     <field name="notification_email_pref" readonly="0"/>
                 </field>
             </data>
@@ -23,7 +23,7 @@
             <field name="inherit_id" ref="base.view_users_form"/>
             <field name="arch" type="xml">
             <data>
-                <field name="user_email" position="before">
+                <field name="email" position="before">
                     <field name="notification_email_pref"/>
                 </field>
                 <xpath expr="/form/sheet" position="after">
@@ -31,7 +31,7 @@
                         <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
                     </div>
                 </xpath>
-                <field name="user_email" position="after">
+                <field name="email" position="after">
                     <field name="alias_domain" invisible="1"/>
                     <field name="alias_id" readonly="1" attrs="{'invisible': [('alias_domain', '=', False)]}"/>
                 </field>

=== modified file 'mail/wizard/mail_compose_message.py'
--- mail/wizard/mail_compose_message.py	2012-08-06 07:31:26 +0000
+++ mail/wizard/mail_compose_message.py	2012-08-08 10:25:48 +0000
@@ -103,7 +103,7 @@
         # Try to provide default email_from if not specified yet
         if not result.get('email_from'):
             current_user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
-            result['email_from'] = current_user.user_email or False
+            result['email_from'] = current_user.email or False
         return result
 
     _columns = {
@@ -137,7 +137,7 @@
         result.update({
             'model': model,
             'res_id': res_id,
-            'email_from': user.user_email or tools.config.get('email_from', False),
+            'email_from': user.email or tools.config.get('email_from', False),
             'body_html': False,
             'body_text': False,
             'subject': False,
@@ -198,7 +198,7 @@
             'dest_partner_ids': dest_partner_ids,
             'model': message_data.model or False,
             'res_id': message_data.res_id or False,
-            'email_from': current_user.user_email or message_data.email_to or False,
+            'email_from': current_user.email or message_data.email_to or False,
             'email_to': message_data.reply_to or message_data.email_from or False,
             'email_cc': message_data.email_cc or False,
             'user_id': uid,

=== modified file 'portal/wizard/portal_wizard.py'
--- portal/wizard/portal_wizard.py	2012-08-02 08:06:40 +0000
+++ portal/wizard/portal_wizard.py	2012-08-08 10:25:48 +0000
@@ -26,7 +26,6 @@
 from tools.misc import email_re
 from tools.translate import _
 
-from base.res.res_users import _lang_get
 _logger = logging.getLogger(__name__)
 
 
@@ -130,7 +129,7 @@
         mail_message_obj = self.pool.get('mail.message')
 
         user = user_obj.browse(cr, ROOT_UID, uid, context=context)
-        if not user.user_email:
+        if not user.email:
             raise osv.except_osv(_('Email required'),
                 _('You must have an email address in your User Preferences'
                   ' to send emails.'))
@@ -147,7 +146,7 @@
                     'name': partner.name,
                     'login': partner.email,
                     'password': random_password(),
-                    'user_email': partner.email,
+                    'email': partner.email,
                     'context_lang': partner.lang,
                     'share': True,
                     'action_id': wiz.portal_id.home_action_id and wiz.portal_id.home_action_id.id or False,
@@ -172,8 +171,8 @@
                 data['password'] = dest_user.password
                 data['name'] = dest_user.name
                 
-                email_from = user.user_email
-                email_to = dest_user.user_email
+                email_from = user.email
+                email_to = dest_user.email
                 subject = _(WELCOME_EMAIL_SUBJECT) % data
                 body = _(WELCOME_EMAIL_BODY) % data
                 res = mail_message_obj.schedule_with_attach(cr, uid, email_from , [email_to], subject, body, context=partner_context)

=== modified file 'portal_crm/wizard/contact.py'
--- portal_crm/wizard/contact.py	2012-07-27 12:25:39 +0000
+++ portal_crm/wizard/contact.py	2012-08-08 10:25:48 +0000
@@ -50,7 +50,7 @@
         user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
 
         if (user.login != 'anonymous'):
-            return user.user_email
+            return user.email
         else:
             return None
 

=== modified file 'project/project.py'
--- project/project.py	2012-08-06 20:07:10 +0000
+++ project/project.py	2012-08-08 10:25:48 +0000
@@ -791,7 +791,7 @@
         'company_id': fields.many2one('res.company', 'Company'),
         'id': fields.integer('ID', readonly=True),
         'color': fields.integer('Color Index'),
-        'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
+        'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
     }
 
     _defaults = {

=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py	2012-08-06 20:07:10 +0000
+++ project_issue/project_issue.py	2012-08-08 10:25:48 +0000
@@ -256,7 +256,7 @@
         'inactivity_days': fields.function(_compute_day, string='Days since last action', \
                                 multi='compute_day', type="integer", help="Difference in days between last action and current date"),
         'color': fields.integer('Color Index'),
-        'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
+        'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
         'date_action_last': fields.datetime('Last Action', readonly=1),
         'date_action_next': fields.datetime('Next Action', readonly=1),
         'progress': fields.function(_hours_get, string='Progress (%)', multi='hours', group_operator="avg", help="Computed as: Time Spent / Total Time.",

=== modified file 'project_mailgate/project_mailgate.py'
--- project_mailgate/project_mailgate.py	2012-06-04 14:12:54 +0000
+++ project_mailgate/project_mailgate.py	2012-08-08 10:25:48 +0000
@@ -73,7 +73,7 @@
         followers = super(project_tasks,self).message_thread_followers(cr, uid, ids, context=context)
         for task in self.browse(cr, uid, followers.keys(), context=context):
             task_followers = set(followers[task.id])
-            task_followers.add(task.user_id.user_email)
+            task_followers.add(task.user_id.email)
             followers[task.id] = filter(None, task_followers)
         return followers
 

=== modified file 'purchase/edi/purchase_order_action_data.xml'
--- purchase/edi/purchase_order_action_data.xml	2012-05-25 14:35:49 +0000
+++ purchase/edi/purchase_order_action_data.xml	2012-08-08 10:25:48 +0000
@@ -38,7 +38,7 @@
         <!--Email template -->
         <record id="email_template_edi_purchase" model="email.template">
             <field name="name">Automated Purchase Order Notification Mail</field>
-            <field name="email_from">${object.validator.user_email or ''}</field>
+            <field name="email_from">${object.validator.email or ''}</field>
             <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
             <field name="email_to">${object.partner_id.email}</field>
             <field name="model_id" ref="purchase.model_purchase_order"/>
@@ -61,7 +61,7 @@
        % if object.partner_ref:
        &nbsp;&nbsp;Your reference: ${object.partner_ref}<br />
        % endif
-       &nbsp;&nbsp;Your contact: <a href="mailto:${object.validator.user_email or ''}?subject=Order%20${object.name}">${object.validator.name}</a>
+       &nbsp;&nbsp;Your contact: <a href="mailto:${object.validator.email or ''}?subject=Order%20${object.name}">${object.validator.name}</a>
     </p>
 
     <p>
@@ -121,7 +121,7 @@
        % if object.partner_ref:
        | Your reference: ${object.partner_ref}<br />
        % endif
-       | Your contact: ${object.validator.name} ${object.validator.user_email and '<%s>'%(object.validator.user_email) or ''}
+       | Your contact: ${object.validator.name} ${object.validator.email and '<%s>'%(object.validator.email) or ''}
 
 You can view the ${object.state in ('draft', 'sent') and 'request for quotation' or 'order confirmation'} and download it using the following link:
     ${ctx.get('edi_web_url_view') or 'n/a'}
@@ -132,7 +132,7 @@
 
 
 --
-${object.validator.name} ${object.validator.user_email and '<%s>'%(object.validator.user_email) or ''}
+${object.validator.name} ${object.validator.email and '<%s>'%(object.validator.email) or ''}
 ${object.company_id.name}
 % if object.company_id.street:
 ${object.company_id.street or ''}

=== modified file 'sale/edi/sale_order_action_data.xml'
--- sale/edi/sale_order_action_data.xml	2012-05-25 14:35:49 +0000
+++ sale/edi/sale_order_action_data.xml	2012-08-08 10:25:48 +0000
@@ -37,7 +37,7 @@
         <!--Email template -->
         <record id="email_template_edi_sale" model="email.template">
             <field name="name">Automated Sale Order Notification Mail</field>
-            <field name="email_from">${object.user_id.user_email or ''}</field>
+            <field name="email_from">${object.user_id.email or ''}</field>
             <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
             <field name="email_to">${object.partner_invoice_id.email}</field>
             <field name="model_id" ref="sale.model_sale_order"/>
@@ -60,7 +60,7 @@
        % if object.client_order_ref:
        &nbsp;&nbsp;Your reference: ${object.client_order_ref}<br />
        % endif
-       &nbsp;&nbsp;Your contact: <a href="mailto:${object.user_id.user_email or ''}?subject=Order%20${object.name}">${object.user_id.name}</a>
+       &nbsp;&nbsp;Your contact: <a href="mailto:${object.user_id.email or ''}?subject=Order%20${object.name}">${object.user_id.name}</a>
     </p>
 
     <p>
@@ -139,7 +139,7 @@
        % if object.client_order_ref:
        | Your reference: ${object.client_order_ref}<br />
        % endif
-       | Your contact: ${object.user_id.name} ${object.user_id.user_email and '<%s>'%(object.user_id.user_email) or ''}
+       | Your contact: ${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
 
 You can view the ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'}, download it and even pay online using the following link:
     ${ctx.get('edi_web_url_view') or 'n/a'}
@@ -166,7 +166,7 @@
 
 
 --
-${object.user_id.name} ${object.user_id.user_email and '<%s>'%(object.user_id.user_email) or ''}
+${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
 ${object.company_id.name}
 % if object.company_id.street:
 ${object.company_id.street or ''}

=== modified file 'share/wizard/share_wizard.py'
--- share/wizard/share_wizard.py	2012-07-17 07:58:45 +0000
+++ share/wizard/share_wizard.py	2012-08-08 10:25:48 +0000
@@ -196,7 +196,7 @@
     }
 
     def has_email(self, cr, uid, context=None):
-        return bool(self.pool.get('res.users').browse(cr, uid, uid, context=context).user_email)
+        return bool(self.pool.get('res.users').browse(cr, uid, uid, context=context).email)
 
     def go_step_1(self, cr, uid, ids, context=None):
         wizard_data = self.browse(cr,uid,ids,context)[0]
@@ -241,7 +241,7 @@
                 if not wizard_data.invite:
                     existing = user_obj.search(cr, UID_ROOT, [('login', '=', new_user)])
                 else:
-                    existing = user_obj.search(cr, UID_ROOT, [('user_email', '=', new_user)])
+                    existing = user_obj.search(cr, UID_ROOT, [('email', '=', new_user)])
                 existing_ids.extend(existing)
                 if existing:
                     new_line = { 'user_id': existing[0],
@@ -253,7 +253,7 @@
                         'login': new_user,
                         'password': new_pass,
                         'name': new_user,
-                        'user_email': new_user,
+                        'email': new_user,
                         'groups_id': [(6,0,[group_id])],
                         'share': True,
                         'message_email_pref': 'all',
@@ -825,12 +825,12 @@
         message_obj = self.pool.get('mail.message')
         notification_obj = self.pool.get('mail.notification')
         user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
-        if not user.user_email:
+        if not user.email:
             raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
         
         # TODO: also send an HTML version of this mail
         for result_line in wizard_data.result_line_ids:
-            email_to = result_line.user_id.user_email
+            email_to = result_line.user_id.email
             if not email_to:
                 continue
             subject = _('Invitation to collaborate about %s') % (wizard_data.record_name)
@@ -849,20 +849,20 @@
             body += "--\n"
             body += _("OpenERP is a powerful and user-friendly suite of Business Applications (CRM, Sales, HR, etc.)\n"
                       "It is open source and can be found on http://www.openerp.com.";)
-            msg_id = message_obj.schedule_with_attach(cr, uid, user.user_email, [email_to], subject, body, model='', context=context)
+            msg_id = message_obj.schedule_with_attach(cr, uid, user.email, [email_to], subject, body, model='', context=context)
             notification_obj.create(cr, uid, {'user_id': result_line.user_id.id, 'message_id': msg_id}, context=context)
     
     def send_emails(self, cr, uid, wizard_data, context=None):
         _logger.info('Sending share notifications by email...')
         mail_message = self.pool.get('mail.message')
         user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
-        if not user.user_email:
+        if not user.email:
             raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
         
         # TODO: also send an HTML version of this mail
         msg_ids = []
         for result_line in wizard_data.result_line_ids:
-            email_to = result_line.user_id.user_email
+            email_to = result_line.user_id.email
             if not email_to:
                 continue
             subject = wizard_data.name
@@ -883,7 +883,7 @@
             body += "--\n"
             body += _("OpenERP is a powerful and user-friendly suite of Business Applications (CRM, Sales, HR, etc.)\n"
                       "It is open source and can be found on http://www.openerp.com.";)
-            msg_ids.append(mail_message.schedule_with_attach(cr, uid, user.user_email, [email_to], subject, body, model='share.wizard', context=context))
+            msg_ids.append(mail_message.schedule_with_attach(cr, uid, user.email, [email_to], subject, body, model='share.wizard', context=context))
         # force direct delivery, as users expect instant notification
         mail_message.send(cr, uid, msg_ids, context=context)
         _logger.info('%d share notification(s) sent.', len(msg_ids))

=== modified file 'signup/signup.py'
--- signup/signup.py	2012-07-25 19:55:40 +0000
+++ signup/signup.py	2012-08-08 10:25:48 +0000
@@ -4,7 +4,7 @@
     _inherit = 'res.users'
 
     _sql_constraints = [
-        ('email_uniq', 'UNIQUE (user_email)', 'You can not have two users with the same email!')
+        ('email_uniq', 'UNIQUE (email)', 'You can not have two users with the same email!')
     ]
 
 class signup_signup(osv.TransientModel):
@@ -29,7 +29,7 @@
         new_user = {
             'name': values['name'],
             'login': values['email'],
-            'user_email': values['email'],
+            'email': values['email'],
             'password': values['password'],
             'active': True,
         }

=== modified file 'survey/survey.py'
--- survey/survey.py	2012-07-10 11:07:40 +0000
+++ survey/survey.py	2012-08-08 10:25:48 +0000
@@ -740,7 +740,7 @@
         if user_id:
             user_obj = self.pool.get('res.users')
             user = user_obj.browse(cr, uid, user_id, context=context)
-            return {'value': {'email': user.user_email}}
+            return {'value': {'email': user.email}}
         return {}
 
 survey_request()

=== modified file 'survey/wizard/survey_answer.py'
--- survey/wizard/survey_answer.py	2012-06-25 13:42:53 +0000
+++ survey/wizard/survey_answer.py	2012-08-08 10:25:48 +0000
@@ -414,8 +414,8 @@
                         file.close()
                         os.remove(addons.get_module_resource('survey', 'report') + survey_data.title + ".pdf")
                         
-                        user_email = user_obj.browse(cr, uid, uid, context).user_email
-                        resp_email = survey_data.responsible_id and survey_data.responsible_id.user_email or False
+                        user_email = user_obj.browse(cr, uid, uid, context).email
+                        resp_email = survey_data.responsible_id and survey_data.responsible_id.email or False
 
                         if user_email and resp_email:
                             user_name = user_obj.browse(cr, uid, uid, context=context).name

_______________________________________________
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