Merge lp:~initos.com/account-analytic/7.0 into lp:~account-core-editors/account-analytic/7.0

Proposed by Markus Schneider on 2013-11-15
Status: Merged
Merged at revision: 17
Proposed branch: lp:~initos.com/account-analytic/7.0
Merge into: lp:~account-core-editors/account-analytic/7.0
Diff against target: 317 lines (+279/-0)
7 files modified
account_analytic_line_list/__init__.py (+22/-0)
account_analytic_line_list/__openerp__.py (+44/-0)
account_analytic_line_list/i18n/account_analytic_line_list.pot (+45/-0)
account_analytic_line_list/i18n/es.po (+43/-0)
account_analytic_line_list/wizard/__init__.py (+24/-0)
account_analytic_line_list/wizard/account_analytic_line.py (+59/-0)
account_analytic_line_list/wizard/account_analytic_line.xml (+42/-0)
To merge this branch: bzr merge lp:~initos.com/account-analytic/7.0
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Approve on 2014-03-21
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve on 2014-01-03
Omar (Pexego) code review Needs Fixing on 2013-12-13
Pedro Manuel Baeza code review, no test 2013-11-15 Approve on 2013-11-28
Review via email: mp+195362@code.launchpad.net

Description of the change

migrate acy_account_analytic_lines from lp:acysos/openerp-addons-6.0 to OpenERP 7
this modul fits this branch

To post a comment you must log in.
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Markus,

Thank you very much for the new MP.

Some things seeing the code (not functional review yet):

- Lines inside for of _append_childs have an incorrect indentation.
- You should make PEP8 compliance according community guides. You can use flake8 tool to check it on .py files.

review: Needs Fixing (code review, no test)
lp:~initos.com/account-analytic/7.0 updated on 2013-11-15
18. By Markus Schneider on 2013-11-15

correct indentation

Markus Schneider (markus-schneider) wrote :

we read it carefully

flake8 .
./__init__.py:22:1: F401 'wizard' imported but unused
./__openerp__.py:30:80: E501 line too long (95 > 79 characters)
./__openerp__.py:31:80: E501 line too long (97 > 79 characters)
./wizard/__init__.py:24:1: F401 'account_analytic_line' imported but unused
./wizard/account_analytic_line.py:31:80: E501 line too long (102 > 79 characters)
./wizard/account_analytic_line.py:43:80: E501 line too long (109 > 79 characters)

less then other modules in this branch

Pedro Manuel Baeza (pedro.baeza) wrote :

Indeed, there are modules that are already hosted on community repositories that have less coding conventions than yours, but these modules were included blindly when we start the project to have a base where we can work, and for now what we are trying to do is to increase more and more the quality of new additions. In the same way, when someone propose a change on that existing modules, we ask for a refactorization of them at the same time.

I hope you understand it.

On flake8 output, you can ignore the two line of "imported but unused"

Regards.

lp:~initos.com/account-analytic/7.0 updated on 2013-11-28
19. By Markus Schneider on 2013-11-15

fix code formating

20. By Markus Schneider on 2013-11-28

remove debug

Markus Schneider (markus-schneider) wrote :

i have fix it and have PEP8 fully covered

Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Markus,

Thank you very much for the changes.

Regards.

review: Approve (code review, no test)
Omar (Pexego) (omar7r) wrote :

Please, update translation files. Replace acy_account_analytic_lines by account_analytic_line_list.

review: Needs Fixing (code review)
lp:~initos.com/account-analytic/7.0 updated on 2013-12-13
21. By Markus Schneider on 2013-12-13

rename translation

Markus Schneider (markus-schneider) wrote :

fixed: translation files renamed

Hello Markus,

I don't know if it has an impact but the PO files still contains the previous name of the module.

Otherwise I would approve it.

Thanks.

review: Needs Fixing (code review)
lp:~initos.com/account-analytic/7.0 updated on 2014-01-03
22. By Markus Schneider on 2014-01-03

update translation stuff

Markus Schneider (markus-schneider) wrote :

sorry, now i fix it

review: Approve (code review)

Please provide a better explanation in module description.

review: Needs Fixing (description)
lp:~initos.com/account-analytic/7.0 updated on 2014-03-21
23. By Markus Schneider on 2014-03-21

update module description

Markus Schneider (markus-schneider) wrote :

Update module description.

Thanks it may lead a bit better the user who search modules through apps.openerp.com

review: Approve
Pedro Manuel Baeza (pedro.baeza) wrote :

I proceed with the merge, because Omar needs fixing comment is already repaired.

Regards.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_analytic_line_list'
2=== added file 'account_analytic_line_list/__init__.py'
3--- account_analytic_line_list/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_analytic_line_list/__init__.py 2014-03-21 10:39:26 +0000
5@@ -0,0 +1,22 @@
6+# -*- encoding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (c) 2013 Markus SChneider <markus.schneider@initos.com>
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU General Public License as published by
14+# the Free Software Foundation, either version 3 of the License, or
15+# (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 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+
27+from . import wizard
28
29=== added file 'account_analytic_line_list/__openerp__.py'
30--- account_analytic_line_list/__openerp__.py 1970-01-01 00:00:00 +0000
31+++ account_analytic_line_list/__openerp__.py 2014-03-21 10:39:26 +0000
32@@ -0,0 +1,44 @@
33+# -*- encoding: utf-8 -*-
34+##############################################################################
35+#
36+# OpenERP, Open Source Management Solution
37+# Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
38+# Ignacio Ibeas <ignacio@acysos.com>
39+# 2013 Markus SChneider <markus.schneider@initos.com>
40+#
41+# This program is free software: you can redistribute it and/or modify
42+# it under the terms of the GNU General Public License as published by
43+# the Free Software Foundation, either version 3 of the License, or
44+# (at your option) any later version.
45+#
46+# This program is distributed in the hope that it will be useful,
47+# but WITHOUT ANY WARRANTY; without even the implied warranty of
48+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49+# GNU General Public License for more details.
50+#
51+# You should have received a copy of the GNU Affero General Public License
52+# along with this program. If not, see <http://www.gnu.org/licenses/>.
53+#
54+##############################################################################
55+
56+{
57+ "name": "Account Analytic Line List",
58+ "version": "1.1",
59+ "author": "initOS GmbH & Co. KG",
60+ "website": "www.initos.com",
61+ "category": "Generic Modules/Projects & Services",
62+ "description": """Adds a wizard on financial reporting to search
63+ the analytic lines for a given analytic account including all
64+ their child accounts. Ported module acy_account_analytic_lines
65+ from Acysos S.L. (Sponsored by Talleres Mutilva)""",
66+ "license": "AGPL-3",
67+ "depends": [
68+ "base",
69+ "account",
70+ "analytic"
71+ ],
72+ "data": ["wizard/account_analytic_line.xml"],
73+ "demo": [],
74+ "active": False,
75+ "installable": True
76+}
77
78=== added directory 'account_analytic_line_list/i18n'
79=== added file 'account_analytic_line_list/i18n/account_analytic_line_list.pot'
80--- account_analytic_line_list/i18n/account_analytic_line_list.pot 1970-01-01 00:00:00 +0000
81+++ account_analytic_line_list/i18n/account_analytic_line_list.pot 2014-03-21 10:39:26 +0000
82@@ -0,0 +1,45 @@
83+# Translation of OpenERP Server.
84+# This file contains the translation of the following modules:
85+# * account_analytic_line_list
86+#
87+msgid ""
88+msgstr ""
89+"Project-Id-Version: OpenERP Server 7.0.0\n"
90+"Report-Msgid-Bugs-To: support@openerp.com\n"
91+"POT-Creation-Date: 2011-20-10 01:31:24+0000\n"
92+"PO-Revision-Date: 2011-20-10 01:31:24+0000\n"
93+"Last-Translator: <>\n"
94+"Language-Team: \n"
95+"MIME-Version: 1.0\n"
96+"Content-Type: text/plain; charset=UTF-8\n"
97+"Content-Transfer-Encoding: \n"
98+"Plural-Forms: \n"
99+
100+#. module: account_analytic_line_list
101+#: field:account.analytic.view.line,analytic_id:0
102+msgid "Analytic Account"
103+msgstr ""
104+
105+#. module: account_analytic_line_list
106+#: field:account.analytic.view.line,children:0
107+msgid "With children"
108+msgstr ""
109+
110+#. module: account_analytic_line_list
111+#: model:ir.actions.act_window,name:account_analytic_view_line.action_view_account_analytic_lines
112+#: model:ir.ui.menu,name:account_analytic_line_list.menu_view_account_analytic_lines
113+#: view:account.analytic.view.line:0
114+msgid "Analytic account lines"
115+msgstr ""
116+
117+#. module: account_analytic_line_list
118+#: view:account.analytic.view.line:0
119+msgid "Open Lines"
120+msgstr ""
121+
122+#. module: account_analytic_line_list
123+#: view:account.analytic.view.line:0
124+msgid "Cancel"
125+msgstr ""
126+
127+
128
129=== added file 'account_analytic_line_list/i18n/es.po'
130--- account_analytic_line_list/i18n/es.po 1970-01-01 00:00:00 +0000
131+++ account_analytic_line_list/i18n/es.po 2014-03-21 10:39:26 +0000
132@@ -0,0 +1,43 @@
133+# Translation of OpenERP Server.
134+# This file contains the translation of the following modules:
135+# * account_analytic_line_list
136+#
137+msgid ""
138+msgstr ""
139+"Project-Id-Version: OpenERP Server 7.0.0\n"
140+"Report-Msgid-Bugs-To: support@openerp.com\n"
141+"POT-Creation-Date: 2011-20-10 01:31:24+0000\n"
142+"PO-Revision-Date: 2011-20-10 01:31:24+0000\n"
143+"Last-Translator: <>\n"
144+"Language-Team: \n"
145+"MIME-Version: 1.0\n"
146+"Content-Type: text/plain; charset=UTF-8\n"
147+"Content-Transfer-Encoding: \n"
148+"Plural-Forms: \n"
149+
150+#. module: account_analytic_line_list
151+#: field:account.analytic.view.line,analytic_id:0
152+msgid "Analytic Account"
153+msgstr "Cuenta analĂ­tica"
154+
155+#. module: account_analytic_line_list
156+#: field:account.analytic.view.line,children:0
157+msgid "With children"
158+msgstr "Con subcuentas"
159+
160+#. module: account_analytic_line_list
161+#: model:ir.actions.act_window,name:account_analytic_view_line.action_view_account_analytic_lines
162+#: model:ir.ui.menu,name:account_analytic_line_list.menu_view_account_analytic_lines
163+#: view:account.analytic.view.line:0
164+msgid "Analytic account lines"
165+msgstr "Apuntes por cuenta analĂ­tica"
166+
167+#. module: account_analytic_line_list
168+#: view:account.analytic.view.line:0
169+msgid "Open Lines"
170+msgstr "Abrir apuntes"
171+
172+#. module: account_analytic_line_list
173+#: view:account.analytic.view.line:0
174+msgid "Cancel"
175+msgstr "Cancelar"
176
177=== added directory 'account_analytic_line_list/wizard'
178=== added file 'account_analytic_line_list/wizard/__init__.py'
179--- account_analytic_line_list/wizard/__init__.py 1970-01-01 00:00:00 +0000
180+++ account_analytic_line_list/wizard/__init__.py 2014-03-21 10:39:26 +0000
181@@ -0,0 +1,24 @@
182+# -*- encoding: utf-8 -*-
183+##############################################################################
184+#
185+# OpenERP, Open Source Management Solution
186+# Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
187+# Ignacio Ibeas <ignacio@acysos.com>
188+# 2013 Markus SChneider <markus.schneider@initos.com>
189+#
190+# This program is free software: you can redistribute it and/or modify
191+# it under the terms of the GNU General Public License as published by
192+# the Free Software Foundation, either version 3 of the License, or
193+# (at your option) any later version.
194+#
195+# This program is distributed in the hope that it will be useful,
196+# but WITHOUT ANY WARRANTY; without even the implied warranty of
197+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
198+# GNU General Public License for more details.
199+#
200+# You should have received a copy of the GNU Affero General Public License
201+# along with this program. If not, see <http://www.gnu.org/licenses/>.
202+#
203+##############################################################################
204+
205+from . import account_analytic_line
206
207=== added file 'account_analytic_line_list/wizard/account_analytic_line.py'
208--- account_analytic_line_list/wizard/account_analytic_line.py 1970-01-01 00:00:00 +0000
209+++ account_analytic_line_list/wizard/account_analytic_line.py 2014-03-21 10:39:26 +0000
210@@ -0,0 +1,59 @@
211+# -*- encoding: utf-8 -*-
212+##############################################################################
213+#
214+# OpenERP, Open Source Management Solution
215+# Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
216+# Ignacio Ibeas <ignacio@acysos.com>
217+# 2013 Markus SChneider <markus.schneider@initos.com>
218+#
219+# This program is free software: you can redistribute it and/or modify
220+# it under the terms of the GNU General Public License as published by
221+# the Free Software Foundation, either version 3 of the License, or
222+# (at your option) any later version.
223+#
224+# This program is distributed in the hope that it will be useful,
225+# but WITHOUT ANY WARRANTY; without even the implied warranty of
226+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
227+# GNU General Public License for more details.
228+#
229+# You should have received a copy of the GNU Affero General Public License
230+# along with this program. If not, see <http://www.gnu.org/licenses/>.
231+#
232+##############################################################################
233+from openerp.osv import orm, fields
234+
235+
236+class AccountAnalyticViewLine(orm.TransientModel):
237+ _name = "account.analytic.view.line"
238+ _description = "Account Analytic View Line"
239+
240+ _columns = {
241+ 'analytic_id': fields.many2one('account.analytic.account',
242+ 'Analytic Account', required=True),
243+ 'children': fields.boolean('With children'),
244+ }
245+
246+ def _append_childs(self, cr, uid, accounts, analytic_obj):
247+ for child in analytic_obj.child_complete_ids:
248+ accounts.append(child.id)
249+ self._append_childs(cr, uid, accounts, child)
250+
251+ def open_account_analytic_lines(self, cr, uid, ids, context=None):
252+ data = self.read(cr, uid, ids, [], context=context)[0]
253+ analytic_obj = self.pool.get('account.analytic.account')\
254+ .browse(cr, uid, [data['analytic_id'][0]])[0]
255+ accounts = []
256+ accounts.append(analytic_obj.id)
257+ if data['children'] == 1:
258+ self._append_childs(cr, uid, accounts, analytic_obj)
259+ res = {
260+ 'domain': str([('account_id', 'in', accounts)]),
261+ 'name': 'Analytic account lines',
262+ 'view_type': 'form',
263+ 'view_mode': 'tree,form',
264+ 'res_model': 'account.analytic.line',
265+ 'view_id': False,
266+ 'type': 'ir.actions.act_window',
267+ 'context': {'search_default_to_invoice': 1},
268+ }
269+ return res
270
271=== added file 'account_analytic_line_list/wizard/account_analytic_line.xml'
272--- account_analytic_line_list/wizard/account_analytic_line.xml 1970-01-01 00:00:00 +0000
273+++ account_analytic_line_list/wizard/account_analytic_line.xml 2014-03-21 10:39:26 +0000
274@@ -0,0 +1,42 @@
275+<?xml version="1.0" encoding="utf-8"?>
276+<openerp>
277+ <data>
278+
279+ <record id="view_account_analytic_lines" model="ir.ui.view">
280+ <field name="name">view.account.analytic.lines.form</field>
281+ <field name="model">account.analytic.view.line</field>
282+ <field name="type">form</field>
283+ <field name="arch" type="xml">
284+ <form string="Analytic account lines">
285+ <group colspan="4">
286+ <field name="analytic_id" />
287+ <field name="children"/>
288+ </group>
289+ <separator string="" colspan="4"/>
290+ <group colspan="4" col="6">
291+ <button icon="gtk-cancel" special="cancel" string="Cancel"/>
292+ <button icon="terp-gtk-go-back-rtl" string="Open Lines" name="open_account_analytic_lines" type="object"/>
293+ </group>
294+ </form>
295+ </field>
296+ </record>
297+
298+ <record id="action_view_account_analytic_lines" model="ir.actions.act_window">
299+ <field name="name">Analytic account lines</field>
300+ <field name="type">ir.actions.act_window</field>
301+ <field name="res_model">account.analytic.view.line</field>
302+ <field name="view_type">form</field>
303+ <field name="view_mode">form</field>
304+ <field name="target">new</field>
305+ </record>
306+
307+ <menuitem
308+ name="Analytic account lines"
309+ action="action_view_account_analytic_lines"
310+ id="menu_view_account_analytic_lines"
311+ parent="account.next_id_40"
312+ sequence="2"
313+ icon="STOCK_INDENT"/>
314+
315+ </data>
316+</openerp>
317\ No newline at end of file

Subscribers

People subscribed via source and target branches

to status/vote changes: