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
=== modified file 'account_vat_registries_webkit/__init__.py'
--- account_vat_registries_webkit/__init__.py 2013-03-28 23:45:06 +0000
+++ account_vat_registries_webkit/__init__.py 2013-04-11 17:12:34 +0000
@@ -1,7 +1,9 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Author: Nicolas Bessi. Copyright Camptocamp SA4# Author: Nicolas Bessi. Copyright Camptocamp SA
5# Copyright (C) 2013 Associazione OpenERP Italia
6# (<http://www.openerp-italia.org>).
5#7#
6# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as9# it under the terms of the GNU Affero General Public License as
810
=== modified file 'account_vat_registries_webkit/__openerp__.py'
--- account_vat_registries_webkit/__openerp__.py 2013-04-04 22:40:47 +0000
+++ account_vat_registries_webkit/__openerp__.py 2013-04-11 17:12:34 +0000
@@ -1,9 +1,11 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Authors: Nicolas Bessi, Guewen Baconnier4# Authors: Nicolas Bessi, Guewen Baconnier
5# Copyright Camptocamp SA 20115# Copyright Camptocamp SA 2011
6# (c) 2013 Sergio Corato6# (c) 2013 Sergio Corato
7# Copyright (C) 2013 Associazione OpenERP Italia
8# (<http://www.openerp-italia.org>).
7#9#
8# This program is free software: you can redistribute it and/or modify10# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as11# it under the terms of the GNU Affero General Public License as
1012
=== modified file 'account_vat_registries_webkit/report/__init__.py'
--- account_vat_registries_webkit/report/__init__.py 2013-03-28 23:45:06 +0000
+++ account_vat_registries_webkit/report/__init__.py 2013-04-11 17:12:34 +0000
@@ -1,3 +1,21 @@
1#from . import common_reports1# -*- coding: utf-8 -*-
2#from . import webkit_parser_header_fix2##############################################################################
3#
4# Copyright (C) 2013 Associazione OpenERP Italia
5# (<http://www.openerp-italia.org>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
3from . import vat_registries21from . import vat_registries
422
=== modified file 'account_vat_registries_webkit/report/templates/account_report_vat_registries.mako'
--- account_vat_registries_webkit/report/templates/account_report_vat_registries.mako 2013-04-08 21:43:38 +0000
+++ account_vat_registries_webkit/report/templates/account_report_vat_registries.mako 2013-04-11 17:12:34 +0000
@@ -82,7 +82,7 @@
82 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.registration_date, date=True)|entity}</div>82 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.registration_date, date=True)|entity}</div>
83 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.date_invoice, date=True)|entity}</div>83 <div class="act_as_cell " style="width: 30px;">${formatLang(line.invoice_id.date_invoice, date=True)|entity}</div>
84 <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.number}</div>84 <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.number}</div>
85 <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.supplier_invoice_number}</div>85 <div class="act_as_cell " style="width: 50px;">${ line.invoice_id.supplier_invoice_number or line.invoice_id.number or ''}</div>
86 <div class="act_as_cell " style="width: 60px;">${ line.invoice_id.partner_id.name}</div>86 <div class="act_as_cell " style="width: 60px;">${ line.invoice_id.partner_id.name}</div>
87%if line.base_code_id.id:87%if line.base_code_id.id:
88 <div class="act_as_cell amount" style="width: 30px;">${ line.base_amount *-1}</div>88 <div class="act_as_cell amount" style="width: 30px;">${ line.base_amount *-1}</div>
8989
=== modified file 'account_vat_registries_webkit/report/vat_registries.py'
--- account_vat_registries_webkit/report/vat_registries.py 2013-04-04 22:40:47 +0000
+++ account_vat_registries_webkit/report/vat_registries.py 2013-04-11 17:12:34 +0000
@@ -1,8 +1,10 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Author: Guewen Baconnier4# Author: Guewen Baconnier
5# Copyright Camptocamp SA 20115# Copyright Camptocamp SA 2011
6# Copyright (C) 2013 Associazione OpenERP Italia
7# (<http://www.openerp-italia.org>).
6#8#
7# This program is free software: you can redistribute it and/or modify9# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as10# it under the terms of the GNU Affero General Public License as
@@ -119,7 +121,7 @@
119 obj_tax = self.pool.get('account.invoice.tax')121 obj_tax = self.pool.get('account.invoice.tax')
120 invoice_state = ['open','paid']122 invoice_state = ['open','paid']
121123
122 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) ))124 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) ))
123 #ids = map(lambda x: x[0], self.cr.fetchall())125 #ids = map(lambda x: x[0], self.cr.fetchall())
124 #return obj_mline_t.browse(self.cr, self.uid, ids)126 #return obj_mline_t.browse(self.cr, self.uid, ids)
125 return self.cr.fetchall()127 return self.cr.fetchall()
126128
=== modified file 'account_vat_registries_webkit/wizard/__init__.py'
--- account_vat_registries_webkit/wizard/__init__.py 2013-03-28 23:45:06 +0000
+++ account_vat_registries_webkit/wizard/__init__.py 2013-04-11 17:12:34 +0000
@@ -1,7 +1,9 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# (c)2013 Sergio Corato4# (c)2013 Sergio Corato
5# Copyright (C) 2013 Associazione OpenERP Italia
6# (<http://www.openerp-italia.org>).
5#7#
6# This program is free software: you can redistribute it and/or modify8# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as9# it under the terms of the GNU Affero General Public License as
810
=== modified file 'account_vat_registries_webkit/wizard/vatregistries_wizard.py'
--- account_vat_registries_webkit/wizard/vatregistries_wizard.py 2013-04-04 22:40:47 +0000
+++ account_vat_registries_webkit/wizard/vatregistries_wizard.py 2013-04-11 17:12:34 +0000
@@ -1,8 +1,10 @@
1# -*- encoding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# Author: Guewen Baconnier4# Author: Guewen Baconnier
5# Copyright Camptocamp SA 20115# Copyright Camptocamp SA 2011
6# Copyright (C) 2013 Associazione OpenERP Italia
7# (<http://www.openerp-italia.org>).
6#8#
7# This program is free software: you can redistribute it and/or modify9# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as10# it under the terms of the GNU Affero General Public License as

Subscribers

People subscribed via source and target branches