Merge lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into lp:~partner-contact-core-editors/partner-contact-management/7.0

Proposed by Nicolas Bessi - Camptocamp on 2014-05-22
Status: Needs review
Proposed branch: lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi
Merge into: lp:~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 168 lines (+141/-0)
5 files modified
partner_birthdate/__init__.py (+21/-0)
partner_birthdate/__openerp__.py (+37/-0)
partner_birthdate/model/__init__.py (+21/-0)
partner_birthdate/model/res_partner.py (+30/-0)
partner_birthdate/view/res_partner_view.xml (+32/-0)
To merge this branch: bzr merge lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi
Reviewer Review Type Date Requested Status
Lorenzo Battistini - Agile BG (community) Resubmit on 2014-07-23
Omar (Pexego) code review, no test 2014-05-22 Approve on 2014-05-27
Review via email: mp+220637@code.launchpad.net

Description of the change

Add a simple module to add birthdate (in date format) on partner, contact form

To post a comment you must log in.
Omar (Pexego) (omar7r) wrote :

LGTM

review: Approve (code review, no test)

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

38. By Nicolas Bessi - Camptocamp on 2014-05-22

[ADD] partner_birthdate

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_birthdate'
2=== added file 'partner_birthdate/__init__.py'
3--- partner_birthdate/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_birthdate/__init__.py 2014-05-22 13:00:53 +0000
5@@ -0,0 +1,21 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# Author: Nicolas Bessi
10+# Copyright 2014 Camptocamp SA
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as
14+# published by the Free Software Foundation, either version 3 of the
15+# License, or (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+from . import model
27
28=== added file 'partner_birthdate/__openerp__.py'
29--- partner_birthdate/__openerp__.py 1970-01-01 00:00:00 +0000
30+++ partner_birthdate/__openerp__.py 2014-05-22 13:00:53 +0000
31@@ -0,0 +1,37 @@
32+# -*- coding: utf-8 -*-
33+##############################################################################
34+#
35+# Author: Nicolas Bessi
36+# Copyright 2014 Camptocamp SA
37+#
38+# This program is free software: you can redistribute it and/or modify
39+# it under the terms of the GNU Affero General Public License as
40+# published by the Free Software Foundation, either version 3 of the
41+# License, or (at your option) any later version.
42+#
43+# This program is distributed in the hope that it will be useful,
44+# but WITHOUT ANY WARRANTY; without even the implied warranty of
45+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46+# GNU Affero General Public License for more details.
47+#
48+# You should have received a copy of the GNU Affero General Public License
49+# along with this program. If not, see <http://www.gnu.org/licenses/>.
50+#
51+##############################################################################
52+{'name': 'Partner birthdate',
53+ 'version': '0.1',
54+ 'author': 'Camptocamp',
55+ 'maintainer': 'Camptocamp',
56+ 'category': 'Partner',
57+ 'complexity': 'easy',
58+ 'depends': ['base'],
59+ 'description': """Add a new birthday field (of type date not char) on contact form""",
60+ 'website': 'http://www.camptocamp.com',
61+ 'data': ['view/res_partner_view.xml'],
62+ 'demo': [],
63+ 'test': [],
64+ 'installable': True,
65+ 'auto_install': False,
66+ 'license': 'AGPL-3',
67+ 'application': False,
68+ }
69
70=== added directory 'partner_birthdate/model'
71=== added file 'partner_birthdate/model/__init__.py'
72--- partner_birthdate/model/__init__.py 1970-01-01 00:00:00 +0000
73+++ partner_birthdate/model/__init__.py 2014-05-22 13:00:53 +0000
74@@ -0,0 +1,21 @@
75+# -*- coding: utf-8 -*-
76+##############################################################################
77+#
78+# Author: Nicolas Bessi
79+# Copyright 2014 Camptocamp SA
80+#
81+# This program is free software: you can redistribute it and/or modify
82+# it under the terms of the GNU Affero General Public License as
83+# published by the Free Software Foundation, either version 3 of the
84+# License, or (at your option) any later version.
85+#
86+# This program is distributed in the hope that it will be useful,
87+# but WITHOUT ANY WARRANTY; without even the implied warranty of
88+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89+# GNU Affero General Public License for more details.
90+#
91+# You should have received a copy of the GNU Affero General Public License
92+# along with this program. If not, see <http://www.gnu.org/licenses/>.
93+#
94+##############################################################################
95+from . import res_partner
96
97=== added file 'partner_birthdate/model/res_partner.py'
98--- partner_birthdate/model/res_partner.py 1970-01-01 00:00:00 +0000
99+++ partner_birthdate/model/res_partner.py 2014-05-22 13:00:53 +0000
100@@ -0,0 +1,30 @@
101+# -*- coding: utf-8 -*-
102+##############################################################################
103+#
104+# Author: Nicolas Bessi
105+# Copyright 2014 Camptocamp SA
106+#
107+# This program is free software: you can redistribute it and/or modify
108+# it under the terms of the GNU Affero General Public License as
109+# published by the Free Software Foundation, either version 3 of the
110+# License, or (at your option) any later version.
111+#
112+# This program is distributed in the hope that it will be useful,
113+# but WITHOUT ANY WARRANTY; without even the implied warranty of
114+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
115+# GNU Affero General Public License for more details.
116+#
117+# You should have received a copy of the GNU Affero General Public License
118+# along with this program. If not, see <http://www.gnu.org/licenses/>.
119+#
120+##############################################################################
121+from openerp.osv import orm, fields
122+
123+
124+class res_partner(orm.Model):
125+ """docstring"""
126+
127+ _inherit = "res.partner"
128+ _columns = {
129+ 'birthday_date': fields.date('Birthday'),
130+ }
131
132=== added directory 'partner_birthdate/view'
133=== added file 'partner_birthdate/view/res_partner_view.xml'
134--- partner_birthdate/view/res_partner_view.xml 1970-01-01 00:00:00 +0000
135+++ partner_birthdate/view/res_partner_view.xml 2014-05-22 13:00:53 +0000
136@@ -0,0 +1,32 @@
137+<?xml version="1.0" encoding="utf-8"?>
138+<openerp>
139+ <data>
140+ <record id="add_birthdate_in_main_view" model="ir.ui.view">
141+ <field name="name">add birthdate in main view</field>
142+ <field name="model">res.partner</field>
143+ <field name="inherit_id" ref="base.view_partner_form" />
144+ <field name="arch" type="xml">
145+ <xpath expr="//field[@name='child_ids']/form/sheet/group/field[@name='function']" position="after">
146+ <field name="birthday_date"/>
147+ </xpath>
148+ <field name="function" position="after">
149+ <field name="birthday_date"
150+ attrs="{'invisible': [('is_company','=', True)]}"/>
151+ </field>
152+ </field>
153+ </record>
154+
155+ <record id="add_birthdate_in_simple_view" model="ir.ui.view">
156+ <field name="name">add birthdate in main view</field>
157+ <field name="model">res.partner</field>
158+ <field name="inherit_id" ref="base.view_partner_simple_form" />
159+ <field name="arch" type="xml">
160+ <field name="function" position="after">
161+ <field name="birthday_date"
162+ attrs="{'invisible': [('is_company','=', True)]}"/>
163+ </field>
164+ </field>
165+ </record>
166+
167+ </data>
168+</openerp>

Subscribers

People subscribed via source and target branches

to status/vote changes: