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

Proposed by Mathieu Benoit on 2014-04-01
Status: Needs review
Proposed branch: lp:~savoirfairelinux-openerp/partner-contact-management/partner_category_description
Merge into: lp:~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 212 lines (+172/-0)
6 files modified
partner_category_description/__init__.py (+21/-0)
partner_category_description/__openerp__.py (+49/-0)
partner_category_description/i18n/fr.po (+28/-0)
partner_category_description/i18n/partner_category_description.pot (+27/-0)
partner_category_description/res_partner.py (+29/-0)
partner_category_description/res_partner_view.xml (+18/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/partner-contact-management/partner_category_description
Reviewer Review Type Date Requested Status
Lorenzo Battistini - Agile BG (community) Resubmit on 2014-07-23
Yannick Vaucher @ Camptocamp 2014-04-01 Needs Information on 2014-05-02
Sandy Carter (http://www.savoirfairelinux.com) 2014-04-01 Approve on 2014-05-02
Joao Alfredo Gama Batista code review, no tests 2014-04-01 Pending
Review via email: mp+213697@code.launchpad.net

This proposal supersedes a proposal from 2014-03-24.

Description of the change

Add field description to partner.category.

To post a comment you must log in.
Joao Alfredo Gama Batista (joao-gama) wrote : Posted in a previous version of this proposal

Hi Mathieu,

Thanks for your contribution.

Here's my review:

l.172 Please use orm instead of osv.
l.175 osv.Model -> orm.Model
l.192 It's not a good idea to override a view's external id. Please pick another name for the id.

review: Needs Fixing (code review, no tests)

Was this proposed in openobject-server for trunk? It seams a good it to be able to give details about a category.

review: Needs Information

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

40. By Mathieu Benoit on 2014-04-01

[FIX] partner_category_description: replace osv to orm. Add new id to view_partner_category_form

39. By Mathieu Benoit on 2014-03-25

[FIX] partner_category_description: fix pep8

38. By Mathieu Benoit on 2014-03-24

[ADD] partner_category_description: add field description translatable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_category_description'
2=== added file 'partner_category_description/__init__.py'
3--- partner_category_description/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_category_description/__init__.py 2014-04-01 18:02:54 +0000
5@@ -0,0 +1,21 @@
6+# -*- encoding: utf-8 -*-
7+#
8+# OpenERP, Open Source Management Solution
9+# This module copyright (C) 2014 Savoir-faire Linux
10+# (<http://www.savoirfairelinux.com>).
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 res_partner
27
28=== added file 'partner_category_description/__openerp__.py'
29--- partner_category_description/__openerp__.py 1970-01-01 00:00:00 +0000
30+++ partner_category_description/__openerp__.py 2014-04-01 18:02:54 +0000
31@@ -0,0 +1,49 @@
32+# -*- encoding: utf-8 -*-
33+#
34+# OpenERP, Open Source Management Solution
35+# This module copyright (C) 2014 Savoir-faire Linux
36+# (<http://www.savoirfairelinux.com>).
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+{
53+ 'name': 'Partner Category Description',
54+ 'version': '0.1',
55+ 'author': 'Savoir-faire Linux',
56+ 'maintainer': 'Savoir-faire Linux',
57+ 'website': 'http://www.savoirfairelinux.com',
58+ 'license': 'AGPL-3',
59+ 'category': 'Partner',
60+ 'summary': 'Partner category description',
61+ 'description': """
62+Partner Category Description module
63+===================================
64+This module adds a translatable description to the partner tags.
65+
66+.. image:: /partner_category_description/static/src/demo/view_partner_quantity_description.png
67+
68+Contributors
69+------------
70+* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com)
71+""",
72+ 'depends': [],
73+ 'external_dependencies': {
74+ 'python': [],
75+ },
76+ 'data': [
77+ 'res_partner_view.xml'
78+ ],
79+ 'installable': True,
80+}
81
82=== added directory 'partner_category_description/i18n'
83=== added file 'partner_category_description/i18n/fr.po'
84--- partner_category_description/i18n/fr.po 1970-01-01 00:00:00 +0000
85+++ partner_category_description/i18n/fr.po 2014-04-01 18:02:54 +0000
86@@ -0,0 +1,28 @@
87+# Translation of OpenERP Server.
88+# This file contains the translation of the following modules:
89+# * partner_category_description
90+#
91+msgid ""
92+msgstr ""
93+"Project-Id-Version: OpenERP Server 7.0\n"
94+"Report-Msgid-Bugs-To: \n"
95+"POT-Creation-Date: 2014-03-17 22:26+0000\n"
96+"PO-Revision-Date: 2014-03-17 18:31-0500\n"
97+"Last-Translator: <>\n"
98+"Language-Team: \n"
99+"MIME-Version: 1.0\n"
100+"Content-Type: text/plain; charset=UTF-8\n"
101+"Content-Transfer-Encoding: 8bit\n"
102+"Plural-Forms: \n"
103+"X-Generator: Poedit 1.6.4\n"
104+"Language: fr\n"
105+
106+#. module: partner_category_description
107+#: model:ir.model,name:partner_category_description.model_res_partner_category
108+msgid "Partner Categories"
109+msgstr "Cat├ęgories de partenaires"
110+
111+#. module: partner_category_description
112+#: field:res.partner.category,description:0
113+msgid "Description"
114+msgstr "Description"
115
116=== added file 'partner_category_description/i18n/partner_category_description.pot'
117--- partner_category_description/i18n/partner_category_description.pot 1970-01-01 00:00:00 +0000
118+++ partner_category_description/i18n/partner_category_description.pot 2014-04-01 18:02:54 +0000
119@@ -0,0 +1,27 @@
120+# Translation of OpenERP Server.
121+# This file contains the translation of the following modules:
122+# * partner_category_description
123+#
124+msgid ""
125+msgstr ""
126+"Project-Id-Version: OpenERP Server 7.0\n"
127+"Report-Msgid-Bugs-To: \n"
128+"POT-Creation-Date: 2014-03-17 22:26+0000\n"
129+"PO-Revision-Date: 2014-03-17 18:30-0500\n"
130+"Last-Translator: <>\n"
131+"Language-Team: \n"
132+"MIME-Version: 1.0\n"
133+"Content-Type: text/plain; charset=UTF-8\n"
134+"Content-Transfer-Encoding: 8bit\n"
135+"Plural-Forms: \n"
136+"X-Generator: Poedit 1.6.4\n"
137+
138+#. module: partner_category_description
139+#: model:ir.model,name:partner_category_description.model_res_partner_category
140+msgid "Partner Categories"
141+msgstr ""
142+
143+#. module: partner_category_description
144+#: field:res.partner.category,description:0
145+msgid "Description"
146+msgstr ""
147
148=== added file 'partner_category_description/res_partner.py'
149--- partner_category_description/res_partner.py 1970-01-01 00:00:00 +0000
150+++ partner_category_description/res_partner.py 2014-04-01 18:02:54 +0000
151@@ -0,0 +1,29 @@
152+# -*- encoding: utf-8 -*-
153+#
154+# OpenERP, Open Source Management Solution
155+# This module copyright (C) 2014 Savoir-faire Linux
156+# (<http://www.savoirfairelinux.com>).
157+#
158+# This program is free software: you can redistribute it and/or modify
159+# it under the terms of the GNU Affero General Public License as
160+# published by the Free Software Foundation, either version 3 of the
161+# License, or (at your option) any later version.
162+#
163+# This program is distributed in the hope that it will be useful,
164+# but WITHOUT ANY WARRANTY; without even the implied warranty of
165+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
166+# GNU Affero General Public License for more details.
167+#
168+# You should have received a copy of the GNU Affero General Public License
169+# along with this program. If not, see <http://www.gnu.org/licenses/>.
170+#
171+
172+from openerp.osv import orm, fields
173+
174+
175+class res_partner_category(orm.Model):
176+ _inherit = "res.partner.category"
177+
178+ _columns = {
179+ 'description': fields.text('Description', translate=True)
180+ }
181
182=== added file 'partner_category_description/res_partner_view.xml'
183--- partner_category_description/res_partner_view.xml 1970-01-01 00:00:00 +0000
184+++ partner_category_description/res_partner_view.xml 2014-04-01 18:02:54 +0000
185@@ -0,0 +1,18 @@
186+<?xml version="1.0" encoding="utf-8"?>
187+<!DOCTYPE openerp SYSTEM "openerp.dtd">
188+<openerp>
189+ <data>
190+ <!-- Categories -->
191+ <record id="view_partner_category_desc_form" model="ir.ui.view">
192+ <field name="model">res.partner.category</field>
193+ <field name="inherit_id" ref="base.view_partner_category_form"/>
194+ <field name="arch" type="xml">
195+ <group col="4" position="after">
196+ <group>
197+ <field name="description"/>
198+ </group>
199+ </group>
200+ </field>
201+ </record>
202+ </data>
203+</openerp>
204\ No newline at end of file
205
206=== added directory 'partner_category_description/static'
207=== added directory 'partner_category_description/static/src'
208=== added directory 'partner_category_description/static/src/demo'
209=== added file 'partner_category_description/static/src/demo/icon.png'
210Binary files partner_category_description/static/src/demo/icon.png 1970-01-01 00:00:00 +0000 and partner_category_description/static/src/demo/icon.png 2014-04-01 18:02:54 +0000 differ
211=== added file 'partner_category_description/static/src/demo/view_partner_quantity_description.png'
212Binary files partner_category_description/static/src/demo/view_partner_quantity_description.png 1970-01-01 00:00:00 +0000 and partner_category_description/static/src/demo/view_partner_quantity_description.png 2014-04-01 18:02:54 +0000 differ