← Back to team overview

savoirfairelinux-openerp team mailing list archive

lp:~savoirfairelinux-openerp/partner-contact-management/firstname_lastname_fix_bug_email into lp:~savoirfairelinux-openerp/partner-contact-management/supplier_information_bank_account

 

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

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

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

[IMP] merge with https://code.launchpad.net/~savoirfairelinux-openerp/partner-contact-management/partner_firstname_lastname.
It allow to fix the bug for email tests.
The new module partner_firstname define a full name (= firstname + name). Name is considered like the last name.And now, we have first name and lastname in partner view.
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/partner-contact-management/firstname_lastname_fix_bug_email/+merge/202762
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/partner-contact-management/supplier_information_bank_account.
=== added directory 'base_continent'
=== added file 'base_continent/__init__.py'
--- base_continent/__init__.py	1970-01-01 00:00:00 +0000
+++ base_continent/__init__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Author: Romain Deheele
+#    Copyright 2014 Camptocamp SA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from . import base_continent
+from . import country
+from . import partner

=== added file 'base_continent/__openerp__.py'
--- base_continent/__openerp__.py	1970-01-01 00:00:00 +0000
+++ base_continent/__openerp__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Author: Romain Deheele
+#    Copyright 2014 Camptocamp SA
+#
+#    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': 'Continent management',
+ 'version': '1.0',
+ 'depends': ['base'],
+ 'author': 'Camptocamp',
+ 'license': 'AGPL-3',
+ 'description': """
+This module introduces continent management.
+============================================
+Links continents to countries,
+adds continent field on partner form
+""",
+ 'category': 'Generic Modules/Base',
+ 'data': [
+     'base_continent_view.xml',
+     'base_continent_data.xml',
+     'security/ir.model.access.csv'],
+ 'active': False,
+ 'installable': True,
+}

=== added file 'base_continent/base_continent.py'
--- base_continent/base_continent.py	1970-01-01 00:00:00 +0000
+++ base_continent/base_continent.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Author: Romain Deheele
+#    Copyright 2014 Camptocamp SA
+#
+#    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.orm import Model
+from openerp.osv import fields
+
+
+class Continent(Model):
+    _name = 'res.continent'
+    _description = 'Continent'
+    _columns = {
+        'name': fields.char('Continent Name', size=64,
+                            help='The full name of the continent.',
+                            required=True, translate=True),
+    }
+    _order = 'name'

=== added file 'base_continent/base_continent_data.xml'
--- base_continent/base_continent_data.xml	1970-01-01 00:00:00 +0000
+++ base_continent/base_continent_data.xml	2014-01-22 21:48:26 +0000
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+
+        <record id="af" model="res.continent">
+            <field name="name">Africa</field>
+        </record>
+        <record id="an" model="res.continent">
+            <field name="name">Antarctica</field>
+        </record>
+        <record id="as" model="res.continent">
+            <field name="name">Asia</field>
+        </record>
+        <record id="eu" model="res.continent">
+            <field name="name">Europe</field>
+        </record>
+        <record id="na" model="res.continent">
+            <field name="name">North America</field>
+        </record>
+        <record id="oc" model="res.continent">
+            <field name="name">Oceania</field>
+        </record>
+        <record id="sa" model="res.continent">
+            <field name="name">South America</field>
+        </record>
+    </data>
+</openerp>

=== added file 'base_continent/base_continent_view.xml'
--- base_continent/base_continent_view.xml	1970-01-01 00:00:00 +0000
+++ base_continent/base_continent_view.xml	2014-01-22 21:48:26 +0000
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+        <!-- add continent to res country tree -->
+        <record model="ir.ui.view" id="view_country_tree_add_continent">
+            <field name="name">res.country.tree.add_continent</field>
+            <field name="model">res.country</field>
+            <field name="inherit_id" ref="base.view_country_tree" />
+            <field name="arch" type="xml">
+                <field name="code" position="after">
+                    <field name="continent_id"/>
+                </field>
+            </field>
+        </record>
+
+        <!-- add continent to res country form -->
+        <record model="ir.ui.view" id="view_country_form_add_continent">
+            <field name="name">res.country.form.add_continent</field>
+            <field name="model">res.country</field>
+            <field name="inherit_id" ref="base.view_country_form"/>
+            <field name="arch" type="xml">
+                <field name="code" position="after">
+                    <field name="continent_id"/>
+                </field>
+            </field>
+        </record>
+
+        <record id="view_continent_tree" model="ir.ui.view">
+            <field name="name">res.continent.tree</field>
+            <field name="model">res.continent</field>
+            <field name="arch" type="xml">
+                <tree string="Continent">
+                    <field name="name"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_continent_form" model="ir.ui.view">
+            <field name="name">res.continent.form</field>
+            <field name="model">res.continent</field>
+            <field name="arch" type="xml">
+                <form string="Continent" version="7.0">
+                    <group>
+                        <field name="name"/>
+                    </group>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_continent" model="ir.actions.act_window">
+            <field name="name">Continents</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">res.continent</field>
+            <field name="view_type">form</field>
+            <field name="help">Display and manage the list of all continents that can be assigned to your partner records.</field>
+        </record>
+
+        <menuitem action="action_continent" id="menu_continent_partner" parent="base.menu_localisation" sequence="1" groups="base.group_no_one"/>
+
+        <!-- add continent to res partner form -->
+        <record model="ir.ui.view" id="res_partner_form_add_continent">
+            <field name="name">res.partner.form.add_continent</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="arch" type="xml">
+                <field name="country_id" position="after">
+                    <field name="continent_id" widget="selection"/>
+                </field>
+            </field>
+        </record>
+
+  </data>
+</openerp>

=== added file 'base_continent/country.py'
--- base_continent/country.py	1970-01-01 00:00:00 +0000
+++ base_continent/country.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Author: Romain Deheele
+#    Copyright 2014 Camptocamp SA
+#
+#    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.orm import Model
+from openerp.osv import fields
+
+
+class Country(Model):
+    _inherit = 'res.country'
+    _columns = {
+        'continent_id': fields.many2one('res.continent', 'Continent'),
+    }

=== added directory 'base_continent/i18n'
=== added file 'base_continent/i18n/base_continent.po'
--- base_continent/i18n/base_continent.po	1970-01-01 00:00:00 +0000
+++ base_continent/i18n/base_continent.po	2014-01-22 21:48:26 +0000
@@ -0,0 +1,56 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* base_continent
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-14 15:19+0000\n"
+"PO-Revision-Date: 2014-01-14 15:19+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_continent
+#: model:ir.actions.act_window,help:base_continent.action_continent
+msgid "Display and manage the list of all continents that can be assigned to your partner records."
+msgstr ""
+
+#. module: base_continent
+#: model:ir.actions.act_window,name:base_continent.action_continent
+#: model:ir.ui.menu,name:base_continent.menu_continent_partner
+msgid "Continents"
+msgstr ""
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_country
+msgid "Country"
+msgstr ""
+
+#. module: base_continent
+#: help:res.continent,name:0
+msgid "The full name of the continent."
+msgstr ""
+
+#. module: base_continent
+#: field:res.continent,name:0
+msgid "Continent Name"
+msgstr ""
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_continent
+#: view:res.continent:0
+#: field:res.country,continent_id:0
+#: field:res.partner,continent_id:0
+msgid "Continent"
+msgstr ""
+

=== added file 'base_continent/i18n/fr.po'
--- base_continent/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ base_continent/i18n/fr.po	2014-01-22 21:48:26 +0000
@@ -0,0 +1,56 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* base_continent
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-14 15:19+0000\n"
+"PO-Revision-Date: 2014-01-14 15:19+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_continent
+#: model:ir.actions.act_window,help:base_continent.action_continent
+msgid "Display and manage the list of all continents that can be assigned to your partner records."
+msgstr "Affiche et gère la liste de tous les continents qui peuvent être associés à vos partenaires."
+
+#. module: base_continent
+#: model:ir.actions.act_window,name:base_continent.action_continent
+#: model:ir.ui.menu,name:base_continent.menu_continent_partner
+msgid "Continents"
+msgstr "Continents"
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_country
+msgid "Country"
+msgstr "Pays"
+
+#. module: base_continent
+#: help:res.continent,name:0
+msgid "The full name of the continent."
+msgstr "Le nom complet du continent."
+
+#. module: base_continent
+#: field:res.continent,name:0
+msgid "Continent Name"
+msgstr "Nom du continent"
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_partner
+msgid "Partner"
+msgstr "Partenaire"
+
+#. module: base_continent
+#: model:ir.model,name:base_continent.model_res_continent
+#: view:res.continent:0
+#: field:res.country,continent_id:0
+#: field:res.partner,continent_id:0
+msgid "Continent"
+msgstr "Continent"
+

=== added file 'base_continent/partner.py'
--- base_continent/partner.py	1970-01-01 00:00:00 +0000
+++ base_continent/partner.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Author: Romain Deheele
+#    Copyright 2014 Camptocamp SA
+#
+#    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.orm import Model
+from openerp.osv import fields
+
+
+class Partner(Model):
+    _inherit = 'res.partner'
+    _columns = {
+        'continent_id': fields.related('country_id', 'continent_id',
+                                       type='many2one',
+                                       relation='res.continent',
+                                       string='Continent',
+                                       readonly=True, store=True),
+    }

=== added directory 'base_continent/security'
=== added file 'base_continent/security/ir.model.access.csv'
--- base_continent/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ base_continent/security/ir.model.access.csv	2014-01-22 21:48:26 +0000
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_res_continent_group_all,res_continent group_user_all,model_res_continent,,1,0,0,0
+access_res_continent_group_user,res_continent group_user,model_res_continent,base.group_partner_manager,1,1,1,1

=== modified file 'base_location/better_zip.py'
--- base_location/better_zip.py	2013-07-09 08:03:15 +0000
+++ base_location/better_zip.py	2014-01-22 21:48:26 +0000
@@ -30,7 +30,7 @@
     _order = "priority"
 
     _columns = {'priority': fields.integer('Priority', deprecated=True),
-                'name': fields.char('ZIP', required=True),
+                'name': fields.char('ZIP'),
                 'city': fields.char('City', required=True),
                 'state_id': fields.many2one('res.country.state', 'State'),
                 'country_id': fields.many2one('res.country', 'Country'),
@@ -43,7 +43,10 @@
     def name_get(self, cursor, uid, ids, context=None):
         res = []
         for bzip in self.browse(cursor, uid, ids):
-            name = [bzip.name, bzip.city]
+            if bzip.name:
+                name = [bzip.name, bzip.city]
+            else:
+                name = [bzip.city]
             if bzip.state_id:
                 name.append(bzip.state_id.name)
             if bzip.country_id:

=== modified file 'base_location/better_zip_view.xml'
--- base_location/better_zip_view.xml	2013-06-24 07:56:39 +0000
+++ base_location/better_zip_view.xml	2014-01-22 21:48:26 +0000
@@ -33,12 +33,24 @@
       </field>
     </record>
 
+    <record id="view_better_zip_filter" model="ir.ui.view">
+      <field name="name">res.better.zip.select</field>
+        <field name="model">res.better.zip</field>
+        <field name="arch" type="xml">
+        <search string="Search city">
+          <field name="name"/>
+          <field name="city"/>
+        </search>
+      </field>
+    </record>
+
     <record id="action_zip_tree" model="ir.actions.act_window">
       <field name="name">Cites/locations Management</field>
       <field name="res_model">res.better.zip</field>
       <field name="view_type">form</field>
       <field name="view_mode">tree,form</field>
       <field ref="better_zip_tree" name="view_id"/>
+      <field name="search_view_id" ref="view_better_zip_filter"/>
     </record>
 
     <menuitem

=== modified file 'base_location/company_view.xml'
--- base_location/company_view.xml	2013-06-07 13:57:09 +0000
+++ base_location/company_view.xml	2014-01-22 21:48:26 +0000
@@ -9,6 +9,7 @@
       <field name="arch" type="xml">
         <field name="street2" position="after">
           <field name="better_zip_id"
+                 options="{'create_name_field': 'city'}"
                  colspan="4"
                  on_change="on_change_city(better_zip_id)"
                  placeholder="City completion" />

=== modified file 'base_location/i18n/base_location.pot'
--- base_location/i18n/base_location.pot	2013-06-25 08:57:02 +0000
+++ base_location/i18n/base_location.pot	2014-01-22 21:48:26 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-06-25 08:56+0000\n"
-"PO-Revision-Date: 2013-06-25 08:56+0000\n"
+"POT-Creation-Date: 2013-12-12 22:33+0000\n"
+"PO-Revision-Date: 2013-12-12 22:33+0000\n"
 "Last-Translator: <>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -32,6 +32,11 @@
 msgstr ""
 
 #. module: base_location
+#: field:res.better.zip,state_id:0
+msgid "State"
+msgstr ""
+
+#. module: base_location
 #: field:res.better.zip,country_id:0
 msgid "Country"
 msgstr ""
@@ -67,8 +72,8 @@
 msgstr ""
 
 #. module: base_location
-#: field:res.better.zip,state_id:0
-msgid "State"
+#: view:res.better.zip:0
+msgid "Search city"
 msgstr ""
 
 #. module: base_location

=== modified file 'base_location/i18n/es.po'
--- base_location/i18n/es.po	2013-06-25 08:57:02 +0000
+++ base_location/i18n/es.po	2014-01-22 21:48:26 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-06-25 08:47+0000\n"
-"PO-Revision-Date: 2013-06-25 10:47+0100\n"
+"POT-Creation-Date: 2013-12-12 22:34+0000\n"
+"PO-Revision-Date: 2013-12-12 23:34+0100\n"
 "Last-Translator: Pedro Manuel Baeza <pedro.baeza@xxxxxxxxxxxxxxxxxx>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -32,6 +32,11 @@
 msgstr "C.P."
 
 #. module: base_location
+#: field:res.better.zip,state_id:0
+msgid "State"
+msgstr "Provincia"
+
+#. module: base_location
 #: field:res.better.zip,country_id:0
 msgid "Country"
 msgstr "País"
@@ -67,9 +72,9 @@
 msgstr "Ciudad/Ubicación"
 
 #. module: base_location
-#: field:res.better.zip,state_id:0
-msgid "State"
-msgstr "Provincia"
+#: view:res.better.zip:0
+msgid "Search city"
+msgstr "Buscar ciudad"
 
 #. module: base_location
 #: field:res.company,better_zip_id:0

=== modified file 'base_location/partner_view.xml'
--- base_location/partner_view.xml	2013-07-31 15:02:17 +0000
+++ base_location/partner_view.xml	2014-01-22 21:48:26 +0000
@@ -8,11 +8,20 @@
       <field name="arch" type="xml">
         <field name="street2" position="after">
           <field name="zip_id"
+                 options="{'create_name_field': 'city'}"
                  on_change="onchange_zip_id(zip_id)"
                  placeholder="City completion"
-			     attrs="{'invisible': [('use_parent_address','=',True)]}"
-			     />
+                 attrs="{'invisible': [('use_parent_address','=',True)]}"
+                 />
         </field>
+        <xpath expr="//field[@name='child_ids']/form//field[@name='street2']" position="after">
+          <field name="zip_id"
+                 options="{'create_name_field': 'city'}"
+                 on_change="onchange_zip_id(zip_id)"
+                 placeholder="City completion"
+                 attrs="{'invisible': [('use_parent_address','=',True)]}"
+                 />
+        </xpath>
       </field>
     </record>
   </data>

=== added directory 'base_partner_sequence'
=== added file 'base_partner_sequence/__init__.py'
--- base_partner_sequence/__init__.py	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/__init__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,22 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#
+#    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 . import partner
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_partner_sequence/__openerp__.py'
--- base_partner_sequence/__openerp__.py	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/__openerp__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,54 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
+#    Author Thomas Rehn <thomas.rehn at initos.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": "Add a sequence on customers' code",
+    "version": "1.1",
+    "author": "Tiny/initOS GmbH & Co. KG",
+    "category": "Generic Modules/Base",
+    "website": "http://www.initos.com";,
+    "depends": ["base"],
+    "summary": "Sets customer's code from a sequence",
+    "description": """
+        This module adds the possibility to define a sequence for
+        the partner code. This code is then set as default when you
+        create a new commercial partner, using the defined sequence.
+
+        The reference field is treated as a commercial field, i.e. it
+        is managed from the commercial partner and then propagated to
+        the partner's contacts. The field is visible on the contacts,
+        but it can only be modified from the commercial partner.
+
+        No codes are assigned for contacts such as shipping and
+        invoice addresses.
+        This module is a migration of the original base_partner_sequence
+        addon to OpenERP version 7.0.
+    """,
+    "data": [
+        'partner_sequence.xml',
+        'partner_view.xml',
+        ],
+    "demo": [],
+    "active": False,
+    "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'base_partner_sequence/i18n'
=== added file 'base_partner_sequence/i18n/base_partner_sequence.pot'
--- base_partner_sequence/i18n/base_partner_sequence.pot	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/i18n/base_partner_sequence.pot	2014-01-22 21:48:26 +0000
@@ -0,0 +1,21 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-13 13:47+0000\n"
+"PO-Revision-Date: 2013-11-13 13:47+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_partner_sequence
+#: model:ir.model,name:base_partner_sequence.model_res_partner
+msgid "Partner"
+msgstr ""
+

=== added file 'base_partner_sequence/i18n/de.po'
--- base_partner_sequence/i18n/de.po	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/i18n/de.po	2014-01-22 21:48:26 +0000
@@ -0,0 +1,21 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-13 13:47+0000\n"
+"PO-Revision-Date: 2013-11-13 13:47+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: base_partner_sequence
+#: model:ir.model,name:base_partner_sequence.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+

=== added file 'base_partner_sequence/partner.py'
--- base_partner_sequence/partner.py	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/partner.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,80 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
+#    Author Thomas Rehn <thomas.rehn at initos.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 ResPartner(orm.Model):
+    """Assigns 'ref' from a sequence on creation and copying"""
+
+    _inherit = 'res.partner'
+
+    def create(self, cr, uid, vals, context=None):
+        context = context or {}
+        if not vals.get('ref') and self._needsRef(cr, uid, vals=vals,
+                                                  context=context):
+            vals['ref'] = self.pool.get('ir.sequence')\
+                                   .next_by_code(cr, uid, 'res.partner')
+        return super(ResPartner, self).create(cr, uid, vals, context)
+
+    def copy(self, cr, uid, id, default=None, context=None):
+        default = default or {}
+        if self._needsRef(cr, uid, id=id, context=context):
+            default['ref'] = self.pool.get('ir.sequence')\
+                                      .next_by_code(cr, uid, 'res.partner',
+                                                    context=context)
+        return super(ResPartner, self).copy(cr, uid, id, default,
+                                            context=context)
+
+    def _needsRef(self, cr, uid, id=None, vals=None, context=None):
+        """
+        Checks whether a sequence value should be assigned to a partner's 'ref'
+
+        :param cr: database cursor
+        :param uid: current user id
+        :param id: id of the partner object
+        :param vals: known field values of the partner object
+        :return: true iff a sequence value should be assigned to the\
+                      partner's 'ref'
+        """
+        if not vals and not id:
+            raise Exception('Either field values or an id must be provided.')
+        # only assign a 'ref' to commercial partners
+        if id:
+            vals = self.read(cr, uid, id, ['parent_id', 'is_company'],
+                             context=context)
+        return vals.get('is_company') or not vals.get('parent_id')
+
+    _columns = {
+        'ref': fields.char('Reference', size=64, readonly=True),
+    }
+
+    def _commercial_fields(self, cr, uid, context=None):
+        """
+        Make the partner reference a field that is propagated
+        to the partner's contacts
+        """
+        return super(ResPartner, self)._commercial_fields(
+            cr, uid, context=context) + ['ref']
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_partner_sequence/partner_sequence.xml'
--- base_partner_sequence/partner_sequence.xml	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/partner_sequence.xml	2014-01-22 21:48:26 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<openerp>
+<data noupdate="1">
+
+	#
+	# Sequences for res.partner
+	#
+
+	<record model="ir.sequence.type" id="seq_type_res_partner">
+		<field name="name">Partner code</field>
+		<field name="code">res.partner</field>
+	</record>
+	<record model="ir.sequence" id="seq_res_partner">
+		<field name="name">Partner code</field>
+		<field name="code">res.partner</field>
+		<field name="prefix">P/</field>
+		<field name="padding">5</field>
+	</record>
+
+</data>
+</openerp>

=== added file 'base_partner_sequence/partner_view.xml'
--- base_partner_sequence/partner_view.xml	1970-01-01 00:00:00 +0000
+++ base_partner_sequence/partner_view.xml	2014-01-22 21:48:26 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+
+        <record id="view_partner_form" model="ir.ui.view">
+            <field name="name">Make partner reference readonly when non-commercial</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="arch" type="xml">
+                <field name="ref" position="attributes">
+                    <attribute name="attrs">{
+                    'readonly': [('is_company', '=', False),
+                                 ('parent_id', '!=', False)]}</attribute>
+                </field>
+            </field>
+
+        </record>
+    </data>
+</openerp>
+

=== removed directory 'firstname_display_name_trigger'
=== removed file 'firstname_display_name_trigger/__init__.py'
--- firstname_display_name_trigger/__init__.py	2013-05-23 12:13:51 +0000
+++ firstname_display_name_trigger/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    Author: Yannick Vaucher
-#    Copyright 2013 Camptocamp SA
-#
-#    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_partner
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== removed file 'firstname_display_name_trigger/__openerp__.py'
--- firstname_display_name_trigger/__openerp__.py	2013-06-18 08:44:56 +0000
+++ firstname_display_name_trigger/__openerp__.py	1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    Author: Yannick Vaucher
-#    Copyright 2013 Camptocamp SA
-#
-#    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': 'Link module if partner_lastname and account_report_company are installed',
- 'version': '1.0',
- 'author': 'Camptocamp',
- 'maintainer': 'Camptocamp',
- 'category': 'Hidden',
- 'complexity': 'normal',  # easy, normal, expert
- 'depends': [
-     'account_report_company',
-     'partner_firstname',
-     ],
- 'description': """
-Adapt the computation of display name so that it gets visible in tree and kanban views.
- """,
- 'website': 'http://www.camptocamp.com',
- 'data': [],
- 'installable': True,
- 'images': [],
- 'auto_install': True,
- 'license': 'AGPL-3',
- 'application': False}
-

=== removed file 'firstname_display_name_trigger/res_partner.py'
--- firstname_display_name_trigger/res_partner.py	2013-05-24 11:42:19 +0000
+++ firstname_display_name_trigger/res_partner.py	1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    Author: Yannick Vaucher
-#    Copyright 2013 Camptocamp SA
-#
-#    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 ResPartner(orm.Model):
-    _inherit = 'res.partner'
-
-    def _display_name_compute(self, cr, uid, ids, name, args, context=None):
-        return dict(self.name_get(cr, uid, ids, context=context))
-
-    def name_get(self, cr, uid, ids, context=None):
-        """ By pass of name_get to use directly firstname and lastname
-        as we cannot ensure name as already been computed when calling this
-        method for display_name"""
-        if context is None:
-            context = {}
-        if isinstance(ids, (int, long)):
-            ids = [ids]
-        res = []
-        for record in self.browse(cr, uid, ids, context=context):
-            name = '%s %s'%(record.lastname if record.lastname else u"",
-                            record.firstname if record.firstname else u"")
-            if record.parent_id and not record.is_company:
-                name =  "%s, %s" % (record.parent_id.name, name)
-            if context.get('show_address'):
-                name = name + "\n" + self._display_address(cr, uid, record, without_company=True, context=context)
-                name = name.replace('\n\n','\n')
-                name = name.replace('\n\n','\n')
-            if context.get('show_email') and record.email:
-                name = "%s <%s>" % (name, record.email)
-            res.append((record.id, name))
-        return res
-
-
-    _display_name_store_triggers = {
-        'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)]),
-                        ['parent_id', 'is_company', 'name', 'firstname', 'lastname'], 10)
-        }
-
-    # indirection to avoid passing a copy of the overridable method when declaring the function field
-    _display_name = lambda self, *args, **kwargs: self._display_name_compute(*args, **kwargs)
-
-    _columns = {
-        # extra field to allow ORDER BY to match visible names
-        'display_name': fields.function(_display_name, type='char', string='Name', store=_display_name_store_triggers),
-        }

=== removed directory 'firstname_display_name_trigger/tests'
=== removed file 'firstname_display_name_trigger/tests/__init__.py'
--- firstname_display_name_trigger/tests/__init__.py	2013-05-24 11:39:16 +0000
+++ firstname_display_name_trigger/tests/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-import test_display_name
-
-checks = [
-    test_display_name
-    ]

=== removed file 'firstname_display_name_trigger/tests/test_display_name.py'
--- firstname_display_name_trigger/tests/test_display_name.py	2013-05-24 11:39:16 +0000
+++ firstname_display_name_trigger/tests/test_display_name.py	1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-import unittest2
-
-import openerp.tests.common as common
-
-class test_display_name(common.TransactionCase):
-
-    def setUp(self):
-        super(test_display_name,self).setUp()
-        cr, uid = self.cr, self.uid
-        self.res_partner = self.registry('res.partner')
-
-
-    def test_00_create_res_partner(self):
-        """ Test if the display name has been correctly set """
-        cr, uid = self.cr, self.uid
-        partner_id = self.res_partner.create(cr, uid, {'lastname': 'Lastname', 'firstname': 'Firstname', 'is_company': True})
-        partner_records = self.res_partner.browse(cr, uid, [partner_id])
-        p1 = partner_records[0]
-        self.assertEqual(p1.display_name, 'Lastname Firstname', 'Partner display_name incorect')
-
-    def test_01_res_partner_write_lastname(self):
-        """ Test if the display name has been correctly set """
-        cr, uid = self.cr, self.uid
-        partner_id = self.res_partner.create(cr, uid, {'lastname': 'Lastname', 'firstname': 'Firstname', 'is_company': True})
-        partner_records = self.res_partner.browse(cr, uid, [partner_id])
-        p1 = partner_records[0]
-        self.res_partner.write(cr, uid, partner_id, {'lastname': 'Last'})
-        self.assertEqual(p1.display_name, 'Last Firstname', 'Partner display_name incorect')
-
-if __name__ == '__main__':
-    unittest2.main()

=== modified file 'partner_firstname/__openerp__.py'
--- partner_firstname/__openerp__.py	2014-01-03 15:07:50 +0000
+++ partner_firstname/__openerp__.py	2014-01-22 21:48:26 +0000
@@ -18,23 +18,33 @@
 #
 ##############################################################################
 
-{'name': 'Partner first name, last name',
- 'description':  """Split first name and last name on res.partner.
+{
+    'name': 'Partner first name, last name',
+    'description': """
+Split first name and last name on res.partner.
+==============================================
 
 The field 'name' becomes a stored function field concatenating lastname, firstname
+
+Contributeurs
+-------------
+* El Hadji Dem (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+* Camptocamp
 """,
- 'version': '1.0.1',
- 'author': 'Camptocamp',
- 'category': 'MISC',
- 'website': 'http://www.camptocamp.com',
- 'depends': ['base'],
- 'data': [
-     'partner_view.xml',
-     'res_user_view.xml',
- ],
- 'demo': [],
- 'test': [],
- 'auto_install': False,
- 'installable': True,
- 'images': []
+    'version': '1.0.1',
+    'author': 'Camptocamp',
+    'category': 'MISC',
+    'website': 'http://www.camptocamp.com',
+    'depends': ['base'],
+    'data': [
+        'partner_view.xml',
+        'res_user_view.xml',
+    ],
+    'demo': [],
+    'test': [],
+    'auto_install': False,
+    'installable': True,
+    'images': []
 }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'partner_firstname/partner.py'
--- partner_firstname/partner.py	2013-08-12 06:18:39 +0000
+++ partner_firstname/partner.py	2014-01-22 21:48:26 +0000
@@ -17,49 +17,68 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
-from openerp.osv.orm import Model, fields
-
-
-class ResPartner(Model):
+
+from openerp.osv import orm, fields
+
+
+class res_partner(orm.Model):
     """Adds lastname and firstname, name become a stored function field"""
 
     _inherit = 'res.partner'
 
-    def init(self, cursor):
-        cursor.execute('SELECT id FROM res_partner WHERE lastname IS NOT NULL Limit 1')
-        if not cursor.fetchone():
-            cursor.execute('UPDATE res_partner set lastname = name WHERE name IS NOT NULL')
+    def _display_name_compute(self, cr, uid, ids, name, args, context=None):
+        return dict(self.name_get(cr, uid, ids, context=context))
 
-    def _compute_name_custom(self, cursor, uid, ids, fname, arg, context=None):
-        res = {}
-        partners = self.read(cursor, uid, ids,
-                             ['firstname', 'lastname'], context=context)
-        for rec in partners:
-            names = (rec['lastname'], rec['firstname'])
-            fullname = " ".join([s for s in names if s])
-            res[rec['id']] = fullname
+    def name_get(self, cr, uid, ids, context=None):
+        """ By pass of name_get to use directly firstname and lastname
+        as we cannot ensure name as already been computed when calling this
+        method for display_name"""
+        if context is None:
+            context = {}
+        if isinstance(ids, (int, long)):
+            ids = [ids]
+        res = []
+        for record in self.browse(cr, uid, ids, context=context):
+            names = (record.firstname, record.name)
+            name = u" ".join([s for s in names if s])
+            if record.parent_id and not record.is_company:
+                name = "%s, %s" % (record.parent_id.name, name)
+            if context.get('show_address'):
+                name = name + "\n" + self._display_address(cr, uid, record, without_company=True, context=context)
+                name = name.replace('\n\n', '\n')
+                name = name.replace('\n\n', '\n')
+            if context.get('show_email') and record.email:
+                name = "%s <%s>" % (name, record.email)
+            res.append((record.id, name))
         return res
 
-    def _write_name(self, cursor, uid, partner_id, field_name, field_value, arg, context=None):
-        return self.write(cursor, uid, partner_id,
-                          {'lastname': field_value}, context=context)
-
-    def create(self, cursor, uid, vals, context=None):
-        """To support data backward compatibility we have to keep this overwrite even if we
-        use fnct_inv: otherwise we can't create entry because lastname is mandatory and module
-        will not install if there is demo data"""
-        to_use = vals
-        if vals.get('name'):
-            corr_vals = vals.copy()
-            corr_vals['lastname'] = corr_vals['name']
-            del(corr_vals['name'])
-            to_use = corr_vals
-        return super(ResPartner, self).create(cursor, uid, to_use, context=context)
-
-    _columns = {'name': fields.function(_compute_name_custom, string="Name",
-                                        type="char", store=True,
-                                        select=True, readonly=True,
-                                        fnct_inv=_write_name),
-
-                'firstname': fields.char("Firstname"),
-                'lastname': fields.char("Lastname", required=True)}
+    def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
+        if args is None:
+            args = []
+        if context is None:
+            context = {}
+        if name:
+            ids = self.search(cr, uid, [('full_name', operator, name)] + args, limit=limit, context=context)
+        else:
+            ids = self.search(cr, uid, args, limit=limit, context=context or {})
+        return self.name_get(cr, uid, ids, context=context)
+
+    def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
+        return dict(self.name_get(cr, uid, ids, context=context))
+
+    _display_name_store_triggers = {
+        'res.partner': (lambda self, cr, uid, ids, context=None: self.search(cr, uid, [('id', 'child_of', ids)]),
+                        ['parent_id', 'is_company', 'name', 'firstname'], 10)
+    }
+
+    # indirection to avoid passing a copy of the overridable method when declaring the function field
+    _display_name = lambda self, *args, **kwargs: self._display_name_compute(*args, **kwargs)
+
+    _columns = {
+        'full_name': fields.function(_display_name, type='char',
+                                     string='Full name',
+                                     store=_display_name_store_triggers,
+                                     help="First name."),
+        'firstname': fields.char("First name", help="First name.")
+    }
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'partner_firstname/partner_view.xml'
--- partner_firstname/partner_view.xml	2013-10-01 11:32:16 +0000
+++ partner_firstname/partner_view.xml	2014-01-22 21:48:26 +0000
@@ -1,43 +1,54 @@
 <openerp>
   <data>
-    <record id="view_partner_simple_form_firstname" model="ir.ui.view">
-      <field name="name">res.partner.simplified.form.firstname</field>
-      <field name="model">res.partner</field>
-      <field name="inherit_id" ref="base.view_partner_simple_form"/>
-      <field name="arch" type="xml">
-        <field name="name" position="attributes">
-            <attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute>
-        </field>
-        <field name="category_id" position="before">
-          <group attrs="{'invisible': [('is_company', '=', True)]}">
-              <field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
-            <field name="firstname" />
-          </group>
-        </field>
-      </field>
-    </record>
 
     <record id="view_partner_form_firstname" model="ir.ui.view">
       <field name="name">res.partner.form.firstname</field>
       <field name="model">res.partner</field>
       <field name="inherit_id" ref="base.view_partner_form"/>
       <field name="arch" type="xml">
-        <field name="name" position="attributes">
-            <attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute>
-        </field>
+        <field name="name" position="replace"/>
         <field name="category_id" position="before">
           <group attrs="{'invisible': [('is_company', '=', True)]}">
-            <field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
-            <field name="firstname"/>
+            <field name="firstname" attrs="{'required': [('is_company', '=', False)]}"/>
+          </group>
+          <group>
+            <field name="name" position="attributes">
+              <attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute>
+            </field>
           </group>
         </field>
-        <!-- Add firstname and last name in inner contact form of child_ids -->
-        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='name']" position="after">
-            <field name="lastname"/>
+
+        <!-- Add first name and name in inner contact form of child_ids -->
+        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='name']" position="replace"/>
+        <xpath expr="//form[@string='Contact']/sheet/div/label" position="after">
+          <group>
             <field name="firstname"/>
+            <field name="name"/>
+          </group>
+        </xpath>
+
+        <label for="name" position="attributes">
+          <attribute name="invisible">1</attribute>
+        </label>
+        <!-- Add first name and name in inner contact kanban view -->
+        <xpath expr="//t[@t-name='kanban-box']//div[@class='oe_module_desc']//field[@name='name']" position="replace">
+          <field name="firstname"/>
+          <field name="name"/>
         </xpath>
       </field>
     </record>
+    <!-- Search view with full name-->
+    <record id="view_res_partner_filter_firstname" model="ir.ui.view">
+            <field name="name">res.partner.select</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_res_partner_filter"/>
+            <field name="arch" type="xml">
+                   <field name="name" position="replace">
+                     <field name="name"
+                       filter_domain="['|','|',('full_name','ilike',self),('parent_id','ilike',self),('ref','=',self)]"/>
+                   </field>
+            </field>
+        </record>
 
   </data>
 </openerp>

=== modified file 'partner_firstname/res_user.py'
--- partner_firstname/res_user.py	2013-02-20 14:00:17 +0000
+++ partner_firstname/res_user.py	2014-01-22 21:48:26 +0000
@@ -17,10 +17,11 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
-from openerp.osv import orm
-
-
-class ResUsers(orm.Model):
+
+from openerp.osv import orm, fields
+
+
+class res_user(orm.Model):
     """Allows user creation from user form as
     name is not in form"""
 
@@ -29,4 +30,4 @@
     def create(self, cursor, uid, vals, context=None):
         if not vals.get('name'):
             vals['name'] = vals['login']
-        return super(ResUsers, self).create(cursor, uid, vals, context=context)
+        return super(res_user, self).create(cursor, uid, vals, context=context)

=== added directory 'partner_multi_passport'
=== added file 'partner_multi_passport/__init__.py'
--- partner_multi_passport/__init__.py	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/__init__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,26 @@
+# -*- 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_partner
+import res_passport
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'partner_multi_passport/__openerp__.py'
--- partner_multi_passport/__openerp__.py	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/__openerp__.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,53 @@
+# -*- 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': 'Partner Multi Passport',
+    'version': '0.1',
+    'author': 'Savoir-faire Linux',
+    'maintainer': 'Savoir-faire Linux',
+    'website': 'http://www.savoirfairelinux.com',
+    'category': 'Customer Relationship Management',
+    'description': """
+Partner Multi Passport
+======================
+
+This module allows you to manage several passports for each contact.
+
+Contributors
+------------
+* El Hadji Dem (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+""",
+    'depends': [
+        'base',
+    ],
+    'external_dependencies': {},
+    'data': [
+        'res_partner_view.xml',
+    ],
+    'demo': [],
+    'test': [],
+    'installable': True,
+    'active': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'partner_multi_passport/i18n'
=== added file 'partner_multi_passport/i18n/fr.po'
--- partner_multi_passport/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/i18n/fr.po	2014-01-22 21:48:26 +0000
@@ -0,0 +1,118 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* partner_multi_passport
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-10 21:36+0000\n"
+"PO-Revision-Date: 2014-01-10 16:44-0500\n"
+"Last-Translator: EL Hadji DEM <elhadji.dem@xxxxxxxxxxxxxxxxxxxx>\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: partner_multi_passport
+#: help:res.passport,gender:0
+msgid "Gender."
+msgstr "Sexe."
+
+#. module: partner_multi_passport
+#: model:ir.model,name:partner_multi_passport.model_res_passport
+#: view:res.partner:0 field:res.partner,passport_ids:0
+msgid "Passport"
+msgstr "Passeport"
+
+#. module: partner_multi_passport
+#: field:res.passport,country_id:0
+msgid "Delivery country"
+msgstr "Pays de délivrance"
+
+#. module: partner_multi_passport
+#: view:res.partner:0
+msgid "Passport Details"
+msgstr "Détails du passeport"
+
+#. module: partner_multi_passport
+#: field:res.passport,name:0
+msgid "Owner name"
+msgstr "Nom du propriétaire"
+
+#. module: partner_multi_passport
+#: field:res.passport,gender:0
+msgid "Gender"
+msgstr "Sexe"
+
+#. module: partner_multi_passport
+#: field:res.passport,number:0
+msgid "Passport No"
+msgstr "No du passeport"
+
+#. module: partner_multi_passport
+#: help:res.passport,partner_id:0
+msgid "Contact."
+msgstr "Contact."
+
+#. module: partner_multi_passport
+#: help:res.passport,expiration_date:0
+msgid "Expiration date."
+msgstr "Date d'expiration."
+
+#. module: partner_multi_passport
+#: view:res.partner:0
+msgid "Owner name (As printed into the passport)"
+msgstr "Nom du propriétaire (Comme écrit sur le passeport)"
+
+#. module: partner_multi_passport
+#: field:res.passport,partner_id:0
+msgid "Contact"
+msgstr "Contact"
+
+#. module: partner_multi_passport
+#: help:res.passport,number:0
+msgid "Passport number."
+msgstr "Numéro du passeport."
+
+#. module: partner_multi_passport
+#: selection:res.passport,gender:0
+msgid "Female"
+msgstr "Femme"
+
+#. module: partner_multi_passport
+#: help:res.passport,name:0
+msgid "Owner name (As printed into the passport)."
+msgstr "Nom du propriétaire (Comme écrit sur le passeport)."
+
+#. module: partner_multi_passport
+#: model:ir.model,name:partner_multi_passport.model_res_partner
+msgid "Partner"
+msgstr "Partenaire"
+
+#. module: partner_multi_passport
+#: help:res.passport,birth_date:0
+msgid "Birth Date."
+msgstr "Date de naissance."
+
+#. module: partner_multi_passport
+#: selection:res.passport,gender:0
+msgid "Male"
+msgstr "Homme"
+
+#. module: partner_multi_passport
+#: help:res.passport,country_id:0
+msgid "Delivery country."
+msgstr "Pays de délivrance."
+
+#. module: partner_multi_passport
+#: field:res.passport,expiration_date:0
+msgid "Expiration date"
+msgstr "Date d'expiration"
+
+#. module: partner_multi_passport
+#: field:res.passport,birth_date:0
+msgid "Birth Date"
+msgstr "Date de naissance"

=== added file 'partner_multi_passport/i18n/partner_multi_passport.pot'
--- partner_multi_passport/i18n/partner_multi_passport.pot	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/i18n/partner_multi_passport.pot	2014-01-22 21:48:26 +0000
@@ -0,0 +1,118 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* partner_multi_passport
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-10 21:36+0000\n"
+"PO-Revision-Date: 2014-01-10 16:36-0500\n"
+"Last-Translator: EL Hadji DEM <elhadji.dem@xxxxxxxxxxxxxxxxxxxx>\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: partner_multi_passport
+#: help:res.passport,gender:0
+msgid "Gender."
+msgstr ""
+
+#. module: partner_multi_passport
+#: model:ir.model,name:partner_multi_passport.model_res_passport
+#: view:res.partner:0 field:res.partner,passport_ids:0
+msgid "Passport"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,country_id:0
+msgid "Delivery country"
+msgstr ""
+
+#. module: partner_multi_passport
+#: view:res.partner:0
+msgid "Passport Details"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,name:0
+msgid "Owner name"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,gender:0
+msgid "Gender"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,number:0
+msgid "Passport No"
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,partner_id:0
+msgid "Contact."
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,expiration_date:0
+msgid "Expiration date."
+msgstr ""
+
+#. module: partner_multi_passport
+#: view:res.partner:0
+msgid "Owner name (As printed into the passport)"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,partner_id:0
+msgid "Contact"
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,number:0
+msgid "Passport number."
+msgstr ""
+
+#. module: partner_multi_passport
+#: selection:res.passport,gender:0
+msgid "Female"
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,name:0
+msgid "Owner name (As printed into the passport)."
+msgstr ""
+
+#. module: partner_multi_passport
+#: model:ir.model,name:partner_multi_passport.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,birth_date:0
+msgid "Birth Date."
+msgstr ""
+
+#. module: partner_multi_passport
+#: selection:res.passport,gender:0
+msgid "Male"
+msgstr ""
+
+#. module: partner_multi_passport
+#: help:res.passport,country_id:0
+msgid "Delivery country."
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,expiration_date:0
+msgid "Expiration date"
+msgstr ""
+
+#. module: partner_multi_passport
+#: field:res.passport,birth_date:0
+msgid "Birth Date"
+msgstr ""

=== added file 'partner_multi_passport/res_partner.py'
--- partner_multi_passport/res_partner.py	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/res_partner.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,32 @@
+# -*- 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 res_partner(orm.Model):
+    _inherit = 'res.partner'
+    _columns = {
+        'passport_ids': fields.one2many('res.passport', 'partner_id', 'Passport'),
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'partner_multi_passport/res_partner_view.xml'
--- partner_multi_passport/res_partner_view.xml	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/res_partner_view.xml	2014-01-22 21:48:26 +0000
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <record id="view_contact_by_function_form" model="ir.ui.view">
+      <field name="name">contact.functions.form.inherit</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="base.view_partner_form"/>
+      <field name="arch" type="xml">
+        <notebook position="inside">
+          <page string="Passport" attrs="{'invisible': ['|','|',('is_company','=',True),('contact_id','!=',False)]}">
+            <field name="passport_ids" nolabel="1">
+              <tree string="Passport Details">
+                <field name="name"/>
+                <field name="number"/>
+                <field name="country_id"/>
+                <field name="expiration_date"/>
+              </tree>
+              <form string="Passport" version="7.0">
+                    <group col="4">
+                        <field name="name" string="Owner name (As printed into the passport)"/>
+                        <field name="number"/>
+                        <field name="country_id"/>
+                        <field name="expiration_date"/>
+                        <field name="birth_date"/>
+                        <field name="gender"/>
+                        <field name="partner_id" invisible="1"/>
+                    </group>
+                </form>
+            </field>
+          </page>
+        </notebook>
+      </field>
+    </record>
+  </data>
+</openerp>

=== added file 'partner_multi_passport/res_passport.py'
--- partner_multi_passport/res_passport.py	1970-01-01 00:00:00 +0000
+++ partner_multi_passport/res_passport.py	2014-01-22 21:48:26 +0000
@@ -0,0 +1,47 @@
+# -*- 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 fields, orm
+
+
+class res_passport(orm.Model):
+    _description = 'Passport'
+    _name = 'res.passport'
+    _columns = {
+        'name': fields.char('Owner name', size=256, required=True, select=True,
+                            help='Owner name (As printed into the passport).'),
+        'number': fields.char('Passport No', size=50, required=True,
+                              help='Passport number.'),
+        'country_id': fields.many2one('res.country', 'Delivery country',
+                                      required=True,
+                                      help="Delivery country."),
+        'expiration_date': fields.date('Expiration date', required=True,
+                                       help="Expiration date."),
+        'birth_date': fields.date('Birth Date', help="Birth Date."),
+        'gender': fields.selection([('male', 'Male'),
+                                    ('female', 'Female')],
+                                   'Gender',
+                                   help="Gender."),
+        'partner_id': fields.many2one('res.partner', 'Contact', help="Contact."),
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: