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

Status: Merged
Merged at revision: 33
Proposed branch: lp:~savoirfairelinux-openerp/partner-contact-management/partner_multi_passport
Merge into: lp:~savoirfairelinux-openerp/partner-contact-management/base_contact_by_functions
Diff against target: 465 lines (+429/-0)
7 files modified
partner_multi_passport/__init__.py (+26/-0)
partner_multi_passport/__openerp__.py (+53/-0)
partner_multi_passport/i18n/fr.po (+118/-0)
partner_multi_passport/i18n/partner_multi_passport.pot (+118/-0)
partner_multi_passport/res_partner.py (+32/-0)
partner_multi_passport/res_partner_view.xml (+35/-0)
partner_multi_passport/res_passport.py (+47/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/partner-contact-management/partner_multi_passport
Reviewer Review Type Date Requested Status
Sandy Carter (http://www.savoirfairelinux.com) Pending
Review via email: mp+201259@code.launchpad.net

Description of the change

[ADD] partner_multi_passport :it allows to manage several passports for each contact

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_multi_passport'
2=== added file 'partner_multi_passport/__init__.py'
3--- partner_multi_passport/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_multi_passport/__init__.py 2014-01-10 22:02:41 +0000
5@@ -0,0 +1,26 @@
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+import res_partner
29+import res_passport
30+
31+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
32
33=== added file 'partner_multi_passport/__openerp__.py'
34--- partner_multi_passport/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ partner_multi_passport/__openerp__.py 2014-01-10 22:02:41 +0000
36@@ -0,0 +1,53 @@
37+# -*- encoding: utf-8 -*-
38+##############################################################################
39+#
40+# OpenERP, Open Source Management Solution
41+# This module copyright (C) 2013 Savoir-faire Linux
42+# (<http://www.savoirfairelinux.com>).
43+#
44+# This program is free software: you can redistribute it and/or modify
45+# it under the terms of the GNU Affero General Public License as
46+# published by the Free Software Foundation, either version 3 of the
47+# License, or (at your option) any later version.
48+#
49+# This program is distributed in the hope that it will be useful,
50+# but WITHOUT ANY WARRANTY; without even the implied warranty of
51+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52+# GNU Affero General Public License for more details.
53+#
54+# You should have received a copy of the GNU Affero General Public License
55+# along with this program. If not, see <http://www.gnu.org/licenses/>.
56+#
57+##############################################################################
58+
59+{
60+ 'name': 'Partner Multi Passport',
61+ 'version': '0.1',
62+ 'author': 'Savoir-faire Linux',
63+ 'maintainer': 'Savoir-faire Linux',
64+ 'website': 'http://www.savoirfairelinux.com',
65+ 'category': 'Customer Relationship Management',
66+ 'description': """
67+Partner Multi Passport
68+======================
69+
70+This module allows you to manage several passports for each contact.
71+
72+Contributors
73+------------
74+* El Hadji Dem (elhadji.dem@savoirfairelinux.com)
75+""",
76+ 'depends': [
77+ 'base',
78+ ],
79+ 'external_dependencies': {},
80+ 'data': [
81+ 'res_partner_view.xml',
82+ ],
83+ 'demo': [],
84+ 'test': [],
85+ 'installable': True,
86+ 'active': False,
87+}
88+
89+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
90
91=== added directory 'partner_multi_passport/i18n'
92=== added file 'partner_multi_passport/i18n/fr.po'
93--- partner_multi_passport/i18n/fr.po 1970-01-01 00:00:00 +0000
94+++ partner_multi_passport/i18n/fr.po 2014-01-10 22:02:41 +0000
95@@ -0,0 +1,118 @@
96+# Translation of OpenERP Server.
97+# This file contains the translation of the following modules:
98+# * partner_multi_passport
99+#
100+msgid ""
101+msgstr ""
102+"Project-Id-Version: OpenERP Server 7.0\n"
103+"Report-Msgid-Bugs-To: \n"
104+"POT-Creation-Date: 2014-01-10 21:36+0000\n"
105+"PO-Revision-Date: 2014-01-10 16:44-0500\n"
106+"Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n"
107+"Language-Team: \n"
108+"MIME-Version: 1.0\n"
109+"Content-Type: text/plain; charset=UTF-8\n"
110+"Content-Transfer-Encoding: 8bit\n"
111+"Plural-Forms: \n"
112+"X-Generator: Poedit 1.5.4\n"
113+
114+#. module: partner_multi_passport
115+#: help:res.passport,gender:0
116+msgid "Gender."
117+msgstr "Sexe."
118+
119+#. module: partner_multi_passport
120+#: model:ir.model,name:partner_multi_passport.model_res_passport
121+#: view:res.partner:0 field:res.partner,passport_ids:0
122+msgid "Passport"
123+msgstr "Passeport"
124+
125+#. module: partner_multi_passport
126+#: field:res.passport,country_id:0
127+msgid "Delivery country"
128+msgstr "Pays de délivrance"
129+
130+#. module: partner_multi_passport
131+#: view:res.partner:0
132+msgid "Passport Details"
133+msgstr "Détails du passeport"
134+
135+#. module: partner_multi_passport
136+#: field:res.passport,name:0
137+msgid "Owner name"
138+msgstr "Nom du propriétaire"
139+
140+#. module: partner_multi_passport
141+#: field:res.passport,gender:0
142+msgid "Gender"
143+msgstr "Sexe"
144+
145+#. module: partner_multi_passport
146+#: field:res.passport,number:0
147+msgid "Passport No"
148+msgstr "No du passeport"
149+
150+#. module: partner_multi_passport
151+#: help:res.passport,partner_id:0
152+msgid "Contact."
153+msgstr "Contact."
154+
155+#. module: partner_multi_passport
156+#: help:res.passport,expiration_date:0
157+msgid "Expiration date."
158+msgstr "Date d'expiration."
159+
160+#. module: partner_multi_passport
161+#: view:res.partner:0
162+msgid "Owner name (As printed into the passport)"
163+msgstr "Nom du propriétaire (Comme écrit sur le passeport)"
164+
165+#. module: partner_multi_passport
166+#: field:res.passport,partner_id:0
167+msgid "Contact"
168+msgstr "Contact"
169+
170+#. module: partner_multi_passport
171+#: help:res.passport,number:0
172+msgid "Passport number."
173+msgstr "Numéro du passeport."
174+
175+#. module: partner_multi_passport
176+#: selection:res.passport,gender:0
177+msgid "Female"
178+msgstr "Femme"
179+
180+#. module: partner_multi_passport
181+#: help:res.passport,name:0
182+msgid "Owner name (As printed into the passport)."
183+msgstr "Nom du propriétaire (Comme écrit sur le passeport)."
184+
185+#. module: partner_multi_passport
186+#: model:ir.model,name:partner_multi_passport.model_res_partner
187+msgid "Partner"
188+msgstr "Partenaire"
189+
190+#. module: partner_multi_passport
191+#: help:res.passport,birth_date:0
192+msgid "Birth Date."
193+msgstr "Date de naissance."
194+
195+#. module: partner_multi_passport
196+#: selection:res.passport,gender:0
197+msgid "Male"
198+msgstr "Homme"
199+
200+#. module: partner_multi_passport
201+#: help:res.passport,country_id:0
202+msgid "Delivery country."
203+msgstr "Pays de délivrance."
204+
205+#. module: partner_multi_passport
206+#: field:res.passport,expiration_date:0
207+msgid "Expiration date"
208+msgstr "Date d'expiration"
209+
210+#. module: partner_multi_passport
211+#: field:res.passport,birth_date:0
212+msgid "Birth Date"
213+msgstr "Date de naissance"
214
215=== added file 'partner_multi_passport/i18n/partner_multi_passport.pot'
216--- partner_multi_passport/i18n/partner_multi_passport.pot 1970-01-01 00:00:00 +0000
217+++ partner_multi_passport/i18n/partner_multi_passport.pot 2014-01-10 22:02:41 +0000
218@@ -0,0 +1,118 @@
219+# Translation of OpenERP Server.
220+# This file contains the translation of the following modules:
221+# * partner_multi_passport
222+#
223+msgid ""
224+msgstr ""
225+"Project-Id-Version: OpenERP Server 7.0\n"
226+"Report-Msgid-Bugs-To: \n"
227+"POT-Creation-Date: 2014-01-10 21:36+0000\n"
228+"PO-Revision-Date: 2014-01-10 16:36-0500\n"
229+"Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n"
230+"Language-Team: \n"
231+"MIME-Version: 1.0\n"
232+"Content-Type: text/plain; charset=UTF-8\n"
233+"Content-Transfer-Encoding: 8bit\n"
234+"Plural-Forms: \n"
235+"X-Generator: Poedit 1.5.4\n"
236+
237+#. module: partner_multi_passport
238+#: help:res.passport,gender:0
239+msgid "Gender."
240+msgstr ""
241+
242+#. module: partner_multi_passport
243+#: model:ir.model,name:partner_multi_passport.model_res_passport
244+#: view:res.partner:0 field:res.partner,passport_ids:0
245+msgid "Passport"
246+msgstr ""
247+
248+#. module: partner_multi_passport
249+#: field:res.passport,country_id:0
250+msgid "Delivery country"
251+msgstr ""
252+
253+#. module: partner_multi_passport
254+#: view:res.partner:0
255+msgid "Passport Details"
256+msgstr ""
257+
258+#. module: partner_multi_passport
259+#: field:res.passport,name:0
260+msgid "Owner name"
261+msgstr ""
262+
263+#. module: partner_multi_passport
264+#: field:res.passport,gender:0
265+msgid "Gender"
266+msgstr ""
267+
268+#. module: partner_multi_passport
269+#: field:res.passport,number:0
270+msgid "Passport No"
271+msgstr ""
272+
273+#. module: partner_multi_passport
274+#: help:res.passport,partner_id:0
275+msgid "Contact."
276+msgstr ""
277+
278+#. module: partner_multi_passport
279+#: help:res.passport,expiration_date:0
280+msgid "Expiration date."
281+msgstr ""
282+
283+#. module: partner_multi_passport
284+#: view:res.partner:0
285+msgid "Owner name (As printed into the passport)"
286+msgstr ""
287+
288+#. module: partner_multi_passport
289+#: field:res.passport,partner_id:0
290+msgid "Contact"
291+msgstr ""
292+
293+#. module: partner_multi_passport
294+#: help:res.passport,number:0
295+msgid "Passport number."
296+msgstr ""
297+
298+#. module: partner_multi_passport
299+#: selection:res.passport,gender:0
300+msgid "Female"
301+msgstr ""
302+
303+#. module: partner_multi_passport
304+#: help:res.passport,name:0
305+msgid "Owner name (As printed into the passport)."
306+msgstr ""
307+
308+#. module: partner_multi_passport
309+#: model:ir.model,name:partner_multi_passport.model_res_partner
310+msgid "Partner"
311+msgstr ""
312+
313+#. module: partner_multi_passport
314+#: help:res.passport,birth_date:0
315+msgid "Birth Date."
316+msgstr ""
317+
318+#. module: partner_multi_passport
319+#: selection:res.passport,gender:0
320+msgid "Male"
321+msgstr ""
322+
323+#. module: partner_multi_passport
324+#: help:res.passport,country_id:0
325+msgid "Delivery country."
326+msgstr ""
327+
328+#. module: partner_multi_passport
329+#: field:res.passport,expiration_date:0
330+msgid "Expiration date"
331+msgstr ""
332+
333+#. module: partner_multi_passport
334+#: field:res.passport,birth_date:0
335+msgid "Birth Date"
336+msgstr ""
337
338=== added file 'partner_multi_passport/res_partner.py'
339--- partner_multi_passport/res_partner.py 1970-01-01 00:00:00 +0000
340+++ partner_multi_passport/res_partner.py 2014-01-10 22:02:41 +0000
341@@ -0,0 +1,32 @@
342+# -*- encoding: utf-8 -*-
343+##############################################################################
344+#
345+# OpenERP, Open Source Management Solution
346+# This module copyright (C) 2013 Savoir-faire Linux
347+# (<http://www.savoirfairelinux.com>).
348+#
349+# This program is free software: you can redistribute it and/or modify
350+# it under the terms of the GNU Affero General Public License as
351+# published by the Free Software Foundation, either version 3 of the
352+# License, or (at your option) any later version.
353+#
354+# This program is distributed in the hope that it will be useful,
355+# but WITHOUT ANY WARRANTY; without even the implied warranty of
356+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
357+# GNU Affero General Public License for more details.
358+#
359+# You should have received a copy of the GNU Affero General Public License
360+# along with this program. If not, see <http://www.gnu.org/licenses/>.
361+#
362+##############################################################################
363+
364+from openerp.osv import orm, fields
365+
366+
367+class res_partner(orm.Model):
368+ _inherit = 'res.partner'
369+ _columns = {
370+ 'passport_ids': fields.one2many('res.passport', 'partner_id', 'Passport'),
371+ }
372+
373+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
374
375=== added file 'partner_multi_passport/res_partner_view.xml'
376--- partner_multi_passport/res_partner_view.xml 1970-01-01 00:00:00 +0000
377+++ partner_multi_passport/res_partner_view.xml 2014-01-10 22:02:41 +0000
378@@ -0,0 +1,35 @@
379+<?xml version="1.0" encoding="utf-8"?>
380+<openerp>
381+ <data>
382+ <record id="view_contact_by_function_form" model="ir.ui.view">
383+ <field name="name">contact.functions.form.inherit</field>
384+ <field name="model">res.partner</field>
385+ <field name="inherit_id" ref="base.view_partner_form"/>
386+ <field name="arch" type="xml">
387+ <notebook position="inside">
388+ <page string="Passport" attrs="{'invisible': ['|','|',('is_company','=',True),('contact_id','!=',False)]}">
389+ <field name="passport_ids" nolabel="1">
390+ <tree string="Passport Details">
391+ <field name="name"/>
392+ <field name="number"/>
393+ <field name="country_id"/>
394+ <field name="expiration_date"/>
395+ </tree>
396+ <form string="Passport" version="7.0">
397+ <group col="4">
398+ <field name="name" string="Owner name (As printed into the passport)"/>
399+ <field name="number"/>
400+ <field name="country_id"/>
401+ <field name="expiration_date"/>
402+ <field name="birth_date"/>
403+ <field name="gender"/>
404+ <field name="partner_id" invisible="1"/>
405+ </group>
406+ </form>
407+ </field>
408+ </page>
409+ </notebook>
410+ </field>
411+ </record>
412+ </data>
413+</openerp>
414
415=== added file 'partner_multi_passport/res_passport.py'
416--- partner_multi_passport/res_passport.py 1970-01-01 00:00:00 +0000
417+++ partner_multi_passport/res_passport.py 2014-01-10 22:02:41 +0000
418@@ -0,0 +1,47 @@
419+# -*- encoding: utf-8 -*-
420+##############################################################################
421+#
422+# OpenERP, Open Source Management Solution
423+# This module copyright (C) 2013 Savoir-faire Linux
424+# (<http://www.savoirfairelinux.com>).
425+#
426+# This program is free software: you can redistribute it and/or modify
427+# it under the terms of the GNU Affero General Public License as
428+# published by the Free Software Foundation, either version 3 of the
429+# License, or (at your option) any later version.
430+#
431+# This program is distributed in the hope that it will be useful,
432+# but WITHOUT ANY WARRANTY; without even the implied warranty of
433+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
434+# GNU Affero General Public License for more details.
435+#
436+# You should have received a copy of the GNU Affero General Public License
437+# along with this program. If not, see <http://www.gnu.org/licenses/>.
438+#
439+##############################################################################
440+
441+from openerp.osv import fields, orm
442+
443+
444+class res_passport(orm.Model):
445+ _description = 'Passport'
446+ _name = 'res.passport'
447+ _columns = {
448+ 'name': fields.char('Owner name', size=256, required=True, select=True,
449+ help='Owner name (As printed into the passport).'),
450+ 'number': fields.char('Passport No', size=50, required=True,
451+ help='Passport number.'),
452+ 'country_id': fields.many2one('res.country', 'Delivery country',
453+ required=True,
454+ help="Delivery country."),
455+ 'expiration_date': fields.date('Expiration date', required=True,
456+ help="Expiration date."),
457+ 'birth_date': fields.date('Birth Date', help="Birth Date."),
458+ 'gender': fields.selection([('male', 'Male'),
459+ ('female', 'Female')],
460+ 'Gender',
461+ help="Gender."),
462+ 'partner_id': fields.many2one('res.partner', 'Contact', help="Contact."),
463+ }
464+
465+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches

to all changes: