Merge lp:~elbati/openobject-italia/remake-vat-registries-improvements into lp:~icsergio/openobject-italia/remake-vat-registries

Proposed by Lorenzo Battistini
Status: Merged
Merged at revision: 210
Proposed branch: lp:~elbati/openobject-italia/remake-vat-registries-improvements
Merge into: lp:~icsergio/openobject-italia/remake-vat-registries
Diff against target: 128 lines (+37/-9)
7 files modified
account_vat_registries_webkit/__init__.py (+3/-1)
account_vat_registries_webkit/__openerp__.py (+3/-1)
account_vat_registries_webkit/report/__init__.py (+20/-2)
account_vat_registries_webkit/report/templates/account_report_vat_registries.mako (+1/-1)
account_vat_registries_webkit/report/vat_registries.py (+4/-2)
account_vat_registries_webkit/wizard/__init__.py (+3/-1)
account_vat_registries_webkit/wizard/vatregistries_wizard.py (+3/-1)
To merge this branch: bzr merge lp:~elbati/openobject-italia/remake-vat-registries-improvements
Reviewer Review Type Date Requested Status
Sergio Corato Approve
Review via email: mp+158431@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao xergio, come mai hai usato SQL per calcolare i saldi dei tax code, e non il metodo _sum_period?
Ci sarebbe il metodo '_sum_period' per fare quel calcolo.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

> Ciao xergio, come mai hai usato SQL per calcolare i saldi dei tax code, e non
> il metodo _sum_period?
> Ci sarebbe il metodo '_sum_period' per fare quel calcolo.

Oops, ho scritto il commento in 2 tempi e non mi sono accorto di essermi ripetuto

Revision history for this message
Sergio Corato (icsergio) :
review: Approve
Revision history for this message
Sergio Corato (icsergio) wrote :

> > Ciao xergio, come mai hai usato SQL per calcolare i saldi dei tax code, e
> non
> > il metodo _sum_period?
non lo sapevo
> > Ci sarebbe il metodo '_sum_period' per fare quel calcolo.
>
non lo sapevo
> Oops, ho scritto il commento in 2 tempi e non mi sono accorto di essermi
> ripetuto
oh, non me n'ero accorto ;P

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_vat_registries_webkit/__init__.py'
2--- account_vat_registries_webkit/__init__.py 2013-03-28 23:45:06 +0000
3+++ account_vat_registries_webkit/__init__.py 2013-04-11 17:12:34 +0000
4@@ -1,7 +1,9 @@
5-# -*- encoding: utf-8 -*-
6+# -*- coding: utf-8 -*-
7 ##############################################################################
8 #
9 # Author: Nicolas Bessi. Copyright Camptocamp SA
10+# Copyright (C) 2013 Associazione OpenERP Italia
11+# (<http://www.openerp-italia.org>).
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
16=== modified file 'account_vat_registries_webkit/__openerp__.py'
17--- account_vat_registries_webkit/__openerp__.py 2013-04-04 22:40:47 +0000
18+++ account_vat_registries_webkit/__openerp__.py 2013-04-11 17:12:34 +0000
19@@ -1,9 +1,11 @@
20-# -*- encoding: utf-8 -*-
21+# -*- coding: utf-8 -*-
22 ##############################################################################
23 #
24 # Authors: Nicolas Bessi, Guewen Baconnier
25 # Copyright Camptocamp SA 2011
26 # (c) 2013 Sergio Corato
27+# Copyright (C) 2013 Associazione OpenERP Italia
28+# (<http://www.openerp-italia.org>).
29 #
30 # This program is free software: you can redistribute it and/or modify
31 # it under the terms of the GNU Affero General Public License as
32
33=== modified file 'account_vat_registries_webkit/report/__init__.py'
34--- account_vat_registries_webkit/report/__init__.py 2013-03-28 23:45:06 +0000
35+++ account_vat_registries_webkit/report/__init__.py 2013-04-11 17:12:34 +0000
36@@ -1,3 +1,21 @@
37-#from . import common_reports
38-#from . import webkit_parser_header_fix
39+# -*- coding: utf-8 -*-
40+##############################################################################
41+#
42+# Copyright (C) 2013 Associazione OpenERP Italia
43+# (<http://www.openerp-italia.org>).
44+#
45+# This program is free software: you can redistribute it and/or modify
46+# it under the terms of the GNU Affero General Public License as
47+# published by the Free Software Foundation, either version 3 of the
48+# License, or (at your option) any later version.
49+#
50+# This program is distributed in the hope that it will be useful,
51+# but WITHOUT ANY WARRANTY; without even the implied warranty of
52+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53+# GNU Affero General Public License for more details.
54+#
55+# You should have received a copy of the GNU Affero General Public License
56+# along with this program. If not, see <http://www.gnu.org/licenses/>.
57+#
58+##############################################################################
59 from . import vat_registries
60
61=== modified file 'account_vat_registries_webkit/report/templates/account_report_vat_registries.mako'
62--- account_vat_registries_webkit/report/templates/account_report_vat_registries.mako 2013-04-08 21:43:38 +0000
63+++ account_vat_registries_webkit/report/templates/account_report_vat_registries.mako 2013-04-11 17:12:34 +0000
64@@ -82,7 +82,7 @@
65 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.registration_date, date=True)|entity}</div>
66 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.date_invoice, date=True)|entity}</div>
67 <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.number}</div>
68- <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.supplier_invoice_number}</div>
69+ <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.supplier_invoice_number or line.invoice_id.number or ''}</div>
70 <div class="act_as_cell " style="width: 60px;">${ line.invoice_id.partner_id.name}</div>
71 %if line.base_code_id.id:
72 <div class="act_as_cell amount" style="width: 30px;">${ line.base_amount *-1}</div>
73
74=== modified file 'account_vat_registries_webkit/report/vat_registries.py'
75--- account_vat_registries_webkit/report/vat_registries.py 2013-04-04 22:40:47 +0000
76+++ account_vat_registries_webkit/report/vat_registries.py 2013-04-11 17:12:34 +0000
77@@ -1,8 +1,10 @@
78-# -*- encoding: utf-8 -*-
79+# -*- coding: utf-8 -*-
80 ##############################################################################
81 #
82 # Author: Guewen Baconnier
83 # Copyright Camptocamp SA 2011
84+# Copyright (C) 2013 Associazione OpenERP Italia
85+# (<http://www.openerp-italia.org>).
86 #
87 # This program is free software: you can redistribute it and/or modify
88 # it under the terms of the GNU Affero General Public License as
89@@ -119,7 +121,7 @@
90 obj_tax = self.pool.get('account.invoice.tax')
91 invoice_state = ['open','paid']
92
93- self.cr.execute('SELECT atc.name, SUM (ait.base_amount) AS base_totals, SUM(ait.tax_amount) AS tax_totals, ait.tax_code_id , ait.base_code_id FROM account_invoice_tax ait, account_invoice ai, account_tax_code atc WHERE atc.id=ait.tax_code_id AND ai.id=ait.invoice_id AND ai.state IN %s AND ai.period_id IN %s AND ai.journal_id IN %s GROUP BY atc.name, ait.base_code_id, ait.tax_code_id', (tuple(invoice_state), tuple(period_id), tuple(journal_id) ))
94+ self.cr.execute('SELECT atc.name, SUM (ait.base_amount) AS base_totals, SUM(ait.tax_amount) AS tax_totals, ait.tax_code_id , ait.base_code_id FROM account_invoice_tax ait, account_invoice ai, account_tax_code atc WHERE atc.id=ait.tax_code_id AND ai.id=ait.invoice_id AND ai.state IN %s AND ai.period_id IN %s AND ai.journal_id IN %s GROUP BY atc.name, ait.base_code_id, ait.tax_code_id ORDER BY atc.name', (tuple(invoice_state), tuple(period_id), tuple(journal_id) ))
95 #ids = map(lambda x: x[0], self.cr.fetchall())
96 #return obj_mline_t.browse(self.cr, self.uid, ids)
97 return self.cr.fetchall()
98
99=== modified file 'account_vat_registries_webkit/wizard/__init__.py'
100--- account_vat_registries_webkit/wizard/__init__.py 2013-03-28 23:45:06 +0000
101+++ account_vat_registries_webkit/wizard/__init__.py 2013-04-11 17:12:34 +0000
102@@ -1,7 +1,9 @@
103-# -*- encoding: utf-8 -*-
104+# -*- coding: utf-8 -*-
105 ##############################################################################
106 #
107 # (c)2013 Sergio Corato
108+# Copyright (C) 2013 Associazione OpenERP Italia
109+# (<http://www.openerp-italia.org>).
110 #
111 # This program is free software: you can redistribute it and/or modify
112 # it under the terms of the GNU Affero General Public License as
113
114=== modified file 'account_vat_registries_webkit/wizard/vatregistries_wizard.py'
115--- account_vat_registries_webkit/wizard/vatregistries_wizard.py 2013-04-04 22:40:47 +0000
116+++ account_vat_registries_webkit/wizard/vatregistries_wizard.py 2013-04-11 17:12:34 +0000
117@@ -1,8 +1,10 @@
118-# -*- encoding: utf-8 -*-
119+# -*- coding: utf-8 -*-
120 ##############################################################################
121 #
122 # Author: Guewen Baconnier
123 # Copyright Camptocamp SA 2011
124+# Copyright (C) 2013 Associazione OpenERP Italia
125+# (<http://www.openerp-italia.org>).
126 #
127 # This program is free software: you can redistribute it and/or modify
128 # it under the terms of the GNU Affero General Public License as

Subscribers

People subscribed via source and target branches