Merge lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_partner_supplier_information into lp:~partner-contact-core-editors/partner-contact-management/7.0

Status: Needs review
Proposed branch: lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_partner_supplier_information
Merge into: lp:~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 402 lines (+371/-0)
6 files modified
partner_supplier_information/__init__.py (+25/-0)
partner_supplier_information/__openerp__.py (+64/-0)
partner_supplier_information/i18n/fr.po (+102/-0)
partner_supplier_information/i18n/partner_supplier_information.pot (+102/-0)
partner_supplier_information/res_partner.py (+41/-0)
partner_supplier_information/res_partner_view.xml (+37/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_partner_supplier_information
Reviewer Review Type Date Requested Status
Lorenzo Battistini - Agile BG (community) Resubmit on 2014-07-23
Yannick Vaucher @ Camptocamp 2014-03-21 Disapprove on 2014-03-21
Sandy Carter (http://www.savoirfairelinux.com) code review, test 2014-01-30 Approve on 2014-03-21
Romain Deheele - Camptocamp (community) Needs Information on 2014-02-03
Review via email: mp+204046@code.launchpad.net

Description of the change

 Add partner_supplier_information module: It allows to add some specifics fields just for supplier

To post a comment you must log in.

Hello,

code review : LGTM.

Would it not be better to place these new fields in a new tab?

Regards,

Romain

review: Needs Information

Hi Romain,

Nice idea,

I am going to propose something

Hi Romain,

In this moment, we decided to keep it like this. Thanks for your idea

review: Approve (code review, test)

It seems very specific, I'm unsure this should be part of community modules.

Who could reuse this module?

review: Disapprove

This project is now hosted on https://github.com/OCA/partner-contact. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Resubmit

Unmerged revisions

33. By El Hadji Dem (http://www.savoirfairelinux.com) on 2014-01-30

[ADD] Add partner_supplier_information module: It allows to add some specifics fields just for supplier

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_supplier_information'
2=== added file 'partner_supplier_information/__init__.py'
3--- partner_supplier_information/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_supplier_information/__init__.py 2014-01-30 17:12:38 +0000
5@@ -0,0 +1,25 @@
6+# -*- encoding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# This module copyright (C) 2013 Savoir-faire Linux
11+# (<http://www.savoirfairelinux.com>).
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+from . import res_partner
29+
30+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
31
32=== added file 'partner_supplier_information/__openerp__.py'
33--- partner_supplier_information/__openerp__.py 1970-01-01 00:00:00 +0000
34+++ partner_supplier_information/__openerp__.py 2014-01-30 17:12:38 +0000
35@@ -0,0 +1,64 @@
36+# -*- encoding: utf-8 -*-
37+##############################################################################
38+#
39+# OpenERP, Open Source Management Solution
40+# This module copyright (C) 2013 Savoir-faire Linux
41+# (<http://www.savoirfairelinux.com>).
42+#
43+# This program is free software: you can redistribute it and/or modify
44+# it under the terms of the GNU Affero General Public License as
45+# published by the Free Software Foundation, either version 3 of the
46+# License, or (at your option) any later version.
47+#
48+# This program is distributed in the hope that it will be useful,
49+# but WITHOUT ANY WARRANTY; without even the implied warranty of
50+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+# GNU Affero General Public License for more details.
52+#
53+# You should have received a copy of the GNU Affero General Public License
54+# along with this program. If not, see <http://www.gnu.org/licenses/>.
55+#
56+##############################################################################
57+
58+{
59+ 'name': 'Partner Supplier Informations',
60+ 'version': '0.1',
61+ 'author': 'Savoir-faire Linux',
62+ 'maintainer': 'Savoir-faire Linux',
63+ 'website': 'http://www.savoirfairelinux.com',
64+ 'category': 'MISC',
65+ 'description': """
66+Partner Supplier Informations
67+=============================
68+
69+This module adds some fields for supplier:
70+
71+* Legal form
72+* NGO: If partner is a Non-governmental organization (NGO)
73+* Confirmed supplier
74+* Registration number
75+* Registration date
76+* Registration location
77+* Matriculation Number
78+
79+
80+Contributors
81+------------
82+* El Hadji Dem (elhadji.dem@savoirfairelinux.com)
83+""",
84+ 'depends': [
85+ 'account',
86+ ],
87+ 'external_dependencies': {
88+ 'python': [],
89+ },
90+ 'data': [
91+ 'res_partner_view.xml',
92+ ],
93+ 'demo': [],
94+ 'test': [],
95+ 'installable': True,
96+ 'active': False,
97+}
98+
99+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
100
101=== added directory 'partner_supplier_information/i18n'
102=== added file 'partner_supplier_information/i18n/fr.po'
103--- partner_supplier_information/i18n/fr.po 1970-01-01 00:00:00 +0000
104+++ partner_supplier_information/i18n/fr.po 2014-01-30 17:12:38 +0000
105@@ -0,0 +1,102 @@
106+# Translation of OpenERP Server.
107+# This file contains the translation of the following modules:
108+# * partner_supplier_information
109+#
110+msgid ""
111+msgstr ""
112+"Project-Id-Version: OpenERP Server 7.0\n"
113+"Report-Msgid-Bugs-To: \n"
114+"POT-Creation-Date: 2014-01-03 07:28+0000\n"
115+"PO-Revision-Date: 2014-01-03 02:30-0500\n"
116+"Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n"
117+"Language-Team: \n"
118+"MIME-Version: 1.0\n"
119+"Content-Type: text/plain; charset=UTF-8\n"
120+"Content-Transfer-Encoding: 8bit\n"
121+"Plural-Forms: \n"
122+"X-Generator: Poedit 1.5.4\n"
123+
124+#. module: partner_supplier_information
125+#: help:res.partner,ong:0
126+msgid "ONG."
127+msgstr "ONG."
128+
129+#. module: partner_supplier_information
130+#: field:res.partner,rcs_registration_number:0
131+msgid "Registration number"
132+msgstr "N° d'enregistrement"
133+
134+#. module: partner_supplier_information
135+#: field:res.partner,acronym:0
136+msgid "Acronym"
137+msgstr "Acronyme"
138+
139+#. module: partner_supplier_information
140+#: field:res.partner,rcs_registration_location:0
141+msgid "Registration location"
142+msgstr "Lieu d'enregistrement"
143+
144+#. module: partner_supplier_information
145+#: help:res.partner,acronym:0
146+msgid "Acronym."
147+msgstr "Acronyme."
148+
149+#. module: partner_supplier_information
150+#: help:res.partner,rcs_registration_location:0
151+msgid "Registration location."
152+msgstr "Lieu d'enregistrement."
153+
154+#. module: partner_supplier_information
155+#: field:res.partner,ong:0
156+msgid "ONG"
157+msgstr "ONG"
158+
159+#. module: partner_supplier_information
160+#: help:res.partner,immatriculation_number:0
161+msgid "Immatriculation number."
162+msgstr "Numéro d'immatriculation."
163+
164+#. module: partner_supplier_information
165+#: field:res.partner,legal_form:0
166+msgid "Legal form"
167+msgstr "Forme juridique"
168+
169+#. module: partner_supplier_information
170+#: help:res.partner,confirmed_supplier:0
171+msgid "confirmed supplier."
172+msgstr "fournisseur confirmé."
173+
174+#. module: partner_supplier_information
175+#: help:res.partner,legal_form:0
176+msgid "Legal form."
177+msgstr "Forme juridique."
178+
179+#. module: partner_supplier_information
180+#: field:res.partner,immatriculation_number:0
181+msgid "Immatriculation number"
182+msgstr "Numéro d'immatriculation"
183+
184+#. module: partner_supplier_information
185+#: field:res.partner,confirmed_supplier:0
186+msgid "Confirmed supplier"
187+msgstr "Fournisseur confirmé"
188+
189+#. module: partner_supplier_information
190+#: help:res.partner,rcs_registration_number:0
191+msgid "Registration number."
192+msgstr "N° d'enregistrement."
193+
194+#. module: partner_supplier_information
195+#: model:ir.model,name:partner_supplier_information.model_res_partner
196+msgid "Partner"
197+msgstr "Organisme"
198+
199+#. module: partner_supplier_information
200+#: help:res.partner,rcs_date:0
201+msgid "Registration date."
202+msgstr "Date d'enregistrement."
203+
204+#. module: partner_supplier_information
205+#: field:res.partner,rcs_date:0
206+msgid "Registration date"
207+msgstr "Date d'enregistrement"
208
209=== added file 'partner_supplier_information/i18n/partner_supplier_information.pot'
210--- partner_supplier_information/i18n/partner_supplier_information.pot 1970-01-01 00:00:00 +0000
211+++ partner_supplier_information/i18n/partner_supplier_information.pot 2014-01-30 17:12:38 +0000
212@@ -0,0 +1,102 @@
213+# Translation of OpenERP Server.
214+# This file contains the translation of the following modules:
215+# * partner_supplier_information
216+#
217+msgid ""
218+msgstr ""
219+"Project-Id-Version: OpenERP Server 7.0\n"
220+"Report-Msgid-Bugs-To: \n"
221+"POT-Creation-Date: 2014-01-03 07:27+0000\n"
222+"PO-Revision-Date: 2014-01-03 02:28-0500\n"
223+"Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n"
224+"Language-Team: \n"
225+"MIME-Version: 1.0\n"
226+"Content-Type: text/plain; charset=UTF-8\n"
227+"Content-Transfer-Encoding: 8bit\n"
228+"Plural-Forms: \n"
229+"X-Generator: Poedit 1.5.4\n"
230+
231+#. module: partner_supplier_information
232+#: help:res.partner,ong:0
233+msgid "ONG."
234+msgstr ""
235+
236+#. module: partner_supplier_information
237+#: field:res.partner,rcs_registration_number:0
238+msgid "Registration number"
239+msgstr ""
240+
241+#. module: partner_supplier_information
242+#: field:res.partner,acronym:0
243+msgid "Acronym"
244+msgstr ""
245+
246+#. module: partner_supplier_information
247+#: field:res.partner,rcs_registration_location:0
248+msgid "Registration location"
249+msgstr ""
250+
251+#. module: partner_supplier_information
252+#: help:res.partner,acronym:0
253+msgid "Acronym."
254+msgstr ""
255+
256+#. module: partner_supplier_information
257+#: help:res.partner,rcs_registration_location:0
258+msgid "Registration location."
259+msgstr ""
260+
261+#. module: partner_supplier_information
262+#: field:res.partner,ong:0
263+msgid "ONG"
264+msgstr ""
265+
266+#. module: partner_supplier_information
267+#: help:res.partner,immatriculation_number:0
268+msgid "Immatriculation number."
269+msgstr ""
270+
271+#. module: partner_supplier_information
272+#: field:res.partner,legal_form:0
273+msgid "Legal form"
274+msgstr ""
275+
276+#. module: partner_supplier_information
277+#: help:res.partner,confirmed_supplier:0
278+msgid "confirmed supplier."
279+msgstr ""
280+
281+#. module: partner_supplier_information
282+#: help:res.partner,legal_form:0
283+msgid "Legal form."
284+msgstr ""
285+
286+#. module: partner_supplier_information
287+#: field:res.partner,immatriculation_number:0
288+msgid "Immatriculation number"
289+msgstr ""
290+
291+#. module: partner_supplier_information
292+#: field:res.partner,confirmed_supplier:0
293+msgid "Confirmed supplier"
294+msgstr ""
295+
296+#. module: partner_supplier_information
297+#: help:res.partner,rcs_registration_number:0
298+msgid "Registration number."
299+msgstr ""
300+
301+#. module: partner_supplier_information
302+#: model:ir.model,name:partner_supplier_information.model_res_partner
303+msgid "Partner"
304+msgstr ""
305+
306+#. module: partner_supplier_information
307+#: help:res.partner,rcs_date:0
308+msgid "Registration date."
309+msgstr ""
310+
311+#. module: partner_supplier_information
312+#: field:res.partner,rcs_date:0
313+msgid "Registration date"
314+msgstr ""
315
316=== added file 'partner_supplier_information/res_partner.py'
317--- partner_supplier_information/res_partner.py 1970-01-01 00:00:00 +0000
318+++ partner_supplier_information/res_partner.py 2014-01-30 17:12:38 +0000
319@@ -0,0 +1,41 @@
320+# -*- encoding: utf-8 -*-
321+##############################################################################
322+#
323+# OpenERP, Open Source Management Solution
324+# This module copyright (C) 2013 Savoir-faire Linux
325+# (<http://www.savoirfairelinux.com>).
326+#
327+# This program is free software: you can redistribute it and/or modify
328+# it under the terms of the GNU Affero General Public License as
329+# published by the Free Software Foundation, either version 3 of the
330+# License, or (at your option) any later version.
331+#
332+# This program is distributed in the hope that it will be useful,
333+# but WITHOUT ANY WARRANTY; without even the implied warranty of
334+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
335+# GNU Affero General Public License for more details.
336+#
337+# You should have received a copy of the GNU Affero General Public License
338+# along with this program. If not, see <http://www.gnu.org/licenses/>.
339+#
340+##############################################################################
341+
342+from openerp.osv import orm, fields
343+
344+
345+class res_partner(orm.Model):
346+ _inherit = 'res.partner'
347+ _columns = {
348+ 'legal_form': fields.char('Legal form', size=256, help="Legal form."),
349+ 'ong': fields.boolean('ONG', help="ONG."),
350+ 'acronym': fields.char('Acronym', size=256, help="Acronym."),
351+ 'confirmed_supplier': fields.boolean('Confirmed supplier', help="confirmed supplier."),
352+ 'rcs_registration_number': fields.char('Registration number', size=256,
353+ help="Registration number."),
354+ 'rcs_date': fields.date('Registration date', help="Registration date."),
355+ 'rcs_registration_location': fields.char('Registration location', size=256,
356+ help="Registration location."),
357+ 'matriculation_number': fields.char('Matriculation number', size=256, help="Matriculation number."),
358+ }
359+
360+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
361
362=== added file 'partner_supplier_information/res_partner_view.xml'
363--- partner_supplier_information/res_partner_view.xml 1970-01-01 00:00:00 +0000
364+++ partner_supplier_information/res_partner_view.xml 2014-01-30 17:12:38 +0000
365@@ -0,0 +1,37 @@
366+<?xml version="1.0" encoding="utf-8"?>
367+<openerp>
368+ <data>
369+ <!--Add legal form, ong,acronym,confirmed supplier,
370+ rcs number,rcs date, rcs and SIRET number fields in form view-->
371+ <record id="view_partner_property_supplier_info_form" model="ir.ui.view">
372+ <field name="name">res.partner.property.supplier.info.form.inherit</field>
373+ <field name="model">res.partner</field>
374+ <field name="inherit_id" ref="account.view_partner_property_form"/>
375+ <field name="arch" type="xml">
376+ <xpath expr="//page[@string='Accounting']/group[1]/group[2]"
377+ position="after">
378+ <group string="Supplier informations" col="4" colspan="4"
379+ attrs="{'invisible': [('supplier', '=', False)]}">
380+ <field name="legal_form"/>
381+ <field name="ong"/>
382+ <field name="acronym"/>
383+ <field name="confirmed_supplier"/>
384+ </group>
385+ <group string="Information" col="4" colspan="4"
386+ attrs="{'invisible': [('confirmed_supplier', '=', False)]}">
387+ <field name="rcs_registration_number"/>
388+ <field name="rcs_date"/>
389+ <field name="rcs_registration_location"/>
390+ </group>
391+ </xpath>
392+
393+ <!--add matriculation number in form view-->
394+ <field name="last_reconciliation_date"
395+ position="after">
396+ <field name="matriculation_number"
397+ attrs="{'invisible': [('confirmed_supplier', '=', False)]}"/>
398+ </field>
399+ </field>
400+ </record>
401+ </data>
402+</openerp>