← Back to team overview

savoirfairelinux-openerp team mailing list archive

lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions_firstname_lastname into lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions

 

elhadji.dem@xxxxxxxxxxxxxxxxxxxx has proposed merging lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions_firstname_lastname into lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions.

Requested reviews:
  Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter)

For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions_firstname_lastname/+merge/199965

[IMP] add fisrtname and lastname in user an employee form, display name= concatenate(firstname, lastname) in views, add i18n directory. In partner form, show firstname before lastname
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions_firstname_lastname/+merge/199965
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions.
=== modified file 'base_contact_by_functions/i18n/base_contact_by_functions.pot'
--- base_contact_by_functions/i18n/base_contact_by_functions.pot	2013-12-19 16:49:45 +0000
+++ base_contact_by_functions/i18n/base_contact_by_functions.pot	2013-12-23 16:41:59 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-12-19 16:17+0000\n"
-"PO-Revision-Date: 2013-12-19 11:18-0500\n"
+"POT-Creation-Date: 2013-12-20 21:44+0000\n"
+"PO-Revision-Date: 2013-12-20 16:44-0500\n"
 "Last-Translator: \n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -32,6 +32,11 @@
 msgstr ""
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "à"
+msgstr ""
+
+#. module: base_contact_by_functions
 #: field:functions,institution_id:0
 msgid "institution"
 msgstr ""
@@ -78,7 +83,7 @@
 
 #. module: base_contact_by_functions
 #: view:res.partner:0
-msgid "à"
+msgid "e.g. Sales Director"
 msgstr ""
 
 #. module: base_contact_by_functions
@@ -112,16 +117,21 @@
 msgstr ""
 
 #. module: base_contact_by_functions
-#: view:res.partner:0
-msgid "Phone:"
-msgstr ""
-
-#. module: base_contact_by_functions
 #: model:ir.model,name:base_contact_by_functions.model_res_institution_functions
 msgid "Institutions functions"
 msgstr ""
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Firstname"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,delivered_country:0
+msgid "Country Passport"
+msgstr ""
+
+#. module: base_contact_by_functions
 #: field:res.partner,other_contact_history_ids:0
 msgid "unknown"
 msgstr ""
@@ -154,6 +164,11 @@
 
 #. module: base_contact_by_functions
 #: view:res.partner:0
+msgid "lastname"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
 msgid "Address"
 msgstr ""
 
@@ -168,6 +183,11 @@
 msgstr ""
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Phone:"
+msgstr ""
+
+#. module: base_contact_by_functions
 #: field:functions,name:0 field:res.institution,name:0
 msgid "Name"
 msgstr ""
@@ -203,11 +223,6 @@
 msgstr ""
 
 #. module: base_contact_by_functions
-#: field:functions,acronym:0
-msgid "Acronym"
-msgstr ""
-
-#. module: base_contact_by_functions
 #: model:ir.actions.act_window,name:base_contact_by_functions.action_institutions_tree_list
 #: model:ir.model,name:base_contact_by_functions.model_res_institution
 #: field:res.institution.functions,institution_id:0
@@ -250,8 +265,8 @@
 msgstr ""
 
 #. module: base_contact_by_functions
-#: field:res.partner,delivered_country:0
-msgid "Country Passport"
+#: field:functions,acronym:0
+msgid "Acronym"
 msgstr ""
 
 #. module: base_contact_by_functions
@@ -283,8 +298,3 @@
 #: view:res.partner:0 field:res.partner,maiden_name:0
 msgid "Maiden name"
 msgstr ""
-
-#. module: base_contact_by_functions
-#: view:res.partner:0
-msgid "e.g. Sales Director"
-msgstr ""

=== modified file 'base_contact_by_functions/i18n/fr.po'
--- base_contact_by_functions/i18n/fr.po	2013-12-19 16:49:45 +0000
+++ base_contact_by_functions/i18n/fr.po	2013-12-23 16:41:59 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-12-19 16:19+0000\n"
-"PO-Revision-Date: 2013-12-19 11:25-0500\n"
+"POT-Creation-Date: 2013-12-20 21:45+0000\n"
+"PO-Revision-Date: 2013-12-20 16:47-0500\n"
 "Last-Translator: \n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -32,6 +32,11 @@
 msgstr "Fonctions"
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "à"
+msgstr "à"
+
+#. module: base_contact_by_functions
 #: field:functions,institution_id:0
 msgid "institution"
 msgstr "institution"
@@ -78,8 +83,8 @@
 
 #. module: base_contact_by_functions
 #: view:res.partner:0
-msgid "à"
-msgstr "à"
+msgid "e.g. Sales Director"
+msgstr "e.g. Directeur"
 
 #. module: base_contact_by_functions
 #: help:functions,acronym:0
@@ -112,16 +117,21 @@
 msgstr "Date d'expiration"
 
 #. module: base_contact_by_functions
-#: view:res.partner:0
-msgid "Phone:"
-msgstr "Téléphone:"
-
-#. module: base_contact_by_functions
 #: model:ir.model,name:base_contact_by_functions.model_res_institution_functions
 msgid "Institutions functions"
 msgstr "Fonctions des institutions"
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Firstname"
+msgstr "Prénom"
+
+#. module: base_contact_by_functions
+#: field:res.partner,delivered_country:0
+msgid "Country Passport"
+msgstr "Pays de délivrance du passeport"
+
+#. module: base_contact_by_functions
 #: field:res.partner,other_contact_history_ids:0
 msgid "unknown"
 msgstr "inconnu"
@@ -154,6 +164,11 @@
 
 #. module: base_contact_by_functions
 #: view:res.partner:0
+msgid "lastname"
+msgstr "Nom"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
 msgid "Address"
 msgstr "Adresse"
 
@@ -168,6 +183,11 @@
 msgstr "Sélectionner les fonctions de cet organisme"
 
 #. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Phone:"
+msgstr "Téléphone:"
+
+#. module: base_contact_by_functions
 #: field:functions,name:0 field:res.institution,name:0
 msgid "Name"
 msgstr "Nom"
@@ -203,11 +223,6 @@
 msgstr "Portable :"
 
 #. module: base_contact_by_functions
-#: field:functions,acronym:0
-msgid "Acronym"
-msgstr "Acronyme"
-
-#. module: base_contact_by_functions
 #: model:ir.actions.act_window,name:base_contact_by_functions.action_institutions_tree_list
 #: model:ir.model,name:base_contact_by_functions.model_res_institution
 #: field:res.institution.functions,institution_id:0
@@ -237,7 +252,7 @@
 #. module: base_contact_by_functions
 #: field:res.institution,sequence:0 field:res.institution.functions,sequence:0
 msgid "Sequence"
-msgstr "Sequence"
+msgstr "Séquence"
 
 #. module: base_contact_by_functions
 #: view:res.partner:0
@@ -250,9 +265,9 @@
 msgstr "Permet d'ordonner"
 
 #. module: base_contact_by_functions
-#: field:res.partner,delivered_country:0
-msgid "Country Passport"
-msgstr "Pays de délivrance du passeport"
+#: field:functions,acronym:0
+msgid "Acronym"
+msgstr "Acronyme"
 
 #. module: base_contact_by_functions
 #: help:functions,name:0
@@ -283,8 +298,3 @@
 #: view:res.partner:0 field:res.partner,maiden_name:0
 msgid "Maiden name"
 msgstr "Nom de jeune fille"
-
-#. module: base_contact_by_functions
-#: view:res.partner:0
-msgid "e.g. Sales Director"
-msgstr "e.g. Directeur"

=== modified file 'base_contact_by_functions/res_partner.py'
--- base_contact_by_functions/res_partner.py	2013-12-17 19:13:54 +0000
+++ base_contact_by_functions/res_partner.py	2013-12-23 16:41:59 +0000
@@ -21,7 +21,8 @@
 ##############################################################################
 
 import time
-from openerp.osv import orm, fields
+from openerp.osv import orm, fields, osv
+from openerp.tools.translate import _
 
 
 class res_partner(orm.Model):
@@ -69,7 +70,12 @@
             contact_vals['active'] = True
             vals['contact_id'] = super(res_partner, self).create(cr, user, contact_vals,
                                                                  context=context)
+            self.write(cr, user, vals['contact_id'], {'lastname': vals['lastname']}, context=context)
+        if 'reset_password' in context.keys() or 'install_mode' in context.keys():
+            return vals['contact_id']
         res = super(res_partner, self).create(cr, user, vals, context=context)
+        if vals.get('lastname'):
+            self.write(cr, user, res, {'lastname': vals['lastname']}, context=context)
         return res
 
     def write(self, cr, user, ids, vals, context=None):
@@ -110,7 +116,6 @@
                                                      relation="res.partner",
                                                      method=True,
                                                      type="one2many"),
-        'function': fields.char('Function', size=256),
         'maiden_name': fields.char('Maiden name', size=256, help="Maiden name."),
         'name': fields.function(_compute_name_custom, string="Name",
                                 type="char",

=== modified file 'base_contact_by_functions/res_partner_view.xml'
--- base_contact_by_functions/res_partner_view.xml	2013-12-19 16:49:45 +0000
+++ base_contact_by_functions/res_partner_view.xml	2013-12-23 16:41:59 +0000
@@ -437,12 +437,55 @@
       <field name="inherit_id" ref="partner_firstname.view_partner_form_firstname"/>
       <field name="arch" type="xml">
         <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='lastname']" position="replace">
-            <field name="lastname" attrs="{'required': [('contact_type', '=', 'standalone')], 'invisible': [('contact_type', '=', 'attached')]}"/>
+            <field name="lastname" attrs="{'required': [('contact_type', '=', 'standalone')], 'invisible': [('contact_type', '=', 'attached')]}" placeholder="lastname"/>
         </xpath>
          <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='firstname']" position="replace">
-             <field name="firstname" attrs="{'invisible': [('contact_type', '=', 'attached')]}"/>
-        </xpath>
-      </field>
-    </record>
+             <field name="firstname" attrs="{'invisible': [('contact_type', '=', 'attached')]}" placeholder="Firstname"/>
+        </xpath>
+      </field>
+    </record>
+    <!--Show fistname before lastname in view form-->
+    <record id="view_partner_form_firstname_lastname" model="ir.ui.view">
+      <field name="name">res.partner.form.firstname.lastname</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="partner_firstname.view_partner_form_firstname"/>
+      <field name="arch" type="xml">
+        <field name="firstname" position="replace"/>
+        <field name="lastname" position="replace"/>
+        <field name="category_id" position="before">
+          <group attrs="{'invisible': [('is_company', '=', True)]}">
+            <field name="firstname"/>
+            <field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
+          </group>
+        </field>
+        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='firstname']" position="replace"/>
+        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='lastname']" position="replace"/>
+        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='name']" position="after">
+            <field name="firstname"/>
+            <field name="lastname"/>
+        </xpath>
+      </field>
+    </record>
+
+    <record model="ir.ui.view" id="account_report_copmany_partner_firstname_tree_view">
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="account_report_company.account_report_copmany_partner_tree_view"/>
+            <field name="arch" type="xml">
+                <field name="display_name" position="replace">
+                    <field name="name"/>
+                </field>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="account_report_copmany_firstname_partner_kanban_view">
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="account_report_company.account_report_copmany_partner_kanban_view"/>
+            <field name="arch" type="xml">
+                <xpath expr="//templates//field[@name='display_name']" position="replace">
+                    <field name="name"/>
+                </xpath>
+            </field>
+        </record>
+
   </data>
 </openerp>

=== added directory 'employee_firstname'
=== added file 'employee_firstname/__init__.py'
--- employee_firstname/__init__.py	1970-01-01 00:00:00 +0000
+++ employee_firstname/__init__.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import hr
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'employee_firstname/__openerp__.py'
--- employee_firstname/__openerp__.py	1970-01-01 00:00:00 +0000
+++ employee_firstname/__openerp__.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,54 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'Employee First Name, Last Name',
+    'version': '0.1',
+    'author': 'Savoir-faire Linux',
+    'maintainer': 'Savoir-faire Linux',
+    'website': 'http://www.savoirfairelinux.com',
+    'category': 'MISC',
+    'description': """
+Employee First Name, Last Name
+==============================
+
+This module allows you to add firstname and lastname in employee form,
+and concatenate both in name field.
+
+Contributors
+------------
+* EL HADJI DEM (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+""",
+    'depends': [
+        'hr',
+    ],
+    'external_dependencies': {},
+    'data': [
+        'hr_view.xml',
+    ],
+    'demo': [],
+    'test': [],
+    'installable': True,
+    'active': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'employee_firstname/hr.py'
--- employee_firstname/hr.py	1970-01-01 00:00:00 +0000
+++ employee_firstname/hr.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,44 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import orm, fields
+
+
+class hr_employee(orm.Model):
+    _inherit = 'hr.employee'
+
+    def init(self, cursor):
+        cursor.execute('SELECT id FROM hr_employee WHERE lastname IS NOT NULL Limit 1')
+        if not cursor.fetchone():
+            cursor.execute('UPDATE hr_employee set lastname = name_related WHERE name_related IS NOT NULL')
+    _columns = {
+        'firstname': fields.char("Firstname"),
+        'lastname': fields.char("Lastname", required=True)}
+
+    def create(self, cursor, uid, vals, context=None):
+
+        if vals.get('firstname') and vals.get('lastname'):
+            names = (vals['firstname'], vals['lastname'])
+            vals['name'] = " ".join([s for s in names if s])
+        return super(hr_employee, self).create(cursor, uid, vals, context=context)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'employee_firstname/hr_view.xml'
--- employee_firstname/hr_view.xml	1970-01-01 00:00:00 +0000
+++ employee_firstname/hr_view.xml	2013-12-23 16:41:59 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <record id="hr_employee_view_firstname_form" model="ir.ui.view">
+      <field name="name">hr.employee.view.form.inherit.firstname</field>
+      <field name="model">hr.employee</field>
+      <field name="inherit_id" ref="hr.view_employee_form"/>
+      <field name="arch" type="xml">
+        <field name="name" position="replace">
+          <field name="name" invisible="True" nolabel="1" required="False"/>
+        </field>
+        <field name="name" position="after">
+          <field name="firstname" placeholder="e.g. Firstname"/>
+          <field name="lastname" placeholder="e.g. Lastname"/>
+        </field>
+      </field>
+    </record>
+  </data>
+</openerp>

=== added directory 'employee_firstname/i18n'
=== added file 'employee_firstname/i18n/employee_firstname.pot'
--- employee_firstname/i18n/employee_firstname.pot	1970-01-01 00:00:00 +0000
+++ employee_firstname/i18n/employee_firstname.pot	2013-12-23 16:41:59 +0000
@@ -0,0 +1,42 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-20 21:40+0000\n"
+"PO-Revision-Date: 2013-12-20 16:40-0500\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: Poedit 1.5.4\n"
+
+#. module: employee_firstname
+#: model:ir.model,name:employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr ""
+
+#. module: employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr ""
+
+#. module: employee_firstname
+#: view:hr.employee:0
+msgid "e.g. Lastname"
+msgstr ""
+
+#. module: employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr ""
+
+#. module: employee_firstname
+#: view:hr.employee:0
+msgid "e.g. Firstname"
+msgstr ""

=== added file 'employee_firstname/i18n/fr.po'
--- employee_firstname/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ employee_firstname/i18n/fr.po	2013-12-23 16:41:59 +0000
@@ -0,0 +1,42 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-20 21:41+0000\n"
+"PO-Revision-Date: 2013-12-20 16:42-0500\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: Poedit 1.5.4\n"
+
+#. module: employee_firstname
+#: model:ir.model,name:employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Employé"
+
+#. module: employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Nom"
+
+#. module: employee_firstname
+#: view:hr.employee:0
+msgid "e.g. Lastname"
+msgstr "Nom"
+
+#. module: employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Prénom"
+
+#. module: employee_firstname
+#: view:hr.employee:0
+msgid "e.g. Firstname"
+msgstr "Prénom"

=== added directory 'user_firstname'
=== added file 'user_firstname/__init__.py'
--- user_firstname/__init__.py	1970-01-01 00:00:00 +0000
+++ user_firstname/__init__.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import res_user
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'user_firstname/__openerp__.py'
--- user_firstname/__openerp__.py	1970-01-01 00:00:00 +0000
+++ user_firstname/__openerp__.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,54 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'User First Name, Last Name',
+    'version': '0.1',
+    'author': 'Savoir-faire Linux',
+    'maintainer': 'Savoir-faire Linux',
+    'website': 'http://www.savoirfairelinux.com',
+    'category': 'MISC',
+    'description': """
+User First Name, Last Name
+==========================
+
+This module allows you to add firstname and lastname in user form,
+and concatenate both in name field.
+
+Contributors
+------------
+* EL HADJI DEM (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+""",
+    'depends': [
+        'partner_firstname',
+    ],
+    'external_dependencies': {},
+    'data': [
+        'res_user_view.xml',
+    ],
+    'demo': [],
+    'test': [],
+    'installable': True,
+    'active': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'user_firstname/i18n'
=== added file 'user_firstname/i18n/fr.po'
--- user_firstname/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ user_firstname/i18n/fr.po	2013-12-23 16:41:59 +0000
@@ -0,0 +1,32 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* user_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-20 21:38+0000\n"
+"PO-Revision-Date: 2013-12-20 16:39-0500\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: Poedit 1.5.4\n"
+
+#. module: user_firstname
+#: view:res.users:0
+msgid "e.g. Lastname"
+msgstr "Nom"
+
+#. module: user_firstname
+#: model:ir.model,name:user_firstname.model_res_users
+msgid "Users"
+msgstr "Utilisateurs"
+
+#. module: user_firstname
+#: view:res.users:0
+msgid "e.g. Firstname"
+msgstr "Prénom"

=== added file 'user_firstname/i18n/user_firstname.pot'
--- user_firstname/i18n/user_firstname.pot	1970-01-01 00:00:00 +0000
+++ user_firstname/i18n/user_firstname.pot	2013-12-23 16:41:59 +0000
@@ -0,0 +1,32 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* user_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-20 21:36+0000\n"
+"PO-Revision-Date: 2013-12-20 16:37-0500\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: Poedit 1.5.4\n"
+
+#. module: user_firstname
+#: view:res.users:0
+msgid "e.g. Lastname"
+msgstr ""
+
+#. module: user_firstname
+#: model:ir.model,name:user_firstname.model_res_users
+msgid "Users"
+msgstr ""
+
+#. module: user_firstname
+#: view:res.users:0
+msgid "e.g. Firstname"
+msgstr ""

=== added file 'user_firstname/res_user.py'
--- user_firstname/res_user.py	1970-01-01 00:00:00 +0000
+++ user_firstname/res_user.py	2013-12-23 16:41:59 +0000
@@ -0,0 +1,37 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2013 Savoir-faire Linux
+#    (<http://www.savoirfairelinux.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import orm, fields
+
+
+class ResUsers(orm.Model):
+    _inherit = 'res.users'
+
+    def create(self, cursor, uid, vals, context=None):
+
+        if vals.get('firstname') and vals.get('lastname'):
+            names = (vals['firstname'], vals['lastname'])
+            vals['name'] = " ".join([s for s in names if s])
+            vals['display_name'] = vals['name']
+        return super(ResUsers, self).create(cursor, uid, vals, context=context)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'user_firstname/res_user_view.xml'
--- user_firstname/res_user_view.xml	1970-01-01 00:00:00 +0000
+++ user_firstname/res_user_view.xml	2013-12-23 16:41:59 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <record id="view_users_firstname_form" model="ir.ui.view">
+      <field name="name">res.users.form.firstname.inherit44</field>
+      <field name="model">res.users</field>
+      <field name="inherit_id" ref="base.view_users_form"/>
+      <field name="arch" type="xml">
+        <field name="name" position="replace">
+            <field name="name" invisible="1"/>
+        </field>
+        <field name="name" position="after">
+          <field name="firstname" placeholder="e.g. Firstname"/>
+          <field name="lastname" placeholder="e.g. Lastname"/>
+        </field>
+      </field>
+    </record>
+  </data>
+</openerp>


Follow ups