← Back to team overview

savoirfairelinux-openerp team mailing list archive

[Merge] lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules into lp:partner-contact-management

 

Sandy Carter (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules into lp:partner-contact-management.

Requested reviews:
  Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter)
  Partner and Contact Core Editors (partner-contact-core-editors)

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

- [ADD] added base_contact_by_functions module: It allow to manage contacts by function"
- [ADD] Added base_contact_by_functions_partner_firstname  module: It allows to add firstname before name.Name is considered like the lastname and we have firstname and lastname on partner view and contact view."
The base_contact_by_functions_partner_firstname  module depends on partner_firstname and base_contact_by_functions module.
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules/+merge/217775
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules.
=== added directory 'base_contact_by_functions'
=== added file 'base_contact_by_functions/__init__.py'
--- base_contact_by_functions/__init__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/__init__.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,27 @@
+# -*- 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 . import res_partner
+from . import functions
+from . import res_institutions
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/__openerp__.py'
--- base_contact_by_functions/__openerp__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/__openerp__.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,56 @@
+# -*- 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': 'Contacts by Functions',
+    'version': '0.1',
+    'author': 'Savoir-faire Linux',
+    'maintainer': 'Savoir-faire Linux',
+    'website': 'http://www.savoirfairelinux.com',
+    'category': 'Customer Relationship Management',
+    'description': """
+Contacts by Functions
+=====================
+
+This module allows you to manage contacts by functions
+
+Contributors
+------------
+* EL Hadji Dem (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+""",
+    'depends': [
+        'base_contact',
+    ],
+    'external_dependencies': {},
+    'data': [
+        'functions_view.xml',
+        'res_institutions_view.xml',
+        'res_partner_view.xml',
+        'security/ir.model.access.csv',
+    ],
+    'demo': [],
+    'test': [],
+    'installable': True,
+    'active': False,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/functions.py'
--- base_contact_by_functions/functions.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/functions.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,41 @@
+# -*- 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 functions(orm.Model):
+    _description = 'Functions'
+    _name = 'functions'
+    _columns = {
+        'name': fields.char('Name', size=256, required=True, select=True,
+                            help='Name of function.'),
+        'acronym': fields.char('Acronym', size=50, help='Acronym of function.'),
+        'partner_ids': fields.many2many('res.partner',
+                                        'function_partner_rel',
+                                        'function_id',
+                                        'partner_id',
+                                        'Functions'),
+        'institution_id': fields.many2one("res.institution", 'institution'),
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/functions_view.xml'
--- base_contact_by_functions/functions_view.xml	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/functions_view.xml	2014-04-30 15:00:54 +0000
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<openerp>
+  <data>
+    <!-- Tree Views functions-->
+    <record model="ir.ui.view" id="functions_tree_view">
+      <field name="name">Functions Tree View</field>
+      <field name="model">functions</field>
+      <field name="type">tree</field>
+      <field name="arch" type="xml">
+        <tree string="FunctionsTree" version="7.0">
+           <field name="name"/>
+           <field name="acronym"/>
+        </tree>
+      </field>
+    </record>
+     <!-- Form Views functions-->
+    <record model="ir.ui.view" id="functions_form_view">
+      <field name="name">Functions Form View</field>
+      <field name="model">functions</field>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <form string="FunctionsForm" version="7.0" >
+           <group col="4">
+              <field name="name"/>
+              <field name="acronym"/>
+          </group>
+        </form>
+      </field>
+    </record>
+     <!-- Actions -->
+    <record model="ir.actions.act_window" id="action_functions_tree_list">
+        <field name="name">Functions</field>
+        <field name="view_id" ref="functions_tree_view"/>
+        <field name="res_model">functions</field>
+        <field name="view_mode">tree,form</field>
+    </record>
+  </data>
+</openerp>

=== added directory 'base_contact_by_functions/i18n'
=== added file 'base_contact_by_functions/i18n/base_contact_by_functions.pot'
--- base_contact_by_functions/i18n/base_contact_by_functions.pot	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/i18n/base_contact_by_functions.pot	2014-04-30 15:00:54 +0000
@@ -0,0 +1,353 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* base_contact_by_functions
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-28 22:15+0000\n"
+"PO-Revision-Date: 2014-01-28 17:15-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: base_contact_by_functions
+#: field:res.category.functions,category_id:0
+msgid "Category"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "City"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:functions,partner_ids:0
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_functions_tree_list
+#: model:ir.model,name:base_contact_by_functions.model_functions
+#: field:res.category.functions,functions_id:0 view:res.institution:0
+#: field:res.institution,institutionfunction_ids:0
+#: field:res.institution.functions,functions_id:0 view:res.partner:0
+#: field:res.partner,functions_ids:0 view:res.partner.category:0
+#: field:res.partner.category,categoryfunction_ids:0
+msgid "Functions"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "History (Functions)"
+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
+#: help:res.partner,delivered_country:0
+msgid "Country for which a passport is delivered"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_contact_form
+msgid "Contacts"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Street..."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "Add functions for this institution"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:functions:0 view:res.institution:0 view:res.partner.category:0
+msgid "FunctionsTree"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: sql_constraint:res.institution:0
+msgid "Name already exists"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "State"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:res.category.functions,sequence:0
+#: help:res.institution.functions,sequence:0
+msgid "Used to order"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:functions:0 view:res.institution:0 view:res.partner.category:0
+msgid "FunctionsForm"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "e.g. Sales Director"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:functions,acronym:0
+msgid "Acronym of function."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Tags..."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,start_date:0
+msgid "Start date"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "InstitutionsForm"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Fax:"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,expiration_date:0
+msgid "Expiration date"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Function"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Parent Organism"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Zip"
+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 ""
+
+#. module: base_contact_by_functions
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_customer_form
+msgid "Company"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_category_functions
+msgid "Categories functions"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:res.institution,name:0
+msgid "Name of institution."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:res.partner,naming:0
+msgid "Naming."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Tag"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Passport information"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Address"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Parent organism"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "have the  same form for contact and other postions"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Select functions for this organism"
+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 ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "ZIP"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Use organism address"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Country"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:functions,institution_id:0
+msgid "institution"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Is an Organism"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,function_id:0
+msgid "Position Occupied"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Contact"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:res.institution,sequence:0
+msgid "Used to order the institutions"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Mobile:"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_partner_category
+msgid "Partner Categories"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Organism"
+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
+msgid "Institutions"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "History"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,end_date:0
+msgid "End date"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner.category:0
+msgid "Add function"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "InstitutionsTree"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.category.functions,sequence:0 field:res.institution,sequence:0
+#: field:res.institution.functions,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Bank Accounts"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "No, Street, Apartment/Office"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Use address organism"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:functions,acronym:0
+msgid "Acronym"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:functions,name:0
+msgid "Name of function."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: help:res.partner,passport_number:0
+msgid "Passport number."
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,passport_number:0
+msgid "Passport Number"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: base_contact_by_functions
+#: field:res.partner,naming:0
+msgid "Naming"
+msgstr ""

=== added file 'base_contact_by_functions/i18n/fr.po'
--- base_contact_by_functions/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/i18n/fr.po	2014-04-30 15:00:54 +0000
@@ -0,0 +1,353 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* base_contact_by_functions
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-29 15:16+0000\n"
+"PO-Revision-Date: 2014-01-29 10:19-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: base_contact_by_functions
+#: field:res.category.functions,category_id:0
+msgid "Category"
+msgstr "Catégorie"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "City"
+msgstr "Ville"
+
+#. module: base_contact_by_functions
+#: field:functions,partner_ids:0
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_functions_tree_list
+#: model:ir.model,name:base_contact_by_functions.model_functions
+#: field:res.category.functions,functions_id:0 view:res.institution:0
+#: field:res.institution,institutionfunction_ids:0
+#: field:res.institution.functions,functions_id:0 view:res.partner:0
+#: field:res.partner,functions_ids:0 view:res.partner.category:0
+#: field:res.partner.category,categoryfunction_ids:0
+msgid "Functions"
+msgstr "Fonctions"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "History (Functions)"
+msgstr "Historique (Fonctions)"
+
+#. 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
+#: help:res.partner,delivered_country:0
+msgid "Country for which a passport is delivered"
+msgstr "Pays pour lequel le passeport est délivré"
+
+#. module: base_contact_by_functions
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_contact_form
+msgid "Contacts"
+msgstr "Contacts"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Street..."
+msgstr "Rue..."
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "Add functions for this institution"
+msgstr "Ajouter des fonctions de cette institution"
+
+#. module: base_contact_by_functions
+#: view:functions:0 view:res.institution:0 view:res.partner.category:0
+msgid "FunctionsTree"
+msgstr "FonctionsTree"
+
+#. module: base_contact_by_functions
+#: sql_constraint:res.institution:0
+msgid "Name already exists"
+msgstr "Le nom existe déjà"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "State"
+msgstr "Etat"
+
+#. module: base_contact_by_functions
+#: help:res.category.functions,sequence:0
+#: help:res.institution.functions,sequence:0
+msgid "Used to order"
+msgstr "Permet d'ordonner"
+
+#. module: base_contact_by_functions
+#: view:functions:0 view:res.institution:0 view:res.partner.category:0
+msgid "FunctionsForm"
+msgstr "FonctionsForm"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "e.g. Sales Director"
+msgstr "ex: Directeur de vente"
+
+#. module: base_contact_by_functions
+#: help:functions,acronym:0
+msgid "Acronym of function."
+msgstr "Acronyme de la fonction."
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Tags..."
+msgstr "Etiquettes..."
+
+#. module: base_contact_by_functions
+#: field:res.partner,start_date:0
+msgid "Start date"
+msgstr "Date de début"
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "InstitutionsForm"
+msgstr "InstitutionsForm"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Fax:"
+msgstr "Télécopie :"
+
+#. module: base_contact_by_functions
+#: field:res.partner,expiration_date:0
+msgid "Expiration date"
+msgstr "Date d'expiration"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Function"
+msgstr "Fonction"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Fax"
+msgstr "Télécopie"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Parent Organism"
+msgstr "Organisme parent"
+
+#. 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"
+
+#. module: base_contact_by_functions
+#: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_customer_form
+msgid "Company"
+msgstr "Organisme"
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_category_functions
+msgid "Categories functions"
+msgstr "Catégories functions"
+
+#. module: base_contact_by_functions
+#: help:res.institution,name:0
+msgid "Name of institution."
+msgstr "Nom de l'institution."
+
+#. module: base_contact_by_functions
+#: help:res.partner,naming:0
+msgid "Naming."
+msgstr "Appellation"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Tag"
+msgstr "Etiquette"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Passport information"
+msgstr "Informations du passeport"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Address"
+msgstr "Adresse"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Parent organism"
+msgstr "Organisme parent"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "have the  same form for contact and other postions"
+msgstr "Avoir le même formulaire de contact et d'autres postions"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Select functions for this organism"
+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"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "ZIP"
+msgstr "Code postal"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Use organism address"
+msgstr "Utilisez l'adresse de l'organisme"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Country"
+msgstr "Pays"
+
+#. module: base_contact_by_functions
+#: field:functions,institution_id:0
+msgid "institution"
+msgstr "institution"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Is an Organism"
+msgstr "Est un Organisme"
+
+#. module: base_contact_by_functions
+#: field:res.partner,function_id:0
+msgid "Position Occupied"
+msgstr "Fonction Occupée"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Contact"
+msgstr "Contact"
+
+#. module: base_contact_by_functions
+#: help:res.institution,sequence:0
+msgid "Used to order the institutions"
+msgstr "Permet d'ordonner les institutions"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Mobile:"
+msgstr "Portable :"
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_partner_category
+msgid "Partner Categories"
+msgstr "Catégories de partenaires"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Organism"
+msgstr "Organisme"
+
+#. 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
+msgid "Institutions"
+msgstr "Institutions"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "History"
+msgstr "Historique"
+
+#. module: base_contact_by_functions
+#: field:res.partner,end_date:0
+msgid "End date"
+msgstr "Date de fin"
+
+#. module: base_contact_by_functions
+#: view:res.partner.category:0
+msgid "Add function"
+msgstr "Ajouter fonction"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Coordonnées bancaires"
+
+#. module: base_contact_by_functions
+#: view:res.institution:0
+msgid "InstitutionsTree"
+msgstr "InstitutionsTree"
+
+#. module: base_contact_by_functions
+#: field:res.category.functions,sequence:0 field:res.institution,sequence:0
+#: field:res.institution.functions,sequence:0
+msgid "Sequence"
+msgstr "Séquence"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Bank Accounts"
+msgstr "Comptes bancaires"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "No, Street, Apartment/Office"
+msgstr "No, Rue, Appartement/Bureau"
+
+#. module: base_contact_by_functions
+#: view:res.partner:0
+msgid "Use address organism"
+msgstr "Utiliser l'adresse de l'organisme"
+
+#. module: base_contact_by_functions
+#: field:functions,acronym:0
+msgid "Acronym"
+msgstr "Acronyme"
+
+#. module: base_contact_by_functions
+#: help:functions,name:0
+msgid "Name of function."
+msgstr "Nom de la fonction."
+
+#. module: base_contact_by_functions
+#: help:res.partner,passport_number:0
+msgid "Passport number."
+msgstr "Numéro de passeport."
+
+#. module: base_contact_by_functions
+#: field:res.partner,passport_number:0
+msgid "Passport Number"
+msgstr "Numéro de passeport."
+
+#. module: base_contact_by_functions
+#: model:ir.model,name:base_contact_by_functions.model_res_partner
+msgid "Partner"
+msgstr "Partenaire"
+
+#. module: base_contact_by_functions
+#: field:res.partner,naming:0
+msgid "Naming"
+msgstr "Appellation"

=== added file 'base_contact_by_functions/res_institutions.py'
--- base_contact_by_functions/res_institutions.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/res_institutions.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,49 @@
+# -*- 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_institutions(orm.Model):
+    _description = 'Institutions'
+    _name = 'res.institution'
+    _order = 'sequence asc'
+    _columns = {
+        'name': fields.char('Name', size=256, required=True, select=True,
+                            help='Name of institution.'),
+        'sequence': fields.integer('Sequence', help="Used to order the institutions"),
+        'institutionfunction_ids': fields.one2many('res.institution.functions', 'institution_id', 'Functions'),
+    }
+    _sql_constraints = [('institution_name_unique', 'unique(name)', 'Name already exists')]
+
+
+class res_institutions_functions(orm.Model):
+    _description = 'Institutions functions'
+    _name = 'res.institution.functions'
+    _order = 'sequence asc'
+    _columns = {
+        'functions_id': fields.many2one('functions', 'Functions', required='True'),
+        'sequence': fields.integer('Sequence', help="Used to order"),
+        'institution_id': fields.many2one('res.institution', 'Institutions'),
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/res_institutions_view.xml'
--- base_contact_by_functions/res_institutions_view.xml	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/res_institutions_view.xml	2014-04-30 15:00:54 +0000
@@ -0,0 +1,55 @@
+<?xml version="1.0" ?>
+<openerp>
+  <data>
+    <!-- Tree Views Institutions-->
+    <record model="ir.ui.view" id="institutions_tree_view">
+      <field name="name">Institutions Tree View</field>
+      <field name="model">res.institution</field>
+      <field name="type">tree</field>
+      <field name="arch" type="xml">
+        <tree string="InstitutionsTree" version="7.0">
+           <field name="name"/>
+           <field name="sequence"/>
+        </tree>
+      </field>
+    </record>
+     <!-- Form Views Institutions-->
+    <record model="ir.ui.view" id="institutions_form_view">
+      <field name="name">Institutions Form View</field>
+      <field name="model">res.institution</field>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <form string="InstitutionsForm" version="7.0" >
+           <group col="4">
+              <field name="name"/>
+              <field name="sequence"/>
+          </group>
+          <notebook position="inside">
+            <page string="Functions">
+              <separator string="Add functions for this institution"/>
+              <group col="2" colspan="4">
+                <field name="institutionfunction_ids" nolabel="1">
+                  <tree string="FunctionsTree">
+                    <field name="sequence"/>
+                    <field name="functions_id"/>
+                  </tree>
+                  <form string="FunctionsForm">
+                    <field name="functions_id"/>
+                    <field name="sequence"/>
+                  </form>
+                </field>
+              </group>
+            </page>
+          </notebook>
+        </form>
+      </field>
+    </record>
+     <!-- Actions -->
+    <record model="ir.actions.act_window" id="action_institutions_tree_list">
+        <field name="name">Institutions</field>
+        <field name="view_id" ref="institutions_tree_view"/>
+        <field name="res_model">res.institution</field>
+        <field name="view_mode">tree,form</field>
+    </record>
+  </data>
+</openerp>

=== added file 'base_contact_by_functions/res_partner.py'
--- base_contact_by_functions/res_partner.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/res_partner.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,102 @@
+# -*- 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 time
+from openerp.osv import orm, fields
+
+
+class res_partner_category(orm.Model):
+    """
+    Inherits partner_category
+    """
+    _inherit = 'res.partner.category'
+    _columns = {
+        'categoryfunction_ids': fields.one2many('res.category.functions', 'category_id', 'Functions'),
+    }
+
+
+class res_category_functions(orm.Model):
+    """
+    Adds this class to link category and functions
+    """
+    _description = 'Categories functions'
+    _name = 'res.category.functions'
+    _order = 'sequence asc'
+    _columns = {
+        'functions_id': fields.many2one('functions', 'Functions', required='True'),
+        'sequence': fields.integer('Sequence', help="Used to order"),
+        'category_id': fields.many2one('res.partner.category', 'Category'),
+    }
+
+
+class res_partner(orm.Model):
+    """
+    Inherits partner and adds functions_ids : List of functions
+    """
+    _inherit = 'res.partner'
+
+    def onchange_partner_function(self, cr, uid, ids, part, context=None):
+        if not part:
+            return {'value': None}
+        partner_ids = self.pool.get('res.partner').search(cr, uid, [('id', '=', part)])
+        functions_ids = self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context)[0].functions_ids
+        result = []
+        if functions_ids:
+            for line in functions_ids:
+                result.append(line.id)
+        dom = {'function_id': [('id', 'in', result)]}
+        return {'domain': dom}
+
+    def _get_history_lines(self, cr, uid, ids, name, arg, context=None):
+        res = {}
+        res_partner_pool = self.pool.get('res.partner')
+        for record in self.browse(cr, uid, ids, context=context):
+
+            if record.is_company:
+                return res
+            contact_ids = res_partner_pool.search(cr, uid,
+                                                  [('contact_id', '=', record.id),
+                                                   ('active', '=', False)],
+                                                  context=context)
+            res[record.id] = [x.id for x in res_partner_pool.browse(cr, uid, contact_ids)
+                              if x.end_date and x.end_date <= time.strftime('%Y-%m-%d')]
+        return res
+
+    _columns = {
+        'functions_ids': fields.many2many('functions', 'function_partner_rel', 'partner_id',
+                                          'function_id', 'Functions'),
+        'start_date': fields.date('Start date'),
+        'end_date': fields.date('End date'),
+        'naming': fields.char('Naming', size=256, help="Naming."),
+        'function_id': fields.many2one('functions', 'Position Occupied'),
+        'other_contact_history_ids': fields.function(_get_history_lines,
+                                                     relation="res.partner",
+                                                     method=True,
+                                                     type="one2many"),
+        # Replace company by Organism
+        'use_parent_address': fields.boolean(
+            'Use Organism Address',
+            help="Select this if you want to set organism's address information  for this contact"),
+
+    }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/res_partner_view.xml'
--- base_contact_by_functions/res_partner_view.xml	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/res_partner_view.xml	2014-04-30 15:00:54 +0000
@@ -0,0 +1,526 @@
+<?xml version = "1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <!--Add list of functions in partner view-->
+    <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">
+        <field name="use_parent_address" position="replace">
+          <field name="use_parent_address"
+                 class="oe_edit_only oe_inline"
+                 on_change="onchange_address(use_parent_address, parent_id)"
+                 attrs="{'invisible': [('parent_id','=', False),('use_parent_address','=',False)]}"
+                 string="Use organism address"/>
+        </field>
+        <label for="use_parent_address" position="replace">
+             <label for="use_parent_address"
+                    class="oe_edit_only"
+                    attrs="{'invisible': [('parent_id','=', False),('use_parent_address','=',False)]}"
+                    string="Use organism address"/>
+        </label>
+        <!--Add ')' at the end of 'Is an Organism?'-->
+        <label for="is_company" position="replace">
+             <label for="is_company" string="Is an Organism"/>)
+        </label>
+        <!--Replace Street placeholder by No, Street, Apartment/Office-->
+        <field name="street" position="attributes">
+          <attribute name="placeholder">No, Street, Apartment/Office</attribute>
+        </field>
+        <field name="fax" position="attributes">
+          <attribute name="string">Fax</attribute>
+        </field>
+
+        <notebook position="inside">
+          <page string="Functions"
+                attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}"
+                autofocus="autofocus">
+            <separator string="Select functions for this organism"/>
+            <field name="functions_ids"/>
+          </page>
+          <page string="History (Functions)" attrs="{'invisible': ['|','|',('is_company','=',True),('contact_id','!=',False),('other_contact_history_ids','=',[])]}">
+            <separator string="History"/>
+            <field name="other_contact_history_ids" mode="kanban"
+                   attrs="{'invisible': [('other_contact_history_ids','=',False)]}">
+              <kanban>
+                <field name="color"/>
+                <field name="name"/>
+                <field name="title"/>
+                <field name="email"/>
+                <field name="parent_id" string="Organism"/>
+                <field name="is_company"/>
+                <field name="function_id" string="Function"/>
+                <field name="phone"/>
+                <field name="street"/>
+                <field name="street2"/>
+                <field name="zip"/>
+                <field name="city"/>
+                <field name="country_id"/>
+                <field name="mobile"/>
+                <field name="fax"/>
+                <field name="state_id"/>
+                <field name="has_image"/>
+                <templates>
+                  <t t-name="kanban-box">
+                    <div class="oe_kanban_vignette oe_semantic_html_override">
+                      <a type="open">
+                        <t t-if="record.has_image.raw_value === true">
+                          <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)"
+                               class="oe_kanban_image"/>
+                        </t>
+                        <t t-if="record.has_image.raw_value === false">
+                          <t t-if="record.is_company.raw_value === true">
+                            <img t-att-src='_s + "/base/static/src/img/company_image.png"'
+                               class="oe_kanban_image"/>
+                          </t>
+                          <t t-if="record.is_company.raw_value === false">
+                            <img t-att-src='_s + "/base/static/src/img/avatar.png"'
+                              class="oe_kanban_image"/>
+                          </t>
+                        </t>
+                      </a>
+                      <div class="oe_kanban_details">
+                        <h4 class="oe_partner_heading">
+                          <a type="open">
+                            <field name="name"/>
+                          </a>
+                        </h4>
+                        <div class="oe_kanban_partner_categories"/>
+                        <div class="oe_kanban_partner_links"/>
+                        <ul>
+                          <li t-if="!record.parent_id.raw_value and record.function_id.raw_value">
+                            <field name="function_id"/>
+                          </li>
+                          <li t-if="record.parent_id.raw_value and record.function_id.raw_value">
+                            <field name="function_id"/>
+                            ,
+                            <field name="parent_id"/>
+                          </li>
+                          <li t-if="record.city.raw_value and !record.country.raw_value">
+                            <field name="city"/>
+                          </li>
+                          <li t-if="!record.city.raw_value and record.country.raw_value">
+                            <field name="country"/>
+                          </li>
+                          <li t-if="record.city.raw_value and record.country.raw_value">
+                            <field name="city"/>
+                            ,
+                            <field name="country"/>
+                          </li>
+                          <li t-if="record.email.raw_value">
+                            <a t-attf-href="mailto:#{record.email.raw_value}";>
+                              <field name="email"/>
+                            </a>
+                          </li>
+                        </ul>
+                    </div>
+                    </div>
+                  </t>
+                </templates>
+              </kanban>
+              <form string="Contact" version="7.0">
+                <sheet>
+                  <field name="image" widget='image' class="oe_avatar oe_left"
+                         options='{"preview_image": "image_medium"}'/>
+                  <div class="oe_title">
+                      <label for="name" class="oe_edit_only"/>
+                        <h1>
+                          <field name="name" style="width: 70%%"/>
+                        </h1>
+                  </div>
+                  <group>
+                    <!-- inherited part -->
+                    <field name="category_id" widget="many2many_tags"
+                           placeholder="Tags..." style="width: 70%%" string="Tag"/>
+                    <field name="parent_id"
+                           placeholder="Organism"
+                           domain="[('is_company','=',True)]"
+                           string="Parent Organism"/>
+                    <!-- inherited part end -->
+                    <field name="function_id" placeholder="e.g. Sales Director"/>
+                    <group colspan="4">
+                      <field name="start_date" />
+                      <field name="end_date"/>
+                      <field name="naming"/>
+                    </group>
+                    <field name="email"/>
+                    <field name="phone"/>
+                    <field name="mobile"/>
+                  </group>
+                  <div>
+                      <field name="use_parent_address"/>
+                      <label for="use_parent_address" string="Use organism address"/>
+                  </div>
+                  <group>
+                    <label for="type"/>
+                    <div name="div_type">
+                        <field class="oe_inline" name="type"/>
+                    </div>
+                    <label for="street" string="Address"
+                           attrs="{'invisible': [('use_parent_address','=', True)]}"/>
+                    <div attrs="{'invisible': [('use_parent_address','=', True)]}"
+                         name="div_address">
+                        <field name="street" placeholder="Street..."/>
+                        <field name="street2"/>
+                        <div class="address_format">
+                          <field name="city" placeholder="City" style="width: 40%%"/>
+                          <field name="state_id" class="oe_no_button"
+                                 placeholder="State" style="width: 37%%"
+                                 options='{"no_open": True}' on_change="onchange_state(state_id)"/>
+                          <field name="zip" placeholder="ZIP" style="width: 20%%"/>
+                        </div>
+                        <field name="country_id" placeholder="Country"
+                               class="oe_no_button" options='{"no_open": True}'/>
+                    </div>
+                  </group>
+                  <field name="supplier" invisible="True"/>
+                  <group string="Bank Accounts">
+                    <field name="bank_ids" nolabel="1">
+                      <tree string="Bank Details">
+                          <field name="state" invisible="1"/>
+                          <field name="sequence" invisible="1"/>
+                          <field name="acc_number"/>
+                          <field name="bank_name"/>
+                          <field name="owner_name"/>
+                      </tree>
+                    </field>
+                  </group>
+                </sheet>
+              </form>
+            </field>
+          </page>
+        </notebook>
+        <!--Replace function by function_id defined by organism-->
+        <field name="function" position="replace"/>
+      </field>
+
+    </record>
+    <!--Add  start_date, end_date, naming and account bank in partner view-->
+    <record id="view_position_info_form" model="ir.ui.view">
+      <field name="name">position.info.form.inherit</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="base_contact.view_partner_form_inherit"/>
+      <field name="arch" type="xml">
+        <xpath expr="//field[@name='other_contact_ids']/form//field[@name='category_id']"
+                 position="attributes">
+          <attribute name="string">Tag</attribute>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/form//field[@name='function']"
+               position="after">
+          <group colspan="4">
+            <field name="start_date" />
+            <field name="end_date"/>
+             <field name="naming"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/form//field[@name='supplier']"
+               position="after">
+          <group string="Bank Accounts">
+            <field name="bank_ids" nolabel="1"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/form//field[@name='parent_id']"
+               position="replace">
+          <group colspan="4">
+            <field name="parent_id" placeholder="Organism"
+                   domain="[('is_company','=',True)]"
+                   on_change="onchange_partner_function(parent_id)"
+                   string="Parent Organism"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/form//field[@name='function']"
+               position="replace">
+          <group colspan="4">
+            <field name="function_id" string="Function"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/form//label[@for='use_parent_address']"
+               position="replace">
+          <label for="use_parent_address" string="Use address organism"/>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='function']"
+               position="replace">
+          <group colspan="4">
+            <field name="function_id" string="Function"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='has_image']"
+               position="after">
+          <templates>
+            <t t-name="kanban-box">
+              <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
+              <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')"
+                   style="position: relative">
+                <a t-if="! read_only_mode" type="delete"
+                   style="position: absolute; right: 0; padding: 4px; diplay: inline-block">
+                  X
+                </a>
+                <div class="oe_module_vignette">
+                  <a type="open">
+                    <t t-if="record.has_image.raw_value === true">
+                      <img t-att-src="kanban_image('res.partner', 'image',
+                        record.id.value, {'preview_image': 'image_small'})"
+                           class="oe_avatar oe_kanban_avatar_smallbox"/>
+                    </t>
+                    <t t-if="record.image and record.image.raw_value !== false">
+                      <img t-att-src="'data:image/png;base64,'+record.image.raw_value"
+                           class="oe_avatar oe_kanban_avatar_smallbox"/>
+                    </t>
+                    <t t-if="record.has_image.raw_value === false
+                      and (!record.image or record.image.raw_value === false)">
+                      <t t-if="record.is_company.raw_value === true">
+                        <img t-att-src='_s + "/base/static/src/img/company_image.png"'
+                             class="oe_kanban_image oe_kanban_avatar_smallbox"/>
+                      </t>
+                      <t t-if="record.is_company.raw_value === false">
+                        <img t-att-src='_s + "/base/static/src/img/avatar.png"'
+                             class="oe_kanban_image oe_kanban_avatar_smallbox"/>
+                      </t>
+                    </t>
+                  </a>
+                  <div class="oe_module_desc">
+                    <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
+                      <table class="oe_kanban_table">
+                        <tr>
+                          <td class="oe_kanban_title1" align="left" valign="middle">
+                            <h4>
+                              <a type="open">
+                                <field name="name"/>
+                              </a>
+                            </h4>
+                            <i>
+                              <t t-if="record.parent_id.raw_value and !record.function_id.raw_value">
+                                <field name="parent_id"/>
+                              </t>
+                              <t t-if="!record.parent_id.raw_value and record.function_id.raw_value">
+                                <field name="function_id"/>
+                              </t>
+                              <t t-if="record.parent_id.raw_value and record.function_id.raw_value">
+                                <field name="function_id"/>
+                                ,
+                                <field name="parent_id"/>
+                              </t>
+                            </i>
+                            <div>
+                              <a t-if="record.email.raw_value" title="Mail"
+                                 t-att-href="'mailto:'+record.email.value">
+                                <field name="email"/>
+                              </a>
+                            </div>
+                            <div t-if="record.phone.raw_value">
+                              Phone: <field name="phone"/>
+                            </div>
+                            <div t-if="record.mobile.raw_value">
+                              Mobile: <field name="mobile"/>
+                            </div>
+                            <div t-if="record.fax.raw_value">
+                              Fax: <field name="fax"/>
+                            </div>
+                          </td>
+                        </tr>
+                      </table>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </t>
+          </templates>
+        </xpath>
+        have the  same form for contact and other postions
+        <field name="parent_id" position="replace">
+            <field name="parent_id" placeholder="Parent organism"
+                   domain="[('is_company','=',True)]"
+                   attrs="{'invisible': [('is_company','=', False)]}"/>
+        </field>
+        <xpath expr="//field[@name='child_ids']/form//field[@name='supplier']"
+               position="after">
+          <group string="Bank Accounts">
+            <field name="bank_ids" nolabel="1"/>
+          </group>
+        </xpath>
+
+        <xpath expr="//field[@name='child_ids']/form//field[@name='function']"
+               position="after">
+          <group colspan="4">
+            <field name="start_date" />
+            <field name="end_date"/>
+             <field name="naming"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='child_ids']/form//field[@name='function']"
+               position="replace">
+          <group colspan="4">
+            <field name="parent_id"
+                   placeholder="Organism"
+                   domain="[('is_company','=',True)]"
+                   string="Parent organism" />
+            <field name="function_id"
+                   readonly="False"
+                   domain="[('id', 'in', parent.functions_ids[0][2])]"
+                   string="Function"/>
+          </group>
+        </xpath>
+
+        <xpath expr="//field[@name='child_ids']/form//label[@for='use_parent_address']"
+               position="replace">
+          <label for="use_parent_address" string="Use address organism"/>
+        </xpath>
+
+        <xpath expr="//field[@name='child_ids']/kanban//field[@name='function']"
+               position="replace">
+          <group colspan="4">
+            <field name="function_id" string="Function"/>
+          </group>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='has_image']"
+               position="after">
+          <templates>
+            <t t-name="kanban-box">
+              <div class="oe_kanban_vignette oe_semantic_html_override">
+                <a type="open">
+                  <t t-if="record.has_image.raw_value === true">
+                    <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)"
+                         class="oe_kanban_image"/>
+                  </t>
+                  <t t-if="record.has_image.raw_value === false">
+                    <t t-if="record.is_company.raw_value === true">
+                      <img t-att-src='_s + "/base/static/src/img/company_image.png"'
+                         class="oe_kanban_image"/>
+                    </t>
+                    <t t-if="record.is_company.raw_value === false">
+                      <img t-att-src='_s + "/base/static/src/img/avatar.png"'
+                        class="oe_kanban_image"/>
+                    </t>
+                  </t>
+                </a>
+                <div class="oe_kanban_details">
+                  <h4 class="oe_partner_heading">
+                    <a type="open">
+                      <field name="name"/>
+                    </a>
+                  </h4>
+                  <div class="oe_kanban_partner_categories"/>
+                  <div class="oe_kanban_partner_links"/>
+                  <ul>
+                    <li t-if="record.parent_id.raw_value and !record.function_id.raw_value">
+                      <field name="parent_id"/>
+                    </li>
+                    <li t-if="!record.parent_id.raw_value and record.function_id.raw_value">
+                      <field name="function_id"/>
+                    </li>
+                    <li t-if="record.parent_id.raw_value and record.function_id.raw_value">
+                      <field name="function_id"/>
+                      ,
+                      <field name="parent_id"/>
+                    </li>
+                    <li t-if="record.city.raw_value and !record.country.raw_value">
+                      <field name="city"/>
+                    </li>
+                    <li t-if="!record.city.raw_value and record.country.raw_value">
+                      <field name="country"/>
+                    </li>
+                    <li t-if="record.city.raw_value and record.country.raw_value">
+                      <field name="city"/>
+                      ,
+                      <field name="country"/>
+                    </li>
+                    <li t-if="record.email.raw_value">
+                      <a t-attf-href="mailto:#{record.email.raw_value}";>
+                        <field name="email"/>
+                      </a>
+                    </li>
+                  </ul>
+              </div>
+              </div>
+            </t>
+          </templates>
+        </xpath>
+      </field>
+    </record>
+    <!-- Actions for organism -->
+    <record id="action_partner_customer_form" model="ir.actions.act_window">
+            <field name="name">Company</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">res.partner</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">kanban,tree,form</field>
+            <field name="domain">[('is_company','=',1)]</field>
+            <field name="context" eval="{'default_is_company': True}"/>
+            <field name="filter" eval="True"/>
+        </record>
+    <!-- Actions for Contacts -->
+    <record id="action_partner_contact_form" model="ir.actions.act_window">
+            <field name="name">Contacts</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">res.partner</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">kanban,tree,form</field>
+            <field name="domain">[('is_company','=',0)]</field>
+            <field name="filter" eval="True"/>
+        </record>
+
+    <!--Add country,street fields in tree partner view-->
+    <record model="ir.ui.view" id="view_partner_tree_country_address">
+        <field name="model">res.partner</field>
+        <field name="inherit_id" ref="base.view_partner_tree"/>
+        <field name="arch" type="xml">
+          <field name="country_id" position="replace"/>
+          <field name="name" position="after">
+            <field name="country_id"/>
+          </field>
+          <field name="email" position="after">
+              <field name="street" string="Address"/>
+          </field>
+        </field>
+    </record>
+
+    <!-- Inherit Categories adding functions -->
+    <record id="view_partner_category_functions_form" model="ir.ui.view">
+      <field name="name">Partner Categories Functions</field>
+      <field name="model">res.partner.category</field>
+      <field name="inherit_id" ref="base.view_partner_category_form"/>
+      <field name="arch" type="xml">
+        <xpath expr="//form[@string='Partner Category']/group[1]"
+               position="after">
+          <notebook position="inside">
+            <page string="Functions">
+              <separator string="Add function"/>
+              <group col="2" colspan="4">
+                <field name="categoryfunction_ids" nolabel="1">
+                  <tree string="FunctionsTree">
+                    <field name="sequence"/>
+                    <field name="functions_id"/>
+                  </tree>
+                  <form string="FunctionsForm">
+                    <field name="functions_id"/>
+                    <field name="sequence"/>
+                  </form>
+                </field>
+              </group>
+            </page>
+          </notebook>
+        </xpath>
+      </field>
+    </record>
+
+      <!--Replace company  by organism-->
+    <record id="view_partner_simple_form" model="ir.ui.view">
+        <field name="name">res.partner.simplified.form</field>
+        <field name="model">res.partner</field>
+        <field name="arch" type="xml">
+          <label for="is_company" position="replace">
+               <label for="is_company" string="Is an Organism"/>
+          </label>
+          <field name="parent_id" position="replace">
+               <field name="parent_id"
+                      placeholder="Organism"
+                      domain="[('is_company', '=', True)]"
+                      context="{'default_is_company': True, 'default_supplier': supplier}"
+                      attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}"
+                      on_change="onchange_address(use_parent_address, parent_id)"/>
+                </field>
+          </field>
+    </record>
+  </data>
+</openerp>

=== added directory 'base_contact_by_functions/security'
=== added file 'base_contact_by_functions/security/ir.model.access.csv'
--- base_contact_by_functions/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/security/ir.model.access.csv	2014-04-30 15:00:54 +0000
@@ -0,0 +1,5 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_functions","functions_user","model_functions","base.group_user",1,1,1,1
+"access_res_category_functions","access_res_category_functions_user","model_res_category_functions","base.group_user",1,1,1,1
+"access_res_institution","access_res_institution_user","model_res_institution","base.group_user",1,1,1,1
+"access_res_institution_functions","access_res_institution_functions_user","model_res_institution_functions","base.group_user",1,1,1,1

=== added directory 'base_contact_by_functions/tests'
=== added file 'base_contact_by_functions/tests/__init__.py'
--- base_contact_by_functions/tests/__init__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/tests/__init__.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,31 @@
+# -*- 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 . import test_functions
+from . import test_institutions
+from . import test_partner_category
+
+checks = [
+    test_functions,
+    test_institutions,
+    test_partner_category
+]

=== added file 'base_contact_by_functions/tests/test_functions.py'
--- base_contact_by_functions/tests/test_functions.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/tests/test_functions.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,98 @@
+# -*- 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.tests.common import TransactionCase
+from openerp.osv.orm import browse_record
+
+
+class Base_Test_function(TransactionCase):
+    """
+    Simple test creating a function
+    This is a base class for function test cases.
+    Inherit from this and setup values.
+    """
+
+    def setUp(self, vals={}):
+        """
+        Setting up function.
+        """
+        # Default test values
+        self.vals = {'name': 'This is a test function name',
+                     'acronym': 'This is a test function acronym',
+                     }
+        super(Base_Test_function, self).setUp()
+        self.vals = dict(self.vals.items() + vals.items())
+        # Create the function object; we will be testing this, so store in self
+        function_function = self.registry('functions')
+        self.function_id = function_function.create(self.cr, self.uid, self.vals, context=None)
+
+    def test_function(self):
+        """
+        Checking the function creation.
+        """
+        function_function = self.registry('functions')
+        function_obj = function_function.browse(self.cr, self.uid, self.function_id, context=None)
+        for field in self.vals:
+            val = function_obj[field]
+            if type(val) == browse_record:
+                self.assertEquals(self.vals[field], val.id,
+                                  "IDs for %s don't match: (%i != %i)" %
+                                  (field, self.vals[field], val.id))
+            else:
+                self.assertEquals(str(self.vals[field]), str(val),
+                                  "Values for %s don't match: (%s != %s)" %
+                                  (field, str(self.vals[field]), str(val)))
+
+
+class Test_function_bad(Base_Test_function):
+    """
+    Simple test creating a function, test against bad values
+    """
+    def setUp(self):
+        """
+        Setting up function, then changing the values to test against.
+        """
+        super(Test_function_bad, self).setUp()
+        # Change vals to something wrong
+        self.vals = {'name': 'This is the wrong function name',
+                     'acronym': 'This is the wrong function acronym',
+                     }
+
+    def test_function(self):
+        """
+        Checking the function creation, assertions should all be false.
+        """
+        function_function = self.registry('functions')
+        function_obj = function_function.browse(self.cr, self.uid, self.function_id, context=None)
+        for field in self.vals:
+            val = function_obj[field]
+            if type(val) == browse_record:
+                self.assertNotEqual(self.vals[field], val.id,
+                                    "IDs for %s don't match: (%i != %i)" %
+                                    (field, self.vals[field], val.id))
+            else:
+                self.assertNotEqual(str(self.vals[field]), str(val),
+                                    "Values for %s don't match: (%s != %s)" %
+                                    (field, str(self.vals[field]), str(val)))
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/tests/test_institutions.py'
--- base_contact_by_functions/tests/test_institutions.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/tests/test_institutions.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,99 @@
+# -*- 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.tests.common import TransactionCase
+from openerp.osv.orm import browse_record
+
+
+class Base_Test_institution(TransactionCase):
+    """
+    Simple test creating a institution
+    This is a base class for institution test cases.
+    Inherit from this and setup values.
+    """
+
+    def setUp(self, vals={}):
+        """
+        Setting up institution.
+        """
+        # Default test values
+        self.vals = {'name': 'This is a test institution name',
+                     'sequence': '1',
+                     'institutionfunction_ids': '[]',
+                     }
+        super(Base_Test_institution, self).setUp()
+        self.vals = dict(self.vals.items() + vals.items())
+        # Create the institution object; we will be testing this, so store in self
+        institution_institution = self.registry('res.institution')
+        self.institution_id = institution_institution.create(self.cr, self.uid, self.vals, context=None)
+
+    def test_institution(self):
+        """
+        Checking the institution creation.
+        """
+        institution_institution = self.registry('res.institution')
+        institution_obj = institution_institution.browse(self.cr, self.uid, self.institution_id, context=None)
+        for field in self.vals:
+            val = institution_obj[field]
+            if type(val) == browse_record:
+                self.assertEquals(self.vals[field], val.id,
+                                  "IDs for %s don't match: (%i != %i)" %
+                                  (field, self.vals[field], val.id))
+            else:
+                self.assertEquals(str(self.vals[field]), str(val),
+                                  "Values for %s don't match: (%s != %s)" %
+                                  (field, str(self.vals[field]), str(val)))
+
+
+class Test_institution_bad(Base_Test_institution):
+    """
+    Simple test creating a institution, test against bad values
+    """
+    def setUp(self):
+        """
+        Setting up institution, then changing the values to test against.
+        """
+        super(Test_institution_bad, self).setUp()
+        # Change vals to something wrong
+        self.vals = {'name': 'This is the wrong institution name',
+                     'sequence': '0',
+                     }
+
+    def test_institution(self):
+        """
+        Checking the institution creation, assertions should all be false.
+        """
+        institution_institution = self.registry('res.institution')
+        institution_obj = institution_institution.browse(self.cr, self.uid, self.institution_id, context=None)
+        for field in self.vals:
+            val = institution_obj[field]
+            if type(val) == browse_record:
+                self.assertNotEqual(self.vals[field], val.id,
+                                    "IDs for %s don't match: (%i != %i)" %
+                                    (field, self.vals[field], val.id))
+            else:
+                self.assertNotEqual(str(self.vals[field]), str(val),
+                                    "Values for %s don't match: (%s != %s)" %
+                                    (field, str(self.vals[field]), str(val)))
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions/tests/test_partner_category.py'
--- base_contact_by_functions/tests/test_partner_category.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions/tests/test_partner_category.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,105 @@
+# -*- 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.tests.common import TransactionCase
+from openerp.osv.orm import browse_record
+
+
+class Base_Test_partner_category(TransactionCase):
+    """
+    Simple test creating a partner_category
+    This is a base class for partner_category test cases.
+    Inherit from this and setup values.
+    """
+
+    def setUp(self, vals={}):
+        """
+        Setting up partner_category.
+        """
+        # Default test values
+        self.vals = {'name': 'This is a test partner_category name',
+                     'active': True,
+                     }
+        super(Base_Test_partner_category, self).setUp()
+        # Create the parent
+        partner_category_partner = self.registry('res.partner.category')
+        self.vals['parent_id'] = partner_category_partner.create(self.cr, self.uid, {
+            'name': 'Test parent',
+            'active': True, }, context=None)
+
+        self.vals = dict(self.vals.items() + vals.items())
+        # Create the partner_category object; we will be testing this, so store in self
+        self.partner_category_id = partner_category_partner.create(self.cr, self.uid, self.vals, context=None)
+
+    def test_partner_category(self):
+        """
+        Checking the partner_category creation.
+        """
+        partner_category = self.registry('res.partner.category')
+        partner_category_obj = partner_category.browse(self.cr, self.uid, self.partner_category_id, context=None)
+        for field in self.vals:
+            val = partner_category_obj[field]
+            if type(val) == browse_record:
+                self.assertEquals(self.vals[field], val.id,
+                                  "IDs for %s don't match: (%i != %i)" %
+                                  (field, self.vals[field], val.id))
+            else:
+                self.assertEquals(str(self.vals[field]), str(val),
+                                  "Values for %s don't match: (%s != %s)" %
+                                  (field, str(self.vals[field]), str(val)))
+
+
+class Test_partner_category_bad(Base_Test_partner_category):
+    """
+    Simple test creating a partner_category, test against bad values
+    """
+    def setUp(self):
+        """
+        Setting up partner_category, then changing the values to test against.
+        """
+        super(Test_partner_category_bad, self).setUp()
+        # Change vals to something wrong
+        self.vals = {'name': 'This is the wrong partner_category name',
+                     'active': False,
+                     }
+
+    def test_partner_category(self):
+        """
+        Checking the partner_category creation, assertions should all be false.
+        """
+        partner_category_partner_category = self.registry('res.partner.category')
+        partner_category_obj = partner_category_partner_category.browse(self.cr, self.uid,
+                                                                        self.partner_category_id,
+                                                                        context=None)
+        for field in self.vals:
+            val = partner_category_obj[field]
+            if type(val) == browse_record:
+                self.assertNotEqual(self.vals[field], val.id,
+                                    "IDs for %s don't match: (%i != %i)" %
+                                    (field, self.vals[field], val.id))
+            else:
+                self.assertNotEqual(str(self.vals[field]), str(val),
+                                    "Values for %s don't match: (%s != %s)" %
+                                    (field, str(self.vals[field]), str(val)))
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'base_contact_by_functions_partner_firstname'
=== added file 'base_contact_by_functions_partner_firstname/__init__.py'
--- base_contact_by_functions_partner_firstname/__init__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/__init__.py	2014-04-30 15:00:54 +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_partner
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions_partner_firstname/__openerp__.py'
--- base_contact_by_functions_partner_firstname/__openerp__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/__openerp__.py	2014-04-30 15:00:54 +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': 'Contacts by Functions - Partner Firstname Bindings',
+    'version': '0.1',
+    'category': 'Customer Relationship Management',
+    'summary': 'Contacts by Functions - Partner Firstname Bindings',
+    'description': """
+Contacts by Functions - Partner Firstname Bindings
+==================================================
+
+Contributors
+------------
+* El Hadji Dem (elhadji.dem@xxxxxxxxxxxxxxxxxxxx)
+""",
+    'author': 'Savoir-faire Linux',
+    'website': 'www.savoirfairelinux.com',
+    'license': 'AGPL-3',
+    'depends': [
+        'base_contact_by_functions',
+        'partner_firstname',
+    ],
+    'data': [
+        'res_partner_view.xml',
+    ],
+    'test': [],
+    'demo': [
+    ],
+    'installable': True,
+    'auto_install': True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'base_contact_by_functions_partner_firstname/i18n'
=== added file 'base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot'
--- base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot	2014-04-30 15:00:54 +0000
@@ -0,0 +1,27 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* base_contact_by_functions_partner_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-03 07:16+0000\n"
+"PO-Revision-Date: 2014-01-03 02:17-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: base_contact_by_functions_partner_firstname
+#: view:res.partner:0
+msgid "lastname"
+msgstr ""
+
+#. module: base_contact_by_functions_partner_firstname
+#: view:res.partner:0
+msgid "Firstname"
+msgstr ""

=== added file 'base_contact_by_functions_partner_firstname/i18n/fr.po'
--- base_contact_by_functions_partner_firstname/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/i18n/fr.po	2014-04-30 15:00:54 +0000
@@ -0,0 +1,27 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* base_contact_by_functions_partner_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-03 07:17+0000\n"
+"PO-Revision-Date: 2014-01-03 02:18-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: base_contact_by_functions_partner_firstname
+#: view:res.partner:0
+msgid "lastname"
+msgstr "Nom"
+
+#. module: base_contact_by_functions_partner_firstname
+#: view:res.partner:0
+msgid "Firstname"
+msgstr "Prénom"

=== added file 'base_contact_by_functions_partner_firstname/res_partner.py'
--- base_contact_by_functions_partner_firstname/res_partner.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/res_partner.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,76 @@
+# -*- 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 time
+from openerp.osv import orm, fields
+
+
+class res_partner(orm.Model):
+    """
+    Inherits partner and adds functions_ids : List of functions
+    """
+    _inherit = 'res.partner'
+
+    def create(self, cr, user, vals, context=None):
+        context = self._basecontact_check_context(cr, user, 'create', context)
+        if not vals.get('name') and vals.get('contact_id'):
+            vals['name'] = self.browse(cr, user, vals['contact_id'], context=context).name
+        if vals.get('end_date'):
+            if vals['end_date'] and vals['end_date'] <= time.strftime('%Y-%m-%d'):
+                vals['active'] = False
+        if vals.get('contact_type') and vals.get('contact_type') == 'standalone':
+            contact_vals = {key: vals[key] for key in vals.keys() if key != 'parent_id'}
+            contact_vals['active'] = True
+            contact_vals['function_id'] = None
+            vals['contact_id'] = super(res_partner, self).create(cr, user, contact_vals,
+                                                                 context=context)
+            self.write(cr, user, vals['contact_id'], {
+                'firstname': vals.get('firstname', ''),
+                'lastname': vals.get('lastname', ''),
+            }, context=context)
+        # Check if we create existing contact from company(ie: company is true)
+        # Check if we create another function from contact view
+        if vals.get('contact_type') == 'attached' or (not vals.get('contact_type') and vals.get('contact_id')):
+            contact_info = self.browse(cr, user, vals.get('contact_id'), context=context)
+            vals['firstname'] = contact_info.firstname
+            vals['title'] = contact_info.title.id or ''
+
+        if ('contact_id'in vals and ('reset_password' in context or
+                                     'install_mode' in context)):
+            return vals['contact_id']
+        res = super(res_partner, self).create(cr, user, vals, context=context)
+        return res
+
+    def write(self, cr, user, ids, vals, context=None):
+        context = self._basecontact_check_context(cr, user, 'write', context)
+        if vals.get('end_date'):
+            if vals['end_date'] and vals['end_date'] <= time.strftime('%Y-%m-%d'):
+                vals['active'] = False
+        if vals.get('contact_type') and vals.get('contact_type') == 'standalone':
+            contact_vals = {key: vals[key] for key in vals.keys() if key != 'parent_id'}
+            contact_vals['active'] = True
+            contact_vals['function_id'] = None
+            vals['contact_id'] = super(res_partner, self).write(cr, user, contact_vals,
+                                                                context=context)
+        return super(res_partner, self).write(cr, user, ids, vals, context=context)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'base_contact_by_functions_partner_firstname/res_partner_view.xml'
--- base_contact_by_functions_partner_firstname/res_partner_view.xml	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/res_partner_view.xml	2014-04-30 15:00:54 +0000
@@ -0,0 +1,71 @@
+<?xml version = "1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+
+    <!--Redefine this part of view from firstname_partner module -->
+    <record id="view_partner_form_firstname_inherit11" model="ir.ui.view">
+      <field name="name">res.partner.form.firstname.inherit11</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="partner_firstname.view_partner_form_firstname"/>
+      <field name="arch" type="xml">
+        <!--Redefine firstname field in view partner-->
+        <field name="firstname" position="replace">
+          <group attrs="{'invisible': [('is_company', '=', True)]}">
+            <field name="firstname"/>
+          </group>
+        </field>
+        <!--Redefine firstname field in contact view-->
+        <xpath expr="//form[@string='Contact']/sheet/div//field[@name='firstname']" position="replace">
+          <field name="firstname" attrs="{'invisible': [('contact_type', '=', 'attached')]}"/>
+        </xpath>
+      </field>
+    </record>
+
+    <!--Replace name by full name in kanban view-->
+    <record id="view_partner_form_firstname_inherit11" model="ir.ui.view">
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="base_contact_by_functions.view_contact_by_function_form"/>
+      <field name="arch" type="xml">
+        <xpath expr="//field[@name='other_contact_history_ids']/kanban//field[@name='name']" position="replace">
+          <field name="lastname"/>
+        </xpath>
+        <xpath expr="//field[@name='other_contact_history_ids']/kanban/templates//t[@t-name='kanban-box']//div[@class='oe_kanban_details']//field[@name='name']"
+               position="before">
+          <field name="firstname"/>
+        </xpath>
+        <!--Display firstname and name after Image-->
+        <xpath expr="//field[@name='other_contact_history_ids']/form[@string='Contact']/sheet//field[@name='image']"
+               position="after">
+          <h1>
+            <field name="contact_id" style="width: 70%%" readonly="1"/>
+          </h1>
+        </xpath>
+      </field>
+    </record>
+
+    <!--Display firstname and name in kanban view for other position -->
+    <record id="view_partner_form_firstname_name" model="ir.ui.view">
+      <field name="name">res.partner.form.firstname.name</field>
+      <field name="model">res.partner</field>
+      <field name="inherit_id" ref="base_contact_by_functions.view_position_info_form"/>
+      <field name="arch" type="xml">
+        <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet/div//field[@name='name']"
+               position="replace"/>
+        <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet//field[@name='image']"
+               position="after">
+          <h1>
+            <field name="contact_id" style="width: 70%%" readonly="1"/>
+          </h1>
+        </xpath>
+        <!--I don't want to display the label field, so I hide it-->
+        <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet/div//label[@for='name']"
+               position="replace"/>
+        <!--Add firstname before name in templates view-->
+        <xpath expr="//t[@t-name='kanban-box']//div[@class='oe_kanban_details']/h4[@class='oe_partner_heading']//field[@name='name']"
+               position="before">
+          <field name="firstname"/>
+        </xpath>
+      </field>
+    </record>
+  </data>
+</openerp>

=== added directory 'base_contact_by_functions_partner_firstname/tests'
=== added file 'base_contact_by_functions_partner_firstname/tests/__init__.py'
--- base_contact_by_functions_partner_firstname/tests/__init__.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/tests/__init__.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2010 - 2014 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 . import test_partner
+
+checks = [
+    test_partner,
+]

=== added file 'base_contact_by_functions_partner_firstname/tests/test_partner.py'
--- base_contact_by_functions_partner_firstname/tests/test_partner.py	1970-01-01 00:00:00 +0000
+++ base_contact_by_functions_partner_firstname/tests/test_partner.py	2014-04-30 15:00:54 +0000
@@ -0,0 +1,51 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module copyright (C) 2010 - 2014 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.tests.common import TransactionCase
+
+
+class test_partner_contact_id(TransactionCase):
+
+    def setUp(self):
+        super(test_partner_contact_id, self).setUp()
+        # Clean up registries
+        self.registry('ir.model').clear_caches()
+        self.registry('ir.model.data').clear_caches()
+        # Get registries
+        self.user_model = self.registry("res.users")
+        self.partner_model = self.registry("res.partner")
+        # Get context
+        self.context = self.user_model.context_get(self.cr, self.uid)
+        # Create values for test, contact also created
+        contact_id = self.partner_model.create(self.cr, self.uid, {
+            'name': 'test_contact',
+            'title': 1,
+        }, context=self.context)
+        self.vals = {
+            'name': 'test_partner',
+            'type': 'contact',
+            'contact_id': contact_id,
+        }
+
+    def test_create_partner(self):
+        cr, uid, vals, context = self.cr, self.uid, self.vals, self.context
+        self.partner_model.create(cr, uid, vals, context=context)


References