From cfcf557c502bcebb093f5017ee1b6485c2d3e52e Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Tue, 21 Oct 2014 14:16:28 -0400 Subject: [PATCH] [ADD] Add partner_supplier_information module Allow to add some specifics fields just for suppliers --- partner_supplier_information/__init__.py | 23 +++++ partner_supplier_information/__openerp__.py | 56 +++++++++++ partner_supplier_information/i18n/fr.po | 97 +++++++++++++++++++ .../i18n/partner_supplier_information.pot | 71 ++++++++++++++ partner_supplier_information/res_partner.py | 53 ++++++++++ .../res_partner_view.xml | 37 +++++++ 6 files changed, 337 insertions(+) create mode 100644 partner_supplier_information/__init__.py create mode 100644 partner_supplier_information/__openerp__.py create mode 100644 partner_supplier_information/i18n/fr.po create mode 100644 partner_supplier_information/i18n/partner_supplier_information.pot create mode 100644 partner_supplier_information/res_partner.py create mode 100644 partner_supplier_information/res_partner_view.xml diff --git a/partner_supplier_information/__init__.py b/partner_supplier_information/__init__.py new file mode 100644 index 000000000..610e74d61 --- /dev/null +++ b/partner_supplier_information/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## + +from . import res_partner diff --git a/partner_supplier_information/__openerp__.py b/partner_supplier_information/__openerp__.py new file mode 100644 index 000000000..8d83b513d --- /dev/null +++ b/partner_supplier_information/__openerp__.py @@ -0,0 +1,56 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## + +{ + 'name': 'Partner Supplier Information', + 'version': '0.1', + 'author': 'Savoir-faire Linux', + 'maintainer': 'Savoir-faire Linux', + 'website': 'http://www.savoirfairelinux.com', + 'category': 'Customer Relationship Management', + 'description': """ +Partner Supplier Informations +============================= + +This module adds some fields for supplier: + +* Legal form +* NGO: If partner is a Non-governmental organization (NGO) +* Confirmed supplier +* Registration number +* Registration date +* Registration location +* Matriculation Number + + +Contributors +------------ +* El Hadji Dem (elhadji.dem@savoirfairelinux.com) +""", + 'depends': [ + 'account', + ], + 'data': [ + 'res_partner_view.xml', + ], + 'installable': True, +} diff --git a/partner_supplier_information/i18n/fr.po b/partner_supplier_information/i18n/fr.po new file mode 100644 index 000000000..00456b972 --- /dev/null +++ b/partner_supplier_information/i18n/fr.po @@ -0,0 +1,97 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * partner_supplier_information +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-21 18:12+0000\n" +"PO-Revision-Date: 2014-10-21 14:14-0500\n" +"Last-Translator: Sandy Carter \n" +"Language-Team: \n" +"Language: fr\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.6.10\n" + +#. module: partner_supplier_information +#: view:res.partner:0 +msgid "Information" +msgstr "Information" + +#. module: partner_supplier_information +#: field:res.partner,rcs_registration_number:0 +msgid "Registration number" +msgstr "N° d'enregistrement" + +#. module: partner_supplier_information +#: field:res.partner,acronym:0 +msgid "Acronym" +msgstr "Acronyme" + +#. module: partner_supplier_information +#: field:res.partner,rcs_registration_location:0 +msgid "Registration location" +msgstr "Lieu d'enregistrement" + +#. module: partner_supplier_information +#: field:res.partner,ong:0 +msgid "ONG" +msgstr "ONG" + +#. module: partner_supplier_information +#: view:res.partner:0 +msgid "Supplier Information" +msgstr "Informations du fournisseur" + +#. module: partner_supplier_information +#: field:res.partner,legal_form:0 +msgid "Legal form" +msgstr "Forme juridique" + +#. module: partner_supplier_information +#: field:res.partner,confirmed_supplier:0 +msgid "Confirmed supplier" +msgstr "Fournisseur confirmé" + +#. module: partner_supplier_information +#: model:ir.model,name:partner_supplier_information.model_res_partner +msgid "Partner" +msgstr "Organisme" + +#. module: partner_supplier_information +#: field:res.partner,rcs_date:0 +msgid "Registration date" +msgstr "Date d'enregistrement" + +#. module: partner_supplier_information +#: field:res.partner,matriculation_number:0 +msgid "Matriculation number" +msgstr "Numéro du passeport" + +#~ msgid "ONG." +#~ msgstr "ONG." + +#~ msgid "Acronym." +#~ msgstr "Acronyme." + +#~ msgid "Registration location." +#~ msgstr "Lieu d'enregistrement." + +#~ msgid "Immatriculation number." +#~ msgstr "Numéro d'immatriculation." + +#~ msgid "confirmed supplier." +#~ msgstr "fournisseur confirmé." + +#~ msgid "Legal form." +#~ msgstr "Forme juridique." + +#~ msgid "Registration number." +#~ msgstr "N° d'enregistrement." + +#~ msgid "Registration date." +#~ msgstr "Date d'enregistrement." diff --git a/partner_supplier_information/i18n/partner_supplier_information.pot b/partner_supplier_information/i18n/partner_supplier_information.pot new file mode 100644 index 000000000..a29410b48 --- /dev/null +++ b/partner_supplier_information/i18n/partner_supplier_information.pot @@ -0,0 +1,71 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * partner_supplier_information +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-21 18:12+0000\n" +"PO-Revision-Date: 2014-10-21 18:12+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_supplier_information +#: view:res.partner:0 +msgid "Information" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,rcs_registration_number:0 +msgid "Registration number" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,acronym:0 +msgid "Acronym" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,rcs_registration_location:0 +msgid "Registration location" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,ong:0 +msgid "ONG" +msgstr "" + +#. module: partner_supplier_information +#: view:res.partner:0 +msgid "Supplier Information" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,legal_form:0 +msgid "Legal form" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,confirmed_supplier:0 +msgid "Confirmed supplier" +msgstr "" + +#. module: partner_supplier_information +#: model:ir.model,name:partner_supplier_information.model_res_partner +msgid "Partner" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,rcs_date:0 +msgid "Registration date" +msgstr "" + +#. module: partner_supplier_information +#: field:res.partner,matriculation_number:0 +msgid "Matriculation number" +msgstr "" diff --git a/partner_supplier_information/res_partner.py b/partner_supplier_information/res_partner.py new file mode 100644 index 000000000..4f47393de --- /dev/null +++ b/partner_supplier_information/res_partner.py @@ -0,0 +1,53 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## + +from openerp.osv import orm, fields + + +class res_partner(orm.Model): + _inherit = 'res.partner' + _columns = { + 'legal_form': fields.char( + 'Legal form', + ), + 'ong': fields.boolean( + 'ONG', + ), + 'acronym': fields.char( + 'Acronym', + ), + 'confirmed_supplier': fields.boolean( + 'Confirmed supplier', + ), + 'rcs_registration_number': fields.char( + 'Registration number', + ), + 'rcs_date': fields.date( + 'Registration date', + ), + 'rcs_registration_location': fields.char( + 'Registration location', + ), + 'matriculation_number': fields.char( + 'Matriculation number', + ), + } diff --git a/partner_supplier_information/res_partner_view.xml b/partner_supplier_information/res_partner_view.xml new file mode 100644 index 000000000..327d701e0 --- /dev/null +++ b/partner_supplier_information/res_partner_view.xml @@ -0,0 +1,37 @@ + + + + + + res.partner.property.supplier.info.form.inherit + res.partner + + + + + + + + + + + + + + + + + + + + + + + +