Merge lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
- adding_l10n_it_vat_registries
- Merge into italian-addons-7.0
Proposed by
Sergio Corato
Status: | Merged |
---|---|
Merged at revision: | 201 |
Proposed branch: | lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries |
Merge into: | lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0 |
Diff against target: |
1845 lines (+1762/-0) 15 files modified
l10n_it_vat_registries/AUTHORS.txt (+2/-0) l10n_it_vat_registries/__init__.py (+24/-0) l10n_it_vat_registries/__openerp__.py (+42/-0) l10n_it_vat_registries/account.py (+48/-0) l10n_it_vat_registries/account_view.xml (+17/-0) l10n_it_vat_registries/i18n/it.po (+190/-0) l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot (+185/-0) l10n_it_vat_registries/invoice.py (+356/-0) l10n_it_vat_registries/reports.xml (+268/-0) l10n_it_vat_registries/templates/registro_iva_acquisti.mako (+169/-0) l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako (+127/-0) l10n_it_vat_registries/templates/registro_iva_vendite.mako (+158/-0) l10n_it_vat_registries/wizard/__init__.py (+22/-0) l10n_it_vat_registries/wizard/print_registro_iva.py (+113/-0) l10n_it_vat_registries/wizard/print_registro_iva.xml (+41/-0) |
To merge this branch: | bzr merge lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini | Approve | ||
Review via email: mp+142417@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 196. By Sergio Corato
-
[REMOVED] All rights reserved
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory 'l10n_it_vat_registries' | |||
2 | === added file 'l10n_it_vat_registries/AUTHORS.txt' | |||
3 | --- l10n_it_vat_registries/AUTHORS.txt 1970-01-01 00:00:00 +0000 | |||
4 | +++ l10n_it_vat_registries/AUTHORS.txt 2013-01-29 22:10:26 +0000 | |||
5 | @@ -0,0 +1,2 @@ | |||
6 | 1 | Lorenzo Battistini <lorenzo.battistini@domsense.com> | ||
7 | 2 | Ingrid Barcaro | ||
8 | 0 | 3 | ||
9 | === added file 'l10n_it_vat_registries/__init__.py' | |||
10 | --- l10n_it_vat_registries/__init__.py 1970-01-01 00:00:00 +0000 | |||
11 | +++ l10n_it_vat_registries/__init__.py 2013-01-29 22:10:26 +0000 | |||
12 | @@ -0,0 +1,24 @@ | |||
13 | 1 | # -*- coding: utf-8 -*- | ||
14 | 2 | ############################################################################## | ||
15 | 3 | # | ||
16 | 4 | # Copyright (C) 2011 Associazione OpenERP Italia | ||
17 | 5 | # (<http://www.openerp-italia.org>). | ||
18 | 6 | # | ||
19 | 7 | # This program is free software: you can redistribute it and/or modify | ||
20 | 8 | # it under the terms of the GNU Affero General Public License as published | ||
21 | 9 | # by the Free Software Foundation, either version 3 of the License, or | ||
22 | 10 | # (at your option) any later version. | ||
23 | 11 | # | ||
24 | 12 | # This program is distributed in the hope that it will be useful, | ||
25 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
26 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
27 | 15 | # GNU General Public License for more details. | ||
28 | 16 | # | ||
29 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
30 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
31 | 19 | # | ||
32 | 20 | ############################################################################## | ||
33 | 21 | |||
34 | 22 | import wizard | ||
35 | 23 | import account | ||
36 | 24 | import invoice | ||
37 | 0 | 25 | ||
38 | === added file 'l10n_it_vat_registries/__openerp__.py' | |||
39 | --- l10n_it_vat_registries/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
40 | +++ l10n_it_vat_registries/__openerp__.py 2013-01-29 22:10:26 +0000 | |||
41 | @@ -0,0 +1,42 @@ | |||
42 | 1 | # -*- coding: utf-8 -*- | ||
43 | 2 | ############################################################################## | ||
44 | 3 | # | ||
45 | 4 | # Copyright (C) 2011-2012 Associazione OpenERP Italia | ||
46 | 5 | # (<http://www.openerp-italia.org>). | ||
47 | 6 | # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) | ||
48 | 7 | # Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) | ||
49 | 8 | # | ||
50 | 9 | # This program is free software: you can redistribute it and/or modify | ||
51 | 10 | # it under the terms of the GNU Affero General Public License as published | ||
52 | 11 | # by the Free Software Foundation, either version 3 of the License, or | ||
53 | 12 | # (at your option) any later version. | ||
54 | 13 | # | ||
55 | 14 | # This program is distributed in the hope that it will be useful, | ||
56 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
57 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
58 | 17 | # GNU General Public License for more details. | ||
59 | 18 | # | ||
60 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
61 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
62 | 21 | # | ||
63 | 22 | ############################################################################## | ||
64 | 23 | { | ||
65 | 24 | 'name': 'Italian Localisation - VAT Registries', | ||
66 | 25 | 'version': '0.1', | ||
67 | 26 | 'category': 'Localisation/Italy', | ||
68 | 27 | 'description': """Accounting reports for Italian localization - VAT Registries\nhttp://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal""", | ||
69 | 28 | 'author': 'OpenERP Italian Community', | ||
70 | 29 | 'website': 'http://www.openerp-italia.org', | ||
71 | 30 | 'license': 'AGPL-3', | ||
72 | 31 | "depends" : ['report_webkit', 'l10n_it_account', 'l10n_it_partially_deductible_vat'], | ||
73 | 32 | "init_xml" : [ | ||
74 | 33 | ], | ||
75 | 34 | "update_xml" : [ | ||
76 | 35 | 'reports.xml', | ||
77 | 36 | 'account_view.xml', | ||
78 | 37 | 'wizard/print_registro_iva.xml', | ||
79 | 38 | ], | ||
80 | 39 | "demo_xml" : [], | ||
81 | 40 | "active": False, | ||
82 | 41 | "installable": True | ||
83 | 42 | } | ||
84 | 0 | 43 | ||
85 | === added file 'l10n_it_vat_registries/account.py' | |||
86 | --- l10n_it_vat_registries/account.py 1970-01-01 00:00:00 +0000 | |||
87 | +++ l10n_it_vat_registries/account.py 2013-01-29 22:10:26 +0000 | |||
88 | @@ -0,0 +1,48 @@ | |||
89 | 1 | # -*- coding: utf-8 -*- | ||
90 | 2 | ############################################################################## | ||
91 | 3 | # | ||
92 | 4 | # Copyright (C) 2011-2012 Associazione OpenERP Italia | ||
93 | 5 | # (<http://www.openerp-italia.org>). | ||
94 | 6 | # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) | ||
95 | 7 | # Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) | ||
96 | 8 | # | ||
97 | 9 | # This program is free software: you can redistribute it and/or modify | ||
98 | 10 | # it under the terms of the GNU Affero General Public License as published | ||
99 | 11 | # by the Free Software Foundation, either version 3 of the License, or | ||
100 | 12 | # (at your option) any later version. | ||
101 | 13 | # | ||
102 | 14 | # This program is distributed in the hope that it will be useful, | ||
103 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
104 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
105 | 17 | # GNU Affero General Public License for more details. | ||
106 | 18 | # | ||
107 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
108 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
109 | 21 | # | ||
110 | 22 | ############################################################################## | ||
111 | 23 | |||
112 | 24 | from osv import fields, osv | ||
113 | 25 | from tools.translate import _ | ||
114 | 26 | |||
115 | 27 | |||
116 | 28 | class account_tax(osv.osv): | ||
117 | 29 | |||
118 | 30 | _inherit = 'account.tax' | ||
119 | 31 | _columns = { | ||
120 | 32 | 'exclude_from_registries': fields.boolean( | ||
121 | 33 | 'Exclude from VAT registries'), | ||
122 | 34 | 'base_tax_ids': fields.one2many( | ||
123 | 35 | 'account.tax', 'base_code_id', 'Base Taxes'), # serve ancora? | ||
124 | 36 | } | ||
125 | 37 | _sql_constraints = [ | ||
126 | 38 | ('name_uniq', 'UNIQUE(name)', 'The tax name must be unique!'), | ||
127 | 39 | ] | ||
128 | 40 | |||
129 | 41 | def get_account_tax(self, inv_tax): | ||
130 | 42 | if inv_tax.tax_code_id: | ||
131 | 43 | return self.get_account_tax_by_tax_code(inv_tax.tax_code_id) | ||
132 | 44 | if inv_tax.base_code_id: | ||
133 | 45 | return self.get_account_tax_by_base_code(inv_tax.base_code_id) | ||
134 | 46 | raise osv.except_osv(_('Error'), | ||
135 | 47 | _('No tax codes for invoice tax %s') % str(inv_tax.name)) | ||
136 | 48 | |||
137 | 0 | 49 | ||
138 | === added file 'l10n_it_vat_registries/account_view.xml' | |||
139 | --- l10n_it_vat_registries/account_view.xml 1970-01-01 00:00:00 +0000 | |||
140 | +++ l10n_it_vat_registries/account_view.xml 2013-01-29 22:10:26 +0000 | |||
141 | @@ -0,0 +1,17 @@ | |||
142 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
143 | 2 | <openerp> | ||
144 | 3 | <data> | ||
145 | 4 | |||
146 | 5 | <record id="view_tax_form" model="ir.ui.view"> | ||
147 | 6 | <field name="name">account.tax.form</field> | ||
148 | 7 | <field name="model">account.tax</field> | ||
149 | 8 | <field name="type">form</field> | ||
150 | 9 | <field name="inherit_id" ref="account.view_tax_form"></field> | ||
151 | 10 | <field name="arch" type="xml"> | ||
152 | 11 | <field name="active" position="after"> | ||
153 | 12 | <field name="exclude_from_registries"/> | ||
154 | 13 | </field> | ||
155 | 14 | </field> | ||
156 | 15 | </record> | ||
157 | 16 | </data> | ||
158 | 17 | </openerp> | ||
159 | 0 | 18 | ||
160 | === added directory 'l10n_it_vat_registries/i18n' | |||
161 | === added file 'l10n_it_vat_registries/i18n/it.po' | |||
162 | --- l10n_it_vat_registries/i18n/it.po 1970-01-01 00:00:00 +0000 | |||
163 | +++ l10n_it_vat_registries/i18n/it.po 2013-01-29 22:10:26 +0000 | |||
164 | @@ -0,0 +1,190 @@ | |||
165 | 1 | # Translation of OpenERP Server. | ||
166 | 2 | # This file contains the translation of the following modules: | ||
167 | 3 | # * l10n_it_vat_registries | ||
168 | 4 | # | ||
169 | 5 | msgid "" | ||
170 | 6 | msgstr "" | ||
171 | 7 | "Project-Id-Version: OpenERP Server 6.0.3\n" | ||
172 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | ||
173 | 9 | "POT-Creation-Date: 2011-11-30 16:28+0000\n" | ||
174 | 10 | "PO-Revision-Date: 2011-11-30 17:33+0100\n" | ||
175 | 11 | "Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>\n" | ||
176 | 12 | "Language-Team: \n" | ||
177 | 13 | "MIME-Version: 1.0\n" | ||
178 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
179 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
180 | 16 | "Plural-Forms: \n" | ||
181 | 17 | |||
182 | 18 | #. module: l10n_it_vat_registries | ||
183 | 19 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:81 | ||
184 | 20 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:85 | ||
185 | 21 | #, python-format | ||
186 | 22 | msgid "Taxes %s have different rates" | ||
187 | 23 | msgstr "Taxes %s have different rates" | ||
188 | 24 | |||
189 | 25 | #. module: l10n_it_vat_registries | ||
190 | 26 | #: code:addons/l10n_it_vat_registries/invoice.py:41 | ||
191 | 27 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:81 | ||
192 | 28 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:85 | ||
193 | 29 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:90 | ||
194 | 30 | #, python-format | ||
195 | 31 | msgid "Error" | ||
196 | 32 | msgstr "Error" | ||
197 | 33 | |||
198 | 34 | #. module: l10n_it_vat_registries | ||
199 | 35 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_vendite_report_id | ||
200 | 36 | msgid "Customer Invoices VAT Registry" | ||
201 | 37 | msgstr "Registro IVA Fatture Emesse" | ||
202 | 38 | |||
203 | 39 | #. module: l10n_it_vat_registries | ||
204 | 40 | #: model:ir.model,name:l10n_it_vat_registries.model_wizard_registro_iva | ||
205 | 41 | msgid "wizard.registro.iva" | ||
206 | 42 | msgstr "wizard.registro.iva" | ||
207 | 43 | |||
208 | 44 | #. module: l10n_it_vat_registries | ||
209 | 45 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:90 | ||
210 | 46 | #, python-format | ||
211 | 47 | msgid "Wrong tax configuration for tax code %s" | ||
212 | 48 | msgstr "Configurazione sbagliata dell'imposta per il conto imposta %s" | ||
213 | 49 | |||
214 | 50 | #. module: l10n_it_vat_registries | ||
215 | 51 | #: view:wizard.registro.iva:0 | ||
216 | 52 | msgid "Print" | ||
217 | 53 | msgstr "Stampa" | ||
218 | 54 | |||
219 | 55 | #. module: l10n_it_vat_registries | ||
220 | 56 | #: code:addons/l10n_it_vat_registries/invoice.py:119 | ||
221 | 57 | #: code:addons/l10n_it_vat_registries/invoice.py:191 | ||
222 | 58 | #: code:addons/l10n_it_vat_registries/invoice.py:221 | ||
223 | 59 | #, python-format | ||
224 | 60 | msgid "The tax %s is excluded from registries" | ||
225 | 61 | msgstr "L'imposta %s è esclusa dai registri" | ||
226 | 62 | |||
227 | 63 | #. module: l10n_it_vat_registries | ||
228 | 64 | #: field:wizard.registro.iva,type:0 | ||
229 | 65 | msgid "Type" | ||
230 | 66 | msgstr "Tipo" | ||
231 | 67 | |||
232 | 68 | #. module: l10n_it_vat_registries | ||
233 | 69 | #: selection:wizard.registro.iva,type:0 | ||
234 | 70 | msgid "Supplier Invoices" | ||
235 | 71 | msgstr "Fatture ricevute" | ||
236 | 72 | |||
237 | 73 | #. module: l10n_it_vat_registries | ||
238 | 74 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_acquisti_report_id | ||
239 | 75 | msgid "Supplier Invoices VAT Registry" | ||
240 | 76 | msgstr "Registro IVA Fatture Ricevute" | ||
241 | 77 | |||
242 | 78 | #. module: l10n_it_vat_registries | ||
243 | 79 | #: model:ir.actions.act_window,name:l10n_it_vat_registries.action_registro_iva | ||
244 | 80 | msgid "VAT Registry" | ||
245 | 81 | msgstr "Registro IVA" | ||
246 | 82 | |||
247 | 83 | #. module: l10n_it_vat_registries | ||
248 | 84 | #: code:addons/l10n_it_vat_registries/invoice.py:263 | ||
249 | 85 | #, python-format | ||
250 | 86 | msgid "The tax %s has no tax codes" | ||
251 | 87 | msgstr "L'imposta %s non ha codici IVA" | ||
252 | 88 | |||
253 | 89 | #. module: l10n_it_vat_registries | ||
254 | 90 | #: field:account.tax,base_tax_ids:0 | ||
255 | 91 | msgid "Base Taxes" | ||
256 | 92 | msgstr "Imposte dell'imponibile" | ||
257 | 93 | |||
258 | 94 | #. module: l10n_it_vat_registries | ||
259 | 95 | #: model:ir.module.module,description:l10n_it_vat_registries.module_meta_information | ||
260 | 96 | msgid "" | ||
261 | 97 | "Accounting reports for Italian localization - VAT Registries\n" | ||
262 | 98 | "http://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal" | ||
263 | 99 | msgstr "" | ||
264 | 100 | "Accounting reports for Italian localization - VAT Registries\n" | ||
265 | 101 | "http://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal" | ||
266 | 102 | |||
267 | 103 | #. module: l10n_it_vat_registries | ||
268 | 104 | #: view:wizard.registro.iva:0 | ||
269 | 105 | msgid "Tax Journal" | ||
270 | 106 | msgstr "Registro IVA" | ||
271 | 107 | |||
272 | 108 | #. module: l10n_it_vat_registries | ||
273 | 109 | #: field:wizard.registro.iva,date_to:0 | ||
274 | 110 | msgid "To date" | ||
275 | 111 | msgstr "Alla data" | ||
276 | 112 | |||
277 | 113 | #. module: l10n_it_vat_registries | ||
278 | 114 | #: view:wizard.registro.iva:0 | ||
279 | 115 | #: field:wizard.registro.iva,journal_ids:0 | ||
280 | 116 | msgid "Journals" | ||
281 | 117 | msgstr "Sezionali" | ||
282 | 118 | |||
283 | 119 | #. module: l10n_it_vat_registries | ||
284 | 120 | #: code:addons/l10n_it_vat_registries/invoice.py:42 | ||
285 | 121 | #, python-format | ||
286 | 122 | msgid "The move %s has different partner account type" | ||
287 | 123 | msgstr "La registrazione %s ha dei tipi di conto legati a partner incongruenti" | ||
288 | 124 | |||
289 | 125 | #. module: l10n_it_vat_registries | ||
290 | 126 | #: sql_constraint:account.tax:0 | ||
291 | 127 | msgid "The tax name must be unique!" | ||
292 | 128 | msgstr "Il nome dell'imposta deve essere unico" | ||
293 | 129 | |||
294 | 130 | #. module: l10n_it_vat_registries | ||
295 | 131 | #: help:wizard.registro.iva,journal_ids:0 | ||
296 | 132 | msgid "Select journals you want retrieve documents from" | ||
297 | 133 | msgstr "Selezionare i sezionali da cui si vuole ottenere i documenti" | ||
298 | 134 | |||
299 | 135 | #. module: l10n_it_vat_registries | ||
300 | 136 | #: selection:wizard.registro.iva,type:0 | ||
301 | 137 | msgid "Corrispettivi" | ||
302 | 138 | msgstr "Corrispettivi" | ||
303 | 139 | |||
304 | 140 | #. module: l10n_it_vat_registries | ||
305 | 141 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:96 | ||
306 | 142 | #, python-format | ||
307 | 143 | msgid "No documents found in the current selection" | ||
308 | 144 | msgstr "Nessun documento trovato per la selezione corrente" | ||
309 | 145 | |||
310 | 146 | #. module: l10n_it_vat_registries | ||
311 | 147 | #: model:ir.module.module,shortdesc:l10n_it_vat_registries.module_meta_information | ||
312 | 148 | msgid "Italian Localisation - VAT Registries" | ||
313 | 149 | msgstr "Localizzazione Italiana - Registri IVA" | ||
314 | 150 | |||
315 | 151 | #. module: l10n_it_vat_registries | ||
316 | 152 | #: model:ir.ui.menu,name:l10n_it_vat_registries.menu_registro_iva | ||
317 | 153 | msgid "VAT Registries" | ||
318 | 154 | msgstr "Registri IVA" | ||
319 | 155 | |||
320 | 156 | #. module: l10n_it_vat_registries | ||
321 | 157 | #: field:account.tax,exclude_from_registries:0 | ||
322 | 158 | msgid "Exclude from VAT registries" | ||
323 | 159 | msgstr "Escludi dai registri IVA" | ||
324 | 160 | |||
325 | 161 | #. module: l10n_it_vat_registries | ||
326 | 162 | #: selection:wizard.registro.iva,type:0 | ||
327 | 163 | msgid "Customer Invoices" | ||
328 | 164 | msgstr "Fatture emesse" | ||
329 | 165 | |||
330 | 166 | #. module: l10n_it_vat_registries | ||
331 | 167 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_corrispettivi_report_id | ||
332 | 168 | msgid "Corrispettivi VAT Registry" | ||
333 | 169 | msgstr "Registro IVA Corrispettivi" | ||
334 | 170 | |||
335 | 171 | #. module: l10n_it_vat_registries | ||
336 | 172 | #: field:wizard.registro.iva,date_from:0 | ||
337 | 173 | msgid "From date" | ||
338 | 174 | msgstr "Dalla data" | ||
339 | 175 | |||
340 | 176 | #. module: l10n_it_vat_registries | ||
341 | 177 | #: view:wizard.registro.iva:0 | ||
342 | 178 | msgid "Cancel" | ||
343 | 179 | msgstr "Annulla" | ||
344 | 180 | |||
345 | 181 | #. module: l10n_it_vat_registries | ||
346 | 182 | #: field:wizard.registro.iva,message:0 | ||
347 | 183 | msgid "Message" | ||
348 | 184 | msgstr "Messaggio" | ||
349 | 185 | |||
350 | 186 | #. module: l10n_it_vat_registries | ||
351 | 187 | #: model:ir.model,name:l10n_it_vat_registries.model_account_tax | ||
352 | 188 | msgid "account.tax" | ||
353 | 189 | msgstr "account.tax" | ||
354 | 190 | |||
355 | 0 | 191 | ||
356 | === added file 'l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot' | |||
357 | --- l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot 1970-01-01 00:00:00 +0000 | |||
358 | +++ l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot 2013-01-29 22:10:26 +0000 | |||
359 | @@ -0,0 +1,185 @@ | |||
360 | 1 | # Translation of OpenERP Server. | ||
361 | 2 | # This file contains the translation of the following modules: | ||
362 | 3 | # * l10n_it_vat_registries | ||
363 | 4 | # | ||
364 | 5 | msgid "" | ||
365 | 6 | msgstr "" | ||
366 | 7 | "Project-Id-Version: OpenERP Server 6.0.2\n" | ||
367 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | ||
368 | 9 | "POT-Creation-Date: 2011-08-19 21:40+0000\n" | ||
369 | 10 | "PO-Revision-Date: 2011-08-19 21:40+0000\n" | ||
370 | 11 | "Last-Translator: <>\n" | ||
371 | 12 | "Language-Team: \n" | ||
372 | 13 | "MIME-Version: 1.0\n" | ||
373 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
374 | 15 | "Content-Transfer-Encoding: \n" | ||
375 | 16 | "Plural-Forms: \n" | ||
376 | 17 | |||
377 | 18 | #. module: l10n_it_vat_registries | ||
378 | 19 | #: model:ir.module.module,description:l10n_it_vat_registries.module_meta_information | ||
379 | 20 | msgid "Accounting reports for Italian localization - VAT Registries" | ||
380 | 21 | msgstr "" | ||
381 | 22 | |||
382 | 23 | #. module: l10n_it_vat_registries | ||
383 | 24 | #: model:ir.model,name:l10n_it_vat_registries.model_account_tax_code | ||
384 | 25 | msgid "Tax Code" | ||
385 | 26 | msgstr "" | ||
386 | 27 | |||
387 | 28 | #. module: l10n_it_vat_registries | ||
388 | 29 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_vendite_report_id | ||
389 | 30 | msgid "Customer Invoices VAT Registry" | ||
390 | 31 | msgstr "" | ||
391 | 32 | |||
392 | 33 | #. module: l10n_it_vat_registries | ||
393 | 34 | #: model:ir.model,name:l10n_it_vat_registries.model_wizard_registro_iva | ||
394 | 35 | msgid "wizard.registro.iva" | ||
395 | 36 | msgstr "" | ||
396 | 37 | |||
397 | 38 | #. module: l10n_it_vat_registries | ||
398 | 39 | #: view:wizard.registro.iva:0 | ||
399 | 40 | msgid "Print" | ||
400 | 41 | msgstr "" | ||
401 | 42 | |||
402 | 43 | #. module: l10n_it_vat_registries | ||
403 | 44 | #: field:wizard.registro.iva,type:0 | ||
404 | 45 | msgid "Type" | ||
405 | 46 | msgstr "" | ||
406 | 47 | |||
407 | 48 | #. module: l10n_it_vat_registries | ||
408 | 49 | #: selection:wizard.registro.iva,type:0 | ||
409 | 50 | msgid "Supplier Invoices" | ||
410 | 51 | msgstr "" | ||
411 | 52 | |||
412 | 53 | #. module: l10n_it_vat_registries | ||
413 | 54 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_acquisti_report_id | ||
414 | 55 | msgid "Supplier Invoices VAT Registry" | ||
415 | 56 | msgstr "" | ||
416 | 57 | |||
417 | 58 | #. module: l10n_it_vat_registries | ||
418 | 59 | #: model:ir.actions.act_window,name:l10n_it_vat_registries.action_registro_iva | ||
419 | 60 | msgid "VAT Registry" | ||
420 | 61 | msgstr "" | ||
421 | 62 | |||
422 | 63 | #. module: l10n_it_vat_registries | ||
423 | 64 | #: code:addons/l10n_it_vat_registries/invoice.py:116 | ||
424 | 65 | #, python-format | ||
425 | 66 | msgid "The tax %s has no tax codes" | ||
426 | 67 | msgstr "" | ||
427 | 68 | |||
428 | 69 | #. module: l10n_it_vat_registries | ||
429 | 70 | #: field:account.tax,base_tax_ids:0 | ||
430 | 71 | #: field:account.tax.code,base_tax_ids:0 | ||
431 | 72 | msgid "Base Taxes" | ||
432 | 73 | msgstr "" | ||
433 | 74 | |||
434 | 75 | #. module: l10n_it_vat_registries | ||
435 | 76 | #: code:addons/l10n_it_vat_registries/invoice.py:70 | ||
436 | 77 | #: code:addons/l10n_it_vat_registries/invoice.py:91 | ||
437 | 78 | #, python-format | ||
438 | 79 | msgid "The tax %s is excluded from registries" | ||
439 | 80 | msgstr "" | ||
440 | 81 | |||
441 | 82 | #. module: l10n_it_vat_registries | ||
442 | 83 | #: view:wizard.registro.iva:0 | ||
443 | 84 | msgid "Tax Journal" | ||
444 | 85 | msgstr "" | ||
445 | 86 | |||
446 | 87 | #. module: l10n_it_vat_registries | ||
447 | 88 | #: field:wizard.registro.iva,date_to:0 | ||
448 | 89 | msgid "To date" | ||
449 | 90 | msgstr "" | ||
450 | 91 | |||
451 | 92 | #. module: l10n_it_vat_registries | ||
452 | 93 | #: view:wizard.registro.iva:0 | ||
453 | 94 | #: field:wizard.registro.iva,journal_ids:0 | ||
454 | 95 | msgid "Journals" | ||
455 | 96 | msgstr "" | ||
456 | 97 | |||
457 | 98 | #. module: l10n_it_vat_registries | ||
458 | 99 | #: sql_constraint:account.tax:0 | ||
459 | 100 | msgid "The tax name must be unique!" | ||
460 | 101 | msgstr "" | ||
461 | 102 | |||
462 | 103 | #. module: l10n_it_vat_registries | ||
463 | 104 | #: help:wizard.registro.iva,journal_ids:0 | ||
464 | 105 | msgid "Select journals you want retrieve documents from" | ||
465 | 106 | msgstr "" | ||
466 | 107 | |||
467 | 108 | #. module: l10n_it_vat_registries | ||
468 | 109 | #: field:account.tax.code,tax_ids:0 | ||
469 | 110 | msgid "Taxes" | ||
470 | 111 | msgstr "" | ||
471 | 112 | |||
472 | 113 | #. module: l10n_it_vat_registries | ||
473 | 114 | #: selection:wizard.registro.iva,type:0 | ||
474 | 115 | msgid "Corrispettivi" | ||
475 | 116 | msgstr "" | ||
476 | 117 | |||
477 | 118 | #. module: l10n_it_vat_registries | ||
478 | 119 | #: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:94 | ||
479 | 120 | #, python-format | ||
480 | 121 | msgid "No documents found in the current selection" | ||
481 | 122 | msgstr "" | ||
482 | 123 | |||
483 | 124 | #. module: l10n_it_vat_registries | ||
484 | 125 | #: model:ir.module.module,shortdesc:l10n_it_vat_registries.module_meta_information | ||
485 | 126 | msgid "Italian Localisation - VAT Registries" | ||
486 | 127 | msgstr "" | ||
487 | 128 | |||
488 | 129 | #. module: l10n_it_vat_registries | ||
489 | 130 | #: model:ir.ui.menu,name:l10n_it_vat_registries.menu_registro_iva | ||
490 | 131 | msgid "VAT Registries" | ||
491 | 132 | msgstr "" | ||
492 | 133 | |||
493 | 134 | #. module: l10n_it_vat_registries | ||
494 | 135 | #: code:addons/l10n_it_vat_registries/invoice.py:52 | ||
495 | 136 | #, python-format | ||
496 | 137 | msgid "Too many taxes with name %s" | ||
497 | 138 | msgstr "" | ||
498 | 139 | |||
499 | 140 | #. module: l10n_it_vat_registries | ||
500 | 141 | #: constraint:account.tax.code:0 | ||
501 | 142 | msgid "Error ! You can not create recursive accounts." | ||
502 | 143 | msgstr "" | ||
503 | 144 | |||
504 | 145 | #. module: l10n_it_vat_registries | ||
505 | 146 | #: field:account.tax,exclude_from_registries:0 | ||
506 | 147 | msgid "Exclude from VAT registries" | ||
507 | 148 | msgstr "" | ||
508 | 149 | |||
509 | 150 | #. module: l10n_it_vat_registries | ||
510 | 151 | #: selection:wizard.registro.iva,type:0 | ||
511 | 152 | msgid "Customer Invoices" | ||
512 | 153 | msgstr "" | ||
513 | 154 | |||
514 | 155 | #. module: l10n_it_vat_registries | ||
515 | 156 | #: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_corrispettivi_report_id | ||
516 | 157 | msgid "Corrispettivi VAT Registry" | ||
517 | 158 | msgstr "" | ||
518 | 159 | |||
519 | 160 | #. module: l10n_it_vat_registries | ||
520 | 161 | #: field:wizard.registro.iva,date_from:0 | ||
521 | 162 | msgid "From date" | ||
522 | 163 | msgstr "" | ||
523 | 164 | |||
524 | 165 | #. module: l10n_it_vat_registries | ||
525 | 166 | #: code:addons/l10n_it_vat_registries/invoice.py:50 | ||
526 | 167 | #, python-format | ||
527 | 168 | msgid "The tax %s does not exist" | ||
528 | 169 | msgstr "" | ||
529 | 170 | |||
530 | 171 | #. module: l10n_it_vat_registries | ||
531 | 172 | #: view:wizard.registro.iva:0 | ||
532 | 173 | msgid "Cancel" | ||
533 | 174 | msgstr "" | ||
534 | 175 | |||
535 | 176 | #. module: l10n_it_vat_registries | ||
536 | 177 | #: field:wizard.registro.iva,message:0 | ||
537 | 178 | msgid "Message" | ||
538 | 179 | msgstr "" | ||
539 | 180 | |||
540 | 181 | #. module: l10n_it_vat_registries | ||
541 | 182 | #: model:ir.model,name:l10n_it_vat_registries.model_account_tax | ||
542 | 183 | msgid "account.tax" | ||
543 | 184 | msgstr "" | ||
544 | 185 | |||
545 | 0 | 186 | ||
546 | === added directory 'l10n_it_vat_registries/images' | |||
547 | === added file 'l10n_it_vat_registries/images/registro-iva-corrispettivi.png' | |||
548 | 1 | Binary files l10n_it_vat_registries/images/registro-iva-corrispettivi.png 1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-corrispettivi.png 2013-01-29 22:10:26 +0000 differ | 187 | Binary files l10n_it_vat_registries/images/registro-iva-corrispettivi.png 1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-corrispettivi.png 2013-01-29 22:10:26 +0000 differ |
549 | === added file 'l10n_it_vat_registries/images/registro-iva-fatture-emesse.png' | |||
550 | 2 | Binary files l10n_it_vat_registries/images/registro-iva-fatture-emesse.png 1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-fatture-emesse.png 2013-01-29 22:10:26 +0000 differ | 188 | Binary files l10n_it_vat_registries/images/registro-iva-fatture-emesse.png 1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-fatture-emesse.png 2013-01-29 22:10:26 +0000 differ |
551 | === added file 'l10n_it_vat_registries/invoice.py' | |||
552 | --- l10n_it_vat_registries/invoice.py 1970-01-01 00:00:00 +0000 | |||
553 | +++ l10n_it_vat_registries/invoice.py 2013-01-29 22:10:26 +0000 | |||
554 | @@ -0,0 +1,356 @@ | |||
555 | 1 | # -*- coding: utf-8 -*- | ||
556 | 2 | ############################################################################## | ||
557 | 3 | # | ||
558 | 4 | # Copyright (C) 2011 Associazione OpenERP Italia | ||
559 | 5 | # (<http://www.openerp-italia.org>). | ||
560 | 6 | # | ||
561 | 7 | # This program is free software: you can redistribute it and/or modify | ||
562 | 8 | # it under the terms of the GNU Affero General Public License as published | ||
563 | 9 | # by the Free Software Foundation, either version 3 of the License, or | ||
564 | 10 | # (at your option) any later version. | ||
565 | 11 | # | ||
566 | 12 | # This program is distributed in the hope that it will be useful, | ||
567 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
568 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
569 | 15 | # GNU Affero General Public License for more details. | ||
570 | 16 | # | ||
571 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
572 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
573 | 19 | # | ||
574 | 20 | ############################################################################## | ||
575 | 21 | |||
576 | 22 | import time | ||
577 | 23 | from report import report_sxw | ||
578 | 24 | from tools.translate import _ | ||
579 | 25 | from decimal import * | ||
580 | 26 | import netsvc | ||
581 | 27 | |||
582 | 28 | class Parser(report_sxw.rml_parse): | ||
583 | 29 | |||
584 | 30 | logger = netsvc.Logger() | ||
585 | 31 | |||
586 | 32 | def _get_partner_type(self, move_line): | ||
587 | 33 | partner_type = '' | ||
588 | 34 | for line in move_line.move_id.line_id: | ||
589 | 35 | if line.account_id.type == 'payable' or line.account_id.type == 'receivable': | ||
590 | 36 | if not partner_type: | ||
591 | 37 | partner_type = line.account_id.type | ||
592 | 38 | elif partner_type != line.account_id.type: | ||
593 | 39 | raise Exception( | ||
594 | 40 | _('The move %s has different partner account type') % move_line.move_id.name) | ||
595 | 41 | return partner_type | ||
596 | 42 | |||
597 | 43 | def _move_total(self, move_line): | ||
598 | 44 | partner_type = self._get_partner_type(move_line) | ||
599 | 45 | total = 0.0 | ||
600 | 46 | for line in move_line.move_id.line_id: | ||
601 | 47 | if line.account_id.type == partner_type: | ||
602 | 48 | total += (line.debit or line.credit) | ||
603 | 49 | return total | ||
604 | 50 | |||
605 | 51 | # Metto al tax code il segno dell'importo dell'imposta. | ||
606 | 52 | # Il tax code ha l'importo in valuta base, ma ha segno negativo per l'IVA a credito (da stampare positiva) | ||
607 | 53 | # e per le note di credito (da stampare negative) | ||
608 | 54 | def _get_amount_with_sign(self, tax_code_amount, amount): | ||
609 | 55 | return abs(tax_code_amount) * cmp(amount, 0) | ||
610 | 56 | |||
611 | 57 | def _is_refund(self, move_line): | ||
612 | 58 | if self._get_partner_type(move_line) == 'receivable' and move_line.debit > move_line.credit: | ||
613 | 59 | return True | ||
614 | 60 | if self._get_partner_type(move_line) == 'payable' and move_line.debit < move_line.credit: | ||
615 | 61 | return True | ||
616 | 62 | |||
617 | 63 | def _get_line_amount_with_sign(self, move_line): | ||
618 | 64 | if self._get_partner_type(move_line) == 'receivable': | ||
619 | 65 | return self._get_amount_with_sign(move_line.tax_amount, move_line.credit - move_line.debit) | ||
620 | 66 | if self._get_partner_type(move_line) == 'payable': | ||
621 | 67 | return self._get_amount_with_sign(move_line.tax_amount, move_line.debit - move_line.credit) | ||
622 | 68 | |||
623 | 69 | # in valuta base | ||
624 | 70 | def _get_invoice_amount_total(self, invoice): | ||
625 | 71 | total = 0.0 | ||
626 | 72 | for inv_tax in invoice.tax_line: | ||
627 | 73 | total += self._get_amount_with_sign(inv_tax.base_amount, inv_tax.base) \ | ||
628 | 74 | + self._get_amount_with_sign(inv_tax.tax_amount, inv_tax.amount) | ||
629 | 75 | return total | ||
630 | 76 | |||
631 | 77 | # in valuta base | ||
632 | 78 | def _get_invoice_amount_untaxed(self, invoice): | ||
633 | 79 | total = 0.0 | ||
634 | 80 | for inv_tax in invoice.tax_line: | ||
635 | 81 | total += self._get_amount_with_sign(inv_tax.base_amount, inv_tax.base) | ||
636 | 82 | return total | ||
637 | 83 | |||
638 | 84 | def _get_tax_lines(self, move): | ||
639 | 85 | res=[] | ||
640 | 86 | tax_obj = self.pool.get('account.tax') | ||
641 | 87 | cur_pool = self.pool.get('res.currency') | ||
642 | 88 | inv_pool = self.pool.get('account.invoice') | ||
643 | 89 | # index è usato per non ripetere la stampa dei dati fattura quando ci sono più codici IVA | ||
644 | 90 | index=0 | ||
645 | 91 | totale_iva = 0.0 | ||
646 | 92 | totale_iva_inded = 0.0 | ||
647 | 93 | invoice_amount_total = 0.0 | ||
648 | 94 | invoice_amount_untaxed = 0.0 | ||
649 | 95 | related_invoices = [] | ||
650 | 96 | |||
651 | 97 | ''' riusciamo a essere sempre indipendenti dalle fatture? | ||
652 | 98 | # se c'è l'oggetto fattura, utilizzo il calcolo su fattura | ||
653 | 99 | for move_line in move.line_id: | ||
654 | 100 | if move_line.invoice and move_line.invoice.id not in related_invoices: | ||
655 | 101 | related_invoices.append(move_line.invoice.id) | ||
656 | 102 | ''' | ||
657 | 103 | |||
658 | 104 | if related_invoices: | ||
659 | 105 | for invoice_id in related_invoices: | ||
660 | 106 | return self._get_tax_lines_by_invoice(inv_pool.browse(self.cr, self.uid, invoice_id)) | ||
661 | 107 | |||
662 | 108 | for move_line in move.line_id: | ||
663 | 109 | tax_item = {} | ||
664 | 110 | if move_line.tax_code_id and move_line.tax_code_id.tax_ids: | ||
665 | 111 | # Nel wizard ho già controllato che le eventuali diverse | ||
666 | 112 | # imposte abbiamo la stessa aliquota. | ||
667 | 113 | # Le diverse imposte devono comunque usare gli stessi tax code | ||
668 | 114 | main_tax = tax_obj.get_main_tax(move_line.tax_code_id.tax_ids[0]) | ||
669 | 115 | if main_tax.exclude_from_registries: | ||
670 | 116 | self.logger.notifyChannel("l10n_it_vat_registries", netsvc.LOG_INFO, | ||
671 | 117 | _('The tax %s is excluded from registries') % main_tax.name) | ||
672 | 118 | continue | ||
673 | 119 | # sommo gli imponibili relativi all'imposta corrente | ||
674 | 120 | base_amount = 0.0 | ||
675 | 121 | for line in move_line.move_id.line_id: | ||
676 | 122 | if line.tax_code_id.id == main_tax.base_code_id.id: | ||
677 | 123 | base_amount += self._get_line_amount_with_sign(line) | ||
678 | 124 | # calcolo % indetraibile | ||
679 | 125 | actual_tax_amount = base_amount * main_tax.amount | ||
680 | 126 | actual_tax_amount = cur_pool.round( | ||
681 | 127 | self.cr, self.uid, move.company_id.currency_id, | ||
682 | 128 | actual_tax_amount) | ||
683 | 129 | non_deductible = 0.0 | ||
684 | 130 | if abs(actual_tax_amount) != abs(move_line.tax_amount): | ||
685 | 131 | non_deductible = 100 | ||
686 | 132 | if move_line.tax_amount: | ||
687 | 133 | non_deductible = 100 - abs(( | ||
688 | 134 | move_line.tax_amount * 100.0) / actual_tax_amount) | ||
689 | 135 | non_deductible = cur_pool.round( | ||
690 | 136 | self.cr, self.uid, move.company_id.currency_id, | ||
691 | 137 | non_deductible) | ||
692 | 138 | # calcolo il totale dell'operazione | ||
693 | 139 | invoice_amount_total = self._move_total(move_line) | ||
694 | 140 | if self._is_refund(move_line): | ||
695 | 141 | invoice_amount_total = - invoice_amount_total | ||
696 | 142 | str_non_deductible = str(non_deductible).split('.')[0] | ||
697 | 143 | tax_item = { | ||
698 | 144 | 'tax_percentage': main_tax.amount and str( | ||
699 | 145 | main_tax.amount * 100).split('.')[0] or | ||
700 | 146 | move_line.tax_code_id.name, | ||
701 | 147 | 'tax_code_name': move_line.tax_code_id.name, | ||
702 | 148 | 'base': base_amount, | ||
703 | 149 | 'amount': actual_tax_amount, | ||
704 | 150 | 'non_deductible': str_non_deductible != '0' and | ||
705 | 151 | str_non_deductible or '', | ||
706 | 152 | 'index': index, | ||
707 | 153 | 'amount_total': invoice_amount_total, | ||
708 | 154 | } | ||
709 | 155 | res.append(tax_item) | ||
710 | 156 | iva = cur_pool.round( | ||
711 | 157 | self.cr, self.uid, move.company_id.currency_id, | ||
712 | 158 | (actual_tax_amount * (100 - non_deductible) * 0.01)) | ||
713 | 159 | iva_inded = cur_pool.round( | ||
714 | 160 | self.cr, self.uid, move.company_id.currency_id, | ||
715 | 161 | (actual_tax_amount * non_deductible * 0.01)) | ||
716 | 162 | tax_difference= (iva + iva_inded) - actual_tax_amount | ||
717 | 163 | # se risulta un'eccedenza, la tolgo dalla parte detraibile | ||
718 | 164 | if tax_difference > 0: | ||
719 | 165 | iva = iva - tax_difference | ||
720 | 166 | # se risulta una mancanza, la aggiungo alla parte indetraibile | ||
721 | 167 | elif tax_difference < 0: | ||
722 | 168 | iva_inded = iva_inded + tax_difference | ||
723 | 169 | totale_iva += iva | ||
724 | 170 | invoice_amount_untaxed += base_amount | ||
725 | 171 | totale_iva_inded += iva_inded | ||
726 | 172 | index += 1 | ||
727 | 173 | |||
728 | 174 | if tax_item: | ||
729 | 175 | if tax_item['tax_code_name'] not in self.localcontext[ | ||
730 | 176 | 'tax_codes']: | ||
731 | 177 | self.localcontext['tax_codes'][tax_item[ | ||
732 | 178 | 'tax_code_name']] = { | ||
733 | 179 | 'base': tax_item['base'], | ||
734 | 180 | 'amount': tax_item['amount'], | ||
735 | 181 | } | ||
736 | 182 | else: | ||
737 | 183 | self.localcontext['tax_codes'][tax_item[ | ||
738 | 184 | 'tax_code_name']]['base'] += tax_item['base'] | ||
739 | 185 | self.localcontext['tax_codes'][tax_item[ | ||
740 | 186 | 'tax_code_name']]['amount'] += tax_item['amount'] | ||
741 | 187 | |||
742 | 188 | self.localcontext['totali'][ | ||
743 | 189 | 'totale_operazioni'] += invoice_amount_total | ||
744 | 190 | self.localcontext['totali'][ | ||
745 | 191 | 'totale_imponibili'] += invoice_amount_untaxed | ||
746 | 192 | self.localcontext['totali']['totale_iva'] += totale_iva | ||
747 | 193 | self.localcontext['totali']['totale_iva_inded'] += totale_iva_inded | ||
748 | 194 | |||
749 | 195 | return res | ||
750 | 196 | |||
751 | 197 | def _get_tax_lines_by_invoice(self, invoice): | ||
752 | 198 | res=[] | ||
753 | 199 | tax_obj = self.pool.get('account.tax') | ||
754 | 200 | # index è usato per non ripetere la stampa dei dati fattura quando ci sono più codici IVA | ||
755 | 201 | index = 0 | ||
756 | 202 | totale_iva = 0.0 | ||
757 | 203 | totale_iva_inded = 0.0 | ||
758 | 204 | invoice_amount_total = 0.0 | ||
759 | 205 | invoice_amount_untaxed = 0.0 | ||
760 | 206 | for inv_tax in invoice.tax_line: | ||
761 | 207 | tax_item = {} | ||
762 | 208 | if inv_tax.base_code_id and inv_tax.tax_code_id: | ||
763 | 209 | account_tax = tax_obj.get_account_tax(inv_tax) | ||
764 | 210 | if account_tax.exclude_from_registries: | ||
765 | 211 | self.logger.notifyChannel("l10n_it_vat_registries", | ||
766 | 212 | netsvc.LOG_INFO, _( | ||
767 | 213 | 'The tax %s is excluded from registries') | ||
768 | 214 | % account_tax.name) | ||
769 | 215 | continue | ||
770 | 216 | account_tax_amount = account_tax.amount | ||
771 | 217 | invoice_amount_total = self._get_invoice_amount_total(invoice) | ||
772 | 218 | invoice_amount_untaxed = self._get_invoice_amount_untaxed( | ||
773 | 219 | invoice) | ||
774 | 220 | amount = self._get_amount_with_sign(inv_tax.tax_amount, | ||
775 | 221 | inv_tax.amount) | ||
776 | 222 | base = self._get_amount_with_sign(inv_tax.base_amount, | ||
777 | 223 | inv_tax.base) | ||
778 | 224 | # calcolo le note di credito con segno invertito | ||
779 | 225 | if invoice.type in ('in_refund', 'out_refund'): | ||
780 | 226 | amount = -amount | ||
781 | 227 | base = -base | ||
782 | 228 | invoice_amount_untaxed = -invoice_amount_untaxed | ||
783 | 229 | invoice_amount_total = -invoice_amount_total | ||
784 | 230 | tax_item = { | ||
785 | 231 | 'tax_percentage': account_tax_amount and str( | ||
786 | 232 | account_tax_amount * 100).split('.')[0] or | ||
787 | 233 | inv_tax.tax_code_id.name, | ||
788 | 234 | 'base': base, | ||
789 | 235 | 'amount': amount, # in valuta base | ||
790 | 236 | 'non_deductible': 0.0, | ||
791 | 237 | 'index': index, | ||
792 | 238 | 'amount_total': invoice_amount_total, | ||
793 | 239 | } | ||
794 | 240 | res.append(tax_item) | ||
795 | 241 | totale_iva += amount | ||
796 | 242 | index += 1 | ||
797 | 243 | # Se non c'è il tax code imponibile, cerco la tassa relativa alla parte non deducibile | ||
798 | 244 | elif inv_tax.tax_code_id: | ||
799 | 245 | tax = tax_obj.get_main_tax(tax_obj.get_account_tax(inv_tax)) | ||
800 | 246 | if tax.exclude_from_registries: | ||
801 | 247 | self.logger.notifyChannel("l10n_it_vat_registries", | ||
802 | 248 | netsvc.LOG_INFO, | ||
803 | 249 | _('The tax %s is excluded from registries') % tax.name) | ||
804 | 250 | continue | ||
805 | 251 | for inv_tax_2 in invoice.tax_line: | ||
806 | 252 | if inv_tax_2.base_code_id and not inv_tax_2.tax_code_id: | ||
807 | 253 | base_tax = tax_obj.get_main_tax( | ||
808 | 254 | tax_obj.get_account_tax(inv_tax_2)) | ||
809 | 255 | # Se hanno la stessa tassa | ||
810 | 256 | if base_tax.id == tax.id: | ||
811 | 257 | # Uso il valore assoluto perchè riferendosi | ||
812 | 258 | # alla stessa imposta non ci possono essere | ||
813 | 259 | # segni differenti | ||
814 | 260 | non_deductible = (abs(inv_tax_2.base_amount) / | ||
815 | 261 | (abs(inv_tax.base_amount) + abs( | ||
816 | 262 | inv_tax_2.base_amount)) * 100) | ||
817 | 263 | invoice_amount_total = \ | ||
818 | 264 | self._get_invoice_amount_total(invoice) | ||
819 | 265 | invoice_amount_untaxed = \ | ||
820 | 266 | self._get_invoice_amount_untaxed(invoice) | ||
821 | 267 | amount = self._get_amount_with_sign( | ||
822 | 268 | inv_tax.tax_amount, inv_tax.amount) | ||
823 | 269 | base = self._get_amount_with_sign( | ||
824 | 270 | inv_tax.base_amount, inv_tax.base) | ||
825 | 271 | amount2 = self._get_amount_with_sign( | ||
826 | 272 | inv_tax_2.tax_amount, inv_tax_2.amount) | ||
827 | 273 | base2 = self._get_amount_with_sign( | ||
828 | 274 | inv_tax_2.base_amount, inv_tax_2.base) | ||
829 | 275 | # calcolo le note di credito con segno invertito | ||
830 | 276 | if invoice.type in ('in_refund', 'out_refund'): | ||
831 | 277 | amount = -amount | ||
832 | 278 | base = -base | ||
833 | 279 | amount2 = -amount2 | ||
834 | 280 | base2 = -base2 | ||
835 | 281 | invoice_amount_untaxed = \ | ||
836 | 282 | -invoice_amount_untaxed | ||
837 | 283 | invoice_amount_total = -invoice_amount_total | ||
838 | 284 | tax_item = { | ||
839 | 285 | 'tax_percentage': base_tax.amount and str( | ||
840 | 286 | base_tax.amount * 100).split('.')[0] or | ||
841 | 287 | inv_tax.tax_code_id.name, | ||
842 | 288 | 'base': base + base2, | ||
843 | 289 | 'amount': amount + amount2, | ||
844 | 290 | 'non_deductible': non_deductible and str( | ||
845 | 291 | non_deductible).split('.')[0] or '', | ||
846 | 292 | 'index': index, | ||
847 | 293 | 'amount_total': invoice_amount_total, | ||
848 | 294 | } | ||
849 | 295 | res.append(tax_item) | ||
850 | 296 | totale_iva += amount | ||
851 | 297 | totale_iva_inded += amount2 | ||
852 | 298 | index += 1 | ||
853 | 299 | break | ||
854 | 300 | elif not inv_tax.tax_code_id and not inv_tax.base_code_id: | ||
855 | 301 | self.logger.notifyChannel("l10n_it_vat_registries", | ||
856 | 302 | netsvc.LOG_INFO, | ||
857 | 303 | _('The tax %s has no tax codes') % inv_tax.name) | ||
858 | 304 | continue | ||
859 | 305 | if tax_item: | ||
860 | 306 | if tax_item['tax_percentage'] not in self.localcontext[ | ||
861 | 307 | 'tax_codes']: | ||
862 | 308 | self.localcontext['tax_codes'][tax_item[ | ||
863 | 309 | 'tax_percentage']] = { | ||
864 | 310 | 'base': tax_item['base'], | ||
865 | 311 | 'amount': tax_item['amount'], | ||
866 | 312 | } | ||
867 | 313 | else: | ||
868 | 314 | self.localcontext['tax_codes'][tax_item[ | ||
869 | 315 | 'tax_percentage']]['base'] += tax_item['base'] | ||
870 | 316 | self.localcontext['tax_codes'][tax_item[ | ||
871 | 317 | 'tax_percentage']]['amount'] += tax_item['amount'] | ||
872 | 318 | |||
873 | 319 | self.localcontext['totali'][ | ||
874 | 320 | 'totale_operazioni'] += invoice_amount_total | ||
875 | 321 | self.localcontext['totali'][ | ||
876 | 322 | 'totale_imponibili'] += invoice_amount_untaxed | ||
877 | 323 | # da analizzare self.totale_variazioni += invoice.amount_total | ||
878 | 324 | self.localcontext['totali']['totale_iva'] += totale_iva | ||
879 | 325 | self.localcontext['totali']['totale_iva_inded'] += totale_iva_inded | ||
880 | 326 | |||
881 | 327 | return res | ||
882 | 328 | |||
883 | 329 | def __init__(self, cr, uid, name, context): | ||
884 | 330 | super(Parser, self).__init__(cr, uid, name, context) | ||
885 | 331 | self.localcontext.update({ | ||
886 | 332 | 'time': time, | ||
887 | 333 | 'tax_lines': self._get_tax_lines, | ||
888 | 334 | 'totali': { | ||
889 | 335 | 'totale_operazioni': 0.0, | ||
890 | 336 | 'totale_imponibili': 0.0, | ||
891 | 337 | 'totale_variazioni': 0.0, | ||
892 | 338 | 'totale_iva': 0.0, | ||
893 | 339 | 'totale_iva_inded': 0.0, | ||
894 | 340 | }, | ||
895 | 341 | 'tax_codes': {}, | ||
896 | 342 | }) | ||
897 | 343 | |||
898 | 344 | |||
899 | 345 | report_sxw.report_sxw('report.registro_iva_vendite', | ||
900 | 346 | 'registro_iva_vendite', | ||
901 | 347 | 'addons/l10n_it_vat_registries/templates/registro_iva_vendite.mako', | ||
902 | 348 | parser=Parser) | ||
903 | 349 | report_sxw.report_sxw('report.registro_iva_acquisti', | ||
904 | 350 | 'registro_iva_acquisti', | ||
905 | 351 | 'addons/l10n_it_vat_registries/templates/registro_iva_acquisti.mako', | ||
906 | 352 | parser=Parser) | ||
907 | 353 | report_sxw.report_sxw('report.registro_iva_corrispettivi', | ||
908 | 354 | 'registro_iva_corrispettivi', | ||
909 | 355 | 'addons/l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako', | ||
910 | 356 | parser=Parser) | ||
911 | 0 | 357 | ||
912 | === added file 'l10n_it_vat_registries/reports.xml' | |||
913 | --- l10n_it_vat_registries/reports.xml 1970-01-01 00:00:00 +0000 | |||
914 | +++ l10n_it_vat_registries/reports.xml 2013-01-29 22:10:26 +0000 | |||
915 | @@ -0,0 +1,268 @@ | |||
916 | 1 | <?xml version="1.0"?> | ||
917 | 2 | <openerp> | ||
918 | 3 | <data noupdate="1"> | ||
919 | 4 | <record id="ir_header_webkit_vat_registry_sale" model="ir.header_webkit"> | ||
920 | 5 | <field name="orientation">Landscape</field> | ||
921 | 6 | <field name="format">A4</field> | ||
922 | 7 | <field name="margin_top">60</field> | ||
923 | 8 | <field name="html"><![CDATA[<html> | ||
924 | 9 | <head> | ||
925 | 10 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
926 | 11 | <script> | ||
927 | 12 | function subst() { | ||
928 | 13 | var vars={}; | ||
929 | 14 | var x=document.location.search.substring(1).split('&'); | ||
930 | 15 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
931 | 16 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
932 | 17 | for(var i in x) { | ||
933 | 18 | var y = document.getElementsByClassName(x[i]); | ||
934 | 19 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
935 | 20 | } | ||
936 | 21 | } | ||
937 | 22 | </script> | ||
938 | 23 | </head> | ||
939 | 24 | <body style="border:0; margin: 0;" onload="subst()"> | ||
940 | 25 | <% setLang(company.partner_id.lang or "en_US") %> | ||
941 | 26 | <h1>Registro I.V.A. Vendite</h1> | ||
942 | 27 | <h3>${company.partner_id.name or ''|entity}</h3> | ||
943 | 28 | <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px"> | ||
944 | 29 | <tr> | ||
945 | 30 | <td> | ||
946 | 31 | <div>${company.partner_id.street or ''|entity}</div> | ||
947 | 32 | <div>${company.partner_id.street2 or ''|entity}</div> | ||
948 | 33 | <div>${company.partner_id.zip or ''|entity}</div> | ||
949 | 34 | <div>${company.partner_id.city or ''|entity}</div> | ||
950 | 35 | <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div> | ||
951 | 36 | </td> | ||
952 | 37 | <td> | ||
953 | 38 | <div>P. IVA: ${company.partner_id.vat or ''|entity}</div> | ||
954 | 39 | <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div> | ||
955 | 40 | <div>Codice Attività :</div> | ||
956 | 41 | <div>Registro Imprese:</div> | ||
957 | 42 | </td> | ||
958 | 43 | </tr> | ||
959 | 44 | </table> | ||
960 | 45 | <br/> | ||
961 | 46 | </body> | ||
962 | 47 | </html>]]> | ||
963 | 48 | </field> | ||
964 | 49 | <field name="footer_html"><![CDATA[<html> | ||
965 | 50 | <head> | ||
966 | 51 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
967 | 52 | <script> | ||
968 | 53 | function subst() { | ||
969 | 54 | var vars={}; | ||
970 | 55 | var x=document.location.search.substring(1).split('&'); | ||
971 | 56 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
972 | 57 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
973 | 58 | for(var i in x) { | ||
974 | 59 | var y = document.getElementsByClassName(x[i]); | ||
975 | 60 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
976 | 61 | } | ||
977 | 62 | } | ||
978 | 63 | </script> | ||
979 | 64 | </head> | ||
980 | 65 | <body style="border:0; margin: 0;" onload="subst()"> | ||
981 | 66 | <table style="border-top: 1px solid black; width: 100%"> | ||
982 | 67 | <tr > | ||
983 | 68 | <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td> | ||
984 | 69 | </tr> | ||
985 | 70 | </table> | ||
986 | 71 | </body> | ||
987 | 72 | </html>]]></field><field name="css" ><![CDATA[ | ||
988 | 73 | tr { | ||
989 | 74 | page-break-inside: avoid; | ||
990 | 75 | } | ||
991 | 76 | thead{ | ||
992 | 77 | display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */ | ||
993 | 78 | } | ||
994 | 79 | ]]> </field> | ||
995 | 80 | <field name="name">Registro IVA vendite</field> | ||
996 | 81 | </record> | ||
997 | 82 | <record id="ir_header_webkit_vat_registry_purchase" model="ir.header_webkit"> | ||
998 | 83 | <field name="orientation">Landscape</field> | ||
999 | 84 | <field name="format">A4</field> | ||
1000 | 85 | <field name="margin_top">60</field> | ||
1001 | 86 | <field name="html"><![CDATA[<html> | ||
1002 | 87 | <head> | ||
1003 | 88 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
1004 | 89 | <script> | ||
1005 | 90 | function subst() { | ||
1006 | 91 | var vars={}; | ||
1007 | 92 | var x=document.location.search.substring(1).split('&'); | ||
1008 | 93 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
1009 | 94 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
1010 | 95 | for(var i in x) { | ||
1011 | 96 | var y = document.getElementsByClassName(x[i]); | ||
1012 | 97 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
1013 | 98 | } | ||
1014 | 99 | } | ||
1015 | 100 | </script> | ||
1016 | 101 | </head> | ||
1017 | 102 | <body style="border:0; margin: 0;" onload="subst()"> | ||
1018 | 103 | <% setLang(company.partner_id.lang or "en_US") %> | ||
1019 | 104 | <h1>Registro I.V.A. Acquisti</h1> | ||
1020 | 105 | <h3>${company.partner_id.name or ''|entity}</h3> | ||
1021 | 106 | <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px"> | ||
1022 | 107 | <tr> | ||
1023 | 108 | <td> | ||
1024 | 109 | <div>${company.partner_id.street or ''|entity}</div> | ||
1025 | 110 | <div>${company.partner_id.street2 or ''|entity}</div> | ||
1026 | 111 | <div>${company.partner_id.zip or ''|entity}</div> | ||
1027 | 112 | <div>${company.partner_id.city or ''|entity}</div> | ||
1028 | 113 | <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div> | ||
1029 | 114 | </td> | ||
1030 | 115 | <td> | ||
1031 | 116 | <div>P. IVA: ${company.partner_id.vat or ''|entity}</div> | ||
1032 | 117 | <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div> | ||
1033 | 118 | <div>Codice Attività :</div> | ||
1034 | 119 | <div>Registro Imprese:</div> | ||
1035 | 120 | </td> | ||
1036 | 121 | </tr> | ||
1037 | 122 | </table> | ||
1038 | 123 | <br/> | ||
1039 | 124 | </body> | ||
1040 | 125 | </html>]]> | ||
1041 | 126 | </field> | ||
1042 | 127 | <field name="footer_html"><![CDATA[<html> | ||
1043 | 128 | <head> | ||
1044 | 129 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
1045 | 130 | <script> | ||
1046 | 131 | function subst() { | ||
1047 | 132 | var vars={}; | ||
1048 | 133 | var x=document.location.search.substring(1).split('&'); | ||
1049 | 134 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
1050 | 135 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
1051 | 136 | for(var i in x) { | ||
1052 | 137 | var y = document.getElementsByClassName(x[i]); | ||
1053 | 138 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
1054 | 139 | } | ||
1055 | 140 | } | ||
1056 | 141 | </script> | ||
1057 | 142 | </head> | ||
1058 | 143 | <body style="border:0; margin: 0;" onload="subst()"> | ||
1059 | 144 | <table style="border-top: 1px solid black; width: 100%"> | ||
1060 | 145 | <tr > | ||
1061 | 146 | <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td> | ||
1062 | 147 | </tr> | ||
1063 | 148 | </table> | ||
1064 | 149 | </body> | ||
1065 | 150 | </html>]]></field><field name="css" ><![CDATA[ | ||
1066 | 151 | tr { | ||
1067 | 152 | page-break-inside: avoid; | ||
1068 | 153 | } | ||
1069 | 154 | thead{ | ||
1070 | 155 | display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */ | ||
1071 | 156 | } | ||
1072 | 157 | ]]> </field> | ||
1073 | 158 | <field name="name">Registro IVA acquisti</field> | ||
1074 | 159 | </record> | ||
1075 | 160 | <record id="ir_header_webkit_vat_registry_corrispettivi" model="ir.header_webkit"> | ||
1076 | 161 | <field name="orientation">Landscape</field> | ||
1077 | 162 | <field name="format">A4</field> | ||
1078 | 163 | <field name="margin_top">60</field> | ||
1079 | 164 | <field name="html"><![CDATA[<html> | ||
1080 | 165 | <head> | ||
1081 | 166 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
1082 | 167 | <script> | ||
1083 | 168 | function subst() { | ||
1084 | 169 | var vars={}; | ||
1085 | 170 | var x=document.location.search.substring(1).split('&'); | ||
1086 | 171 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
1087 | 172 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
1088 | 173 | for(var i in x) { | ||
1089 | 174 | var y = document.getElementsByClassName(x[i]); | ||
1090 | 175 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
1091 | 176 | } | ||
1092 | 177 | } | ||
1093 | 178 | </script> | ||
1094 | 179 | </head> | ||
1095 | 180 | <body style="border:0; margin: 0;" onload="subst()"> | ||
1096 | 181 | <% setLang(company.partner_id.lang or "en_US") %> | ||
1097 | 182 | <h1>Registro I.V.A. Corrispettivi</h1> | ||
1098 | 183 | <h3>${company.partner_id.name or ''|entity}</h3> | ||
1099 | 184 | <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px"> | ||
1100 | 185 | <tr> | ||
1101 | 186 | <td> | ||
1102 | 187 | <div>${company.partner_id.street or ''|entity}</div> | ||
1103 | 188 | <div>${company.partner_id.street2 or ''|entity}</div> | ||
1104 | 189 | <div>${company.partner_id.zip or ''|entity}</div> | ||
1105 | 190 | <div>${company.partner_id.city or ''|entity}</div> | ||
1106 | 191 | <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div> | ||
1107 | 192 | </td> | ||
1108 | 193 | <td> | ||
1109 | 194 | <div>P. IVA: ${company.partner_id.vat or ''|entity}</div> | ||
1110 | 195 | <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div> | ||
1111 | 196 | <div>Codice Attività :</div> | ||
1112 | 197 | <div>Registro Imprese:</div> | ||
1113 | 198 | </td> | ||
1114 | 199 | </tr> | ||
1115 | 200 | </table> | ||
1116 | 201 | <br/> | ||
1117 | 202 | </body> | ||
1118 | 203 | </html>]]> | ||
1119 | 204 | </field> | ||
1120 | 205 | <field name="footer_html"><![CDATA[<html> | ||
1121 | 206 | <head> | ||
1122 | 207 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
1123 | 208 | <script> | ||
1124 | 209 | function subst() { | ||
1125 | 210 | var vars={}; | ||
1126 | 211 | var x=document.location.search.substring(1).split('&'); | ||
1127 | 212 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
1128 | 213 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
1129 | 214 | for(var i in x) { | ||
1130 | 215 | var y = document.getElementsByClassName(x[i]); | ||
1131 | 216 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
1132 | 217 | } | ||
1133 | 218 | } | ||
1134 | 219 | </script> | ||
1135 | 220 | </head> | ||
1136 | 221 | <body style="border:0; margin: 0;" onload="subst()"> | ||
1137 | 222 | <table style="border-top: 1px solid black; width: 100%"> | ||
1138 | 223 | <tr > | ||
1139 | 224 | <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td> | ||
1140 | 225 | </tr> | ||
1141 | 226 | </table> | ||
1142 | 227 | </body> | ||
1143 | 228 | </html>]]></field><field name="css" ><![CDATA[ | ||
1144 | 229 | tr { | ||
1145 | 230 | page-break-inside: avoid; | ||
1146 | 231 | } | ||
1147 | 232 | thead{ | ||
1148 | 233 | display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */ | ||
1149 | 234 | } | ||
1150 | 235 | ]]> </field> | ||
1151 | 236 | <field name="name">Registro IVA corrispettivi</field> | ||
1152 | 237 | </record> | ||
1153 | 238 | |||
1154 | 239 | <record id="registro_iva_vendite_report_id" model="ir.actions.report.xml"> | ||
1155 | 240 | <field name="name">Customer Invoices VAT Registry</field> | ||
1156 | 241 | <field name="type">ir.actions.report.xml</field> | ||
1157 | 242 | <field name="model">account.move</field> | ||
1158 | 243 | <field name="report_name">registro_iva_vendite</field> | ||
1159 | 244 | <field name="report_type">webkit</field> | ||
1160 | 245 | <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_vendite.mako</field> | ||
1161 | 246 | <field name="webkit_header" ref="ir_header_webkit_vat_registry_sale"/> | ||
1162 | 247 | </record> | ||
1163 | 248 | <record id="registro_iva_acquisti_report_id" model="ir.actions.report.xml"> | ||
1164 | 249 | <field name="name">Supplier Invoices VAT Registry</field> | ||
1165 | 250 | <field name="type">ir.actions.report.xml</field> | ||
1166 | 251 | <field name="model">account.move</field> | ||
1167 | 252 | <field name="report_name">registro_iva_acquisti</field> | ||
1168 | 253 | <field name="report_type">webkit</field> | ||
1169 | 254 | <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_acquisti.mako</field> | ||
1170 | 255 | <field name="webkit_header" ref="ir_header_webkit_vat_registry_purchase"/> | ||
1171 | 256 | </record> | ||
1172 | 257 | <record id="registro_iva_corrispettivi_report_id" model="ir.actions.report.xml"> | ||
1173 | 258 | <field name="name">Corrispettivi VAT Registry</field> | ||
1174 | 259 | <field name="type">ir.actions.report.xml</field> | ||
1175 | 260 | <field name="model">account.move</field> | ||
1176 | 261 | <field name="report_name">registro_iva_corrispettivi</field> | ||
1177 | 262 | <field name="report_type">webkit</field> | ||
1178 | 263 | <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako</field> | ||
1179 | 264 | <field name="webkit_header" ref="ir_header_webkit_vat_registry_corrispettivi"/> | ||
1180 | 265 | </record> | ||
1181 | 266 | </data> | ||
1182 | 267 | </openerp> | ||
1183 | 268 | |||
1184 | 0 | 269 | ||
1185 | === added directory 'l10n_it_vat_registries/templates' | |||
1186 | === added file 'l10n_it_vat_registries/templates/registro_iva_acquisti.mako' | |||
1187 | --- l10n_it_vat_registries/templates/registro_iva_acquisti.mako 1970-01-01 00:00:00 +0000 | |||
1188 | +++ l10n_it_vat_registries/templates/registro_iva_acquisti.mako 2013-01-29 22:10:26 +0000 | |||
1189 | @@ -0,0 +1,169 @@ | |||
1190 | 1 | <html> | ||
1191 | 2 | <head> | ||
1192 | 3 | <style type="text/css"> | ||
1193 | 4 | ${css} | ||
1194 | 5 | .left_with_line { | ||
1195 | 6 | text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1196 | 7 | } | ||
1197 | 8 | .right_with_line { | ||
1198 | 9 | text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1199 | 10 | } | ||
1200 | 11 | .left_without_line { | ||
1201 | 12 | text-align:left; vertical-align:text-top; padding:5px | ||
1202 | 13 | } | ||
1203 | 14 | .right_without_line { | ||
1204 | 15 | text-align:right; vertical-align:text-top; padding:5px | ||
1205 | 16 | } | ||
1206 | 17 | </style> | ||
1207 | 18 | </head> | ||
1208 | 19 | <body> | ||
1209 | 20 | <h2>Fatture Ricevute</h2> | ||
1210 | 21 | <% setLang(objects[0].company_id.partner_id.lang or "en_US") %> | ||
1211 | 22 | <table style="width:100%;" cellspacing="0"> | ||
1212 | 23 | <thead> | ||
1213 | 24 | <tr> | ||
1214 | 25 | <th class="left_without_line">Data registrazione</th> | ||
1215 | 26 | <th class="left_without_line">Numero</th> | ||
1216 | 27 | <th class="left_without_line">Ragione sociale</th> | ||
1217 | 28 | <th class="left_without_line">Numero fattura</th> | ||
1218 | 29 | <th class="left_without_line">Data fattura</th> | ||
1219 | 30 | <th class="left_without_line">Causale</th> | ||
1220 | 31 | <th class="right_without_line">Totale fattura</th> | ||
1221 | 32 | <th class="right_without_line">Imponibile</th> | ||
1222 | 33 | <th class="right_without_line">% IVA</th> | ||
1223 | 34 | <th class="right_without_line">Imposta</th> | ||
1224 | 35 | <th class="right_without_line">% inded.</th> | ||
1225 | 36 | <th></th> | ||
1226 | 37 | </tr> | ||
1227 | 38 | </thead> | ||
1228 | 39 | <tbody> | ||
1229 | 40 | <% counter = 0 %> | ||
1230 | 41 | %for object in objects : | ||
1231 | 42 | <% counter += 1 %> | ||
1232 | 43 | %for line in tax_lines(object) : | ||
1233 | 44 | %if line['index']==0: | ||
1234 | 45 | <tr><td class="left_with_line"> | ||
1235 | 46 | %else: | ||
1236 | 47 | <tr><td class="left_without_line"> | ||
1237 | 48 | %endif | ||
1238 | 49 | %if line['index']==0: | ||
1239 | 50 | ${ formatLang(object.date,date=True) or '' | entity} | ||
1240 | 51 | %endif | ||
1241 | 52 | %if line['index']==0: | ||
1242 | 53 | </td><td class="left_with_line"> | ||
1243 | 54 | %else: | ||
1244 | 55 | </td><td class="left_without_line"> | ||
1245 | 56 | %endif | ||
1246 | 57 | %if line['index']==0: | ||
1247 | 58 | ${ counter | entity} | ||
1248 | 59 | %endif | ||
1249 | 60 | %if line['index']==0: | ||
1250 | 61 | </td><td class="left_with_line"> | ||
1251 | 62 | %else: | ||
1252 | 63 | </td><td class="left_without_line"> | ||
1253 | 64 | %endif | ||
1254 | 65 | %if line['index']==0: | ||
1255 | 66 | ${object.partner_id.name or ''| entity} | ||
1256 | 67 | %endif | ||
1257 | 68 | %if line['index']==0: | ||
1258 | 69 | </td><td class="left_with_line"> | ||
1259 | 70 | %else: | ||
1260 | 71 | </td><td class="left_without_line"> | ||
1261 | 72 | %endif | ||
1262 | 73 | %if line['index']==0: | ||
1263 | 74 | ${object.name or ''| entity} | ||
1264 | 75 | %endif | ||
1265 | 76 | %if line['index']==0: | ||
1266 | 77 | </td><td class="left_with_line"> | ||
1267 | 78 | %else: | ||
1268 | 79 | </td><td class="left_without_line"> | ||
1269 | 80 | %endif | ||
1270 | 81 | %if line['index']==0: | ||
1271 | 82 | ${ formatLang(object.date,date=True) or '' | entity} | ||
1272 | 83 | %endif | ||
1273 | 84 | %if line['index']==0: | ||
1274 | 85 | </td><td class="left_with_line"> | ||
1275 | 86 | %else: | ||
1276 | 87 | </td><td class="left_without_line"> | ||
1277 | 88 | %endif | ||
1278 | 89 | %if line['index']==0: | ||
1279 | 90 | %if line['amount_total'] >= 0: | ||
1280 | 91 | Fattura | ||
1281 | 92 | %else: | ||
1282 | 93 | Nota di credito | ||
1283 | 94 | %endif | ||
1284 | 95 | %endif | ||
1285 | 96 | %if line['index']==0: | ||
1286 | 97 | </td><td class="right_with_line"> | ||
1287 | 98 | %else: | ||
1288 | 99 | </td><td class="right_without_line"> | ||
1289 | 100 | %endif | ||
1290 | 101 | %if line['index']==0: | ||
1291 | 102 | ${ formatLang(line['amount_total']) | entity} | ||
1292 | 103 | %endif | ||
1293 | 104 | </td> | ||
1294 | 105 | %if line['index']==0: | ||
1295 | 106 | <td class="right_with_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1296 | 107 | %else: | ||
1297 | 108 | <td class="right_without_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1298 | 109 | %endif | ||
1299 | 110 | %if line['index']==0: | ||
1300 | 111 | <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1301 | 112 | %else: | ||
1302 | 113 | <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1303 | 114 | %endif | ||
1304 | 115 | %if line['index']==0: | ||
1305 | 116 | <td class="right_with_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1306 | 117 | %else: | ||
1307 | 118 | <td class="right_without_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1308 | 119 | %endif | ||
1309 | 120 | %if line['index']==0: | ||
1310 | 121 | <td class="right_with_line"> | ||
1311 | 122 | %else: | ||
1312 | 123 | <td class="right_without_line"> | ||
1313 | 124 | %endif | ||
1314 | 125 | %if line['non_deductible']: | ||
1315 | 126 | ${ line['non_deductible'] | entity} % | ||
1316 | 127 | %endif | ||
1317 | 128 | </td> | ||
1318 | 129 | <td></td> | ||
1319 | 130 | </tr> | ||
1320 | 131 | %endfor | ||
1321 | 132 | %endfor | ||
1322 | 133 | </tbody> | ||
1323 | 134 | </table> | ||
1324 | 135 | <div style="page-break-inside: avoid;"> | ||
1325 | 136 | <br/> | ||
1326 | 137 | <table style="width:100%; " border="1"> | ||
1327 | 138 | <tr style="border-style:ridge;border-width:5px"> | ||
1328 | 139 | <td colspan="4" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td> | ||
1329 | 140 | </tr> | ||
1330 | 141 | <tr> | ||
1331 | 142 | <td rowspan="2" style="vertical-align:text-top;padding:10"> | ||
1332 | 143 | <table style="width:100%;"> | ||
1333 | 144 | <tr> | ||
1334 | 145 | <th style="text-align:left">Descrizione</th> | ||
1335 | 146 | <th style="text-align:right">Imponibile</th> | ||
1336 | 147 | <th style="text-align:right">Imposta</th> | ||
1337 | 148 | </tr> | ||
1338 | 149 | %for tax_code in tax_codes : | ||
1339 | 150 | <tr> | ||
1340 | 151 | <td>${tax_code|entity} | ||
1341 | 152 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity} | ||
1342 | 153 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity} | ||
1343 | 154 | </td> | ||
1344 | 155 | </tr> | ||
1345 | 156 | %endfor | ||
1346 | 157 | </table> | ||
1347 | 158 | </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td> | ||
1348 | 159 | <td colspan="2" style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td> | ||
1349 | 160 | </tr> | ||
1350 | 161 | <tr> | ||
1351 | 162 | <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td> | ||
1352 | 163 | <td style="padding:10">Totale IVA Detraibile:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td> | ||
1353 | 164 | <td style="padding:10">Totale IVA Indetraibile:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva_inded'])|entity}</strong></p><br/></td> | ||
1354 | 165 | </tr> | ||
1355 | 166 | </table> | ||
1356 | 167 | </div> | ||
1357 | 168 | </body> | ||
1358 | 169 | </html> | ||
1359 | 0 | 170 | ||
1360 | === added file 'l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako' | |||
1361 | --- l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako 1970-01-01 00:00:00 +0000 | |||
1362 | +++ l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako 2013-01-29 22:10:26 +0000 | |||
1363 | @@ -0,0 +1,127 @@ | |||
1364 | 1 | <html> | ||
1365 | 2 | <head> | ||
1366 | 3 | <style type="text/css"> | ||
1367 | 4 | ${css} | ||
1368 | 5 | .left_with_line { | ||
1369 | 6 | text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1370 | 7 | } | ||
1371 | 8 | .right_with_line { | ||
1372 | 9 | text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1373 | 10 | } | ||
1374 | 11 | .left_without_line { | ||
1375 | 12 | text-align:left; vertical-align:text-top; padding:5px | ||
1376 | 13 | } | ||
1377 | 14 | .right_without_line { | ||
1378 | 15 | text-align:right; vertical-align:text-top; padding:5px | ||
1379 | 16 | } | ||
1380 | 17 | </style> | ||
1381 | 18 | </head> | ||
1382 | 19 | <body> | ||
1383 | 20 | <h2>Corrispettivi</h2> | ||
1384 | 21 | <% setLang(objects[0].company_id.partner_id.lang or "en_US") %> | ||
1385 | 22 | <table style="width:100%;" cellspacing="0"> | ||
1386 | 23 | <thead> | ||
1387 | 24 | <tr> | ||
1388 | 25 | <th class="left_without_line">Numero</th> | ||
1389 | 26 | <th class="left_without_line">Data registrazione</th> | ||
1390 | 27 | <th class="left_without_line">Causale</th> | ||
1391 | 28 | <th class="right_without_line">Importo totale</th> | ||
1392 | 29 | <th class="right_without_line">Imponibile</th> | ||
1393 | 30 | <th class="right_without_line">% IVA</th> | ||
1394 | 31 | <th class="right_without_line">Imposta</th> | ||
1395 | 32 | <th></th> | ||
1396 | 33 | </tr> | ||
1397 | 34 | </thead> | ||
1398 | 35 | <tbody> | ||
1399 | 36 | <% counter = 0 %> | ||
1400 | 37 | %for object in objects : | ||
1401 | 38 | <% counter += 1 %> | ||
1402 | 39 | %for line in tax_lines(object) : | ||
1403 | 40 | %if line['index']==0: | ||
1404 | 41 | <tr><td class="left_with_line"> | ||
1405 | 42 | %else: | ||
1406 | 43 | <tr><td class="left_without_line"> | ||
1407 | 44 | %endif | ||
1408 | 45 | %if line['index']==0: | ||
1409 | 46 | ${ counter | entity} | ||
1410 | 47 | %endif | ||
1411 | 48 | %if line['index']==0: | ||
1412 | 49 | </td><td class="left_with_line"> | ||
1413 | 50 | %else: | ||
1414 | 51 | </td><td class="left_without_line"> | ||
1415 | 52 | %endif | ||
1416 | 53 | %if line['index']==0: | ||
1417 | 54 | ${ formatLang(object.date,date=True) or ''| entity} | ||
1418 | 55 | %endif | ||
1419 | 56 | %if line['index']==0: | ||
1420 | 57 | </td><td class="left_with_line"> | ||
1421 | 58 | %else: | ||
1422 | 59 | </td><td class="left_without_line"> | ||
1423 | 60 | %endif | ||
1424 | 61 | %if line['index']==0: | ||
1425 | 62 | Corrispettivi | ||
1426 | 63 | %endif | ||
1427 | 64 | %if line['index']==0: | ||
1428 | 65 | </td><td class="right_with_line"> | ||
1429 | 66 | %else: | ||
1430 | 67 | </td><td class="right_without_line"> | ||
1431 | 68 | %endif | ||
1432 | 69 | %if line['index']==0: | ||
1433 | 70 | ${ formatLang(line['amount_total']) | entity} | ||
1434 | 71 | %endif | ||
1435 | 72 | </td> | ||
1436 | 73 | %if line['index']==0: | ||
1437 | 74 | <td class="right_with_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1438 | 75 | %else: | ||
1439 | 76 | <td class="right_without_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1440 | 77 | %endif | ||
1441 | 78 | %if line['index']==0: | ||
1442 | 79 | <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1443 | 80 | %else: | ||
1444 | 81 | <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1445 | 82 | %endif | ||
1446 | 83 | %if line['index']==0: | ||
1447 | 84 | <td class="right_with_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1448 | 85 | %else: | ||
1449 | 86 | <td class="right_without_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1450 | 87 | %endif | ||
1451 | 88 | <td></td> | ||
1452 | 89 | </tr> | ||
1453 | 90 | %endfor | ||
1454 | 91 | %endfor | ||
1455 | 92 | </tbody> | ||
1456 | 93 | </table> | ||
1457 | 94 | <div style="page-break-inside: avoid;"> | ||
1458 | 95 | <br/> | ||
1459 | 96 | <table style="width:100%; " border="1"> | ||
1460 | 97 | <tr style="border-style:ridge;border-width:5px"> | ||
1461 | 98 | <td colspan="3" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td> | ||
1462 | 99 | </tr> | ||
1463 | 100 | <tr> | ||
1464 | 101 | <td rowspan="2" style="vertical-align:text-top;padding:10"> | ||
1465 | 102 | <table style="width:100%;"> | ||
1466 | 103 | <tr> | ||
1467 | 104 | <th style="text-align:left">Descrizione</th> | ||
1468 | 105 | <th style="text-align:right">Imponibile</th> | ||
1469 | 106 | <th style="text-align:right">Imposta</th> | ||
1470 | 107 | </tr> | ||
1471 | 108 | %for tax_code in tax_codes : | ||
1472 | 109 | <tr> | ||
1473 | 110 | <td>${tax_code|entity} | ||
1474 | 111 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity} | ||
1475 | 112 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity} | ||
1476 | 113 | </td> | ||
1477 | 114 | </tr> | ||
1478 | 115 | %endfor | ||
1479 | 116 | </table> | ||
1480 | 117 | </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td> | ||
1481 | 118 | <td style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td> | ||
1482 | 119 | </tr> | ||
1483 | 120 | <tr> | ||
1484 | 121 | <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td> | ||
1485 | 122 | <td style="padding:10">Totale IVA:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td> | ||
1486 | 123 | </tr> | ||
1487 | 124 | </table> | ||
1488 | 125 | </div> | ||
1489 | 126 | </body> | ||
1490 | 127 | </html> | ||
1491 | 0 | 128 | ||
1492 | === added file 'l10n_it_vat_registries/templates/registro_iva_vendite.mako' | |||
1493 | --- l10n_it_vat_registries/templates/registro_iva_vendite.mako 1970-01-01 00:00:00 +0000 | |||
1494 | +++ l10n_it_vat_registries/templates/registro_iva_vendite.mako 2013-01-29 22:10:26 +0000 | |||
1495 | @@ -0,0 +1,158 @@ | |||
1496 | 1 | <html> | ||
1497 | 2 | <head> | ||
1498 | 3 | <style type="text/css"> | ||
1499 | 4 | ${css} | ||
1500 | 5 | .left_with_line { | ||
1501 | 6 | text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1502 | 7 | } | ||
1503 | 8 | .right_with_line { | ||
1504 | 9 | text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px | ||
1505 | 10 | } | ||
1506 | 11 | .left_without_line { | ||
1507 | 12 | text-align:left; vertical-align:text-top; padding:5px | ||
1508 | 13 | } | ||
1509 | 14 | .right_without_line { | ||
1510 | 15 | text-align:right; vertical-align:text-top; padding:5px | ||
1511 | 16 | } | ||
1512 | 17 | </style> | ||
1513 | 18 | </head> | ||
1514 | 19 | <body> | ||
1515 | 20 | <h2>Fatture Emesse</h2> | ||
1516 | 21 | <% setLang(objects[0].company_id.partner_id.lang or "en_US") %> | ||
1517 | 22 | <table style="width:100%;" cellspacing="0"> | ||
1518 | 23 | <thead> | ||
1519 | 24 | <tr> | ||
1520 | 25 | <th class="left_without_line">Data registrazione</th> | ||
1521 | 26 | <th class="left_without_line">Numero</th> | ||
1522 | 27 | <th class="left_without_line">Ragione sociale</th> | ||
1523 | 28 | <th class="left_without_line">Numero fattura</th> | ||
1524 | 29 | <th class="left_without_line">Data fattura</th> | ||
1525 | 30 | <th class="left_without_line">Causale</th> | ||
1526 | 31 | <th class="right_without_line">Totale fattura</th> | ||
1527 | 32 | <th class="right_without_line">Imponibile</th> | ||
1528 | 33 | <th class="right_without_line">% IVA</th> | ||
1529 | 34 | <th class="right_without_line">Imposta</th> | ||
1530 | 35 | <th></th> | ||
1531 | 36 | </tr> | ||
1532 | 37 | </thead> | ||
1533 | 38 | <tbody> | ||
1534 | 39 | <% counter = 0 %> | ||
1535 | 40 | %for object in objects : | ||
1536 | 41 | <% counter += 1 %> | ||
1537 | 42 | %for line in tax_lines(object) : | ||
1538 | 43 | %if line['index']==0: | ||
1539 | 44 | <tr><td class="left_with_line"> | ||
1540 | 45 | %else: | ||
1541 | 46 | <tr><td class="left_without_line"> | ||
1542 | 47 | %endif | ||
1543 | 48 | %if line['index']==0: | ||
1544 | 49 | ${ formatLang(object.date,date=True) or '' | entity} | ||
1545 | 50 | %endif | ||
1546 | 51 | %if line['index']==0: | ||
1547 | 52 | </td><td class="left_with_line"> | ||
1548 | 53 | %else: | ||
1549 | 54 | </td><td class="left_without_line"> | ||
1550 | 55 | %endif | ||
1551 | 56 | %if line['index']==0: | ||
1552 | 57 | ${ counter | entity} | ||
1553 | 58 | %endif | ||
1554 | 59 | %if line['index']==0: | ||
1555 | 60 | </td><td class="left_with_line"> | ||
1556 | 61 | %else: | ||
1557 | 62 | </td><td class="left_without_line"> | ||
1558 | 63 | %endif | ||
1559 | 64 | %if line['index']==0: | ||
1560 | 65 | ${object.partner_id.name or ''| entity} | ||
1561 | 66 | %endif | ||
1562 | 67 | %if line['index']==0: | ||
1563 | 68 | </td><td class="left_with_line"> | ||
1564 | 69 | %else: | ||
1565 | 70 | </td><td class="left_without_line"> | ||
1566 | 71 | %endif | ||
1567 | 72 | %if line['index']==0: | ||
1568 | 73 | ${object.name or ''| entity} | ||
1569 | 74 | %endif | ||
1570 | 75 | %if line['index']==0: | ||
1571 | 76 | </td><td class="left_with_line"> | ||
1572 | 77 | %else: | ||
1573 | 78 | </td><td class="left_without_line"> | ||
1574 | 79 | %endif | ||
1575 | 80 | %if line['index']==0: | ||
1576 | 81 | ${ formatLang(object.date,date=True) or '' | entity} | ||
1577 | 82 | %endif | ||
1578 | 83 | %if line['index']==0: | ||
1579 | 84 | </td><td class="left_with_line"> | ||
1580 | 85 | %else: | ||
1581 | 86 | </td><td class="left_without_line"> | ||
1582 | 87 | %endif | ||
1583 | 88 | %if line['index']==0: | ||
1584 | 89 | %if line['amount_total'] >= 0: | ||
1585 | 90 | Fattura | ||
1586 | 91 | %else: | ||
1587 | 92 | Nota di credito | ||
1588 | 93 | %endif | ||
1589 | 94 | %endif | ||
1590 | 95 | %if line['index']==0: | ||
1591 | 96 | </td><td class="right_with_line"> | ||
1592 | 97 | %else: | ||
1593 | 98 | </td><td class="right_without_line"> | ||
1594 | 99 | %endif | ||
1595 | 100 | %if line['index']==0: | ||
1596 | 101 | ${ formatLang(line['amount_total']) | entity} | ||
1597 | 102 | %endif | ||
1598 | 103 | </td> | ||
1599 | 104 | %if line['index']==0: | ||
1600 | 105 | <td class="right_with_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1601 | 106 | %else: | ||
1602 | 107 | <td class="right_without_line">${ formatLang(line['base']) or ''| entity}</td> | ||
1603 | 108 | %endif | ||
1604 | 109 | %if line['index']==0: | ||
1605 | 110 | <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1606 | 111 | %else: | ||
1607 | 112 | <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td> | ||
1608 | 113 | %endif | ||
1609 | 114 | %if line['index']==0: | ||
1610 | 115 | <td class="right_with_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1611 | 116 | %else: | ||
1612 | 117 | <td class="right_without_line">${ formatLang(line['amount']) or ''| entity}</td> | ||
1613 | 118 | %endif | ||
1614 | 119 | <td></td> | ||
1615 | 120 | </tr> | ||
1616 | 121 | %endfor | ||
1617 | 122 | %endfor | ||
1618 | 123 | </tbody> | ||
1619 | 124 | </table> | ||
1620 | 125 | <div style="page-break-inside: avoid;"> | ||
1621 | 126 | <br/> | ||
1622 | 127 | <table style="width:100%; " border="1"> | ||
1623 | 128 | <tr style="border-style:ridge;border-width:5px"> | ||
1624 | 129 | <td colspan="3" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td> | ||
1625 | 130 | </tr> | ||
1626 | 131 | <tr> | ||
1627 | 132 | <td rowspan="2" style="vertical-align:text-top;padding:10"> | ||
1628 | 133 | <table style="width:100%;"> | ||
1629 | 134 | <tr> | ||
1630 | 135 | <th style="text-align:left">Descrizione</th> | ||
1631 | 136 | <th style="text-align:right">Imponibile</th> | ||
1632 | 137 | <th style="text-align:right">Imposta</th> | ||
1633 | 138 | </tr> | ||
1634 | 139 | %for tax_code in tax_codes : | ||
1635 | 140 | <tr> | ||
1636 | 141 | <td>${tax_code|entity} | ||
1637 | 142 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity} | ||
1638 | 143 | </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity} | ||
1639 | 144 | </td> | ||
1640 | 145 | </tr> | ||
1641 | 146 | %endfor | ||
1642 | 147 | </table> | ||
1643 | 148 | </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td> | ||
1644 | 149 | <td style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td> | ||
1645 | 150 | </tr> | ||
1646 | 151 | <tr> | ||
1647 | 152 | <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td> | ||
1648 | 153 | <td style="padding:10">Totale IVA:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td> | ||
1649 | 154 | </tr> | ||
1650 | 155 | </table> | ||
1651 | 156 | </div> | ||
1652 | 157 | </body> | ||
1653 | 158 | </html> | ||
1654 | 0 | 159 | ||
1655 | === added directory 'l10n_it_vat_registries/wizard' | |||
1656 | === added file 'l10n_it_vat_registries/wizard/__init__.py' | |||
1657 | --- l10n_it_vat_registries/wizard/__init__.py 1970-01-01 00:00:00 +0000 | |||
1658 | +++ l10n_it_vat_registries/wizard/__init__.py 2013-01-29 22:10:26 +0000 | |||
1659 | @@ -0,0 +1,22 @@ | |||
1660 | 1 | # -*- coding: utf-8 -*- | ||
1661 | 2 | ############################################################################## | ||
1662 | 3 | # | ||
1663 | 4 | # Copyright (C) 2011 Associazione OpenERP Italia | ||
1664 | 5 | # (<http://www.openerp-italia.org>). | ||
1665 | 6 | # | ||
1666 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1667 | 8 | # it under the terms of the GNU Affero General Public License as published | ||
1668 | 9 | # by the Free Software Foundation, either version 3 of the License, or | ||
1669 | 10 | # (at your option) any later version. | ||
1670 | 11 | # | ||
1671 | 12 | # This program is distributed in the hope that it will be useful, | ||
1672 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1673 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1674 | 15 | # GNU General Public License for more details. | ||
1675 | 16 | # | ||
1676 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1677 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1678 | 19 | # | ||
1679 | 20 | ############################################################################## | ||
1680 | 21 | |||
1681 | 22 | import print_registro_iva | ||
1682 | 0 | 23 | ||
1683 | === added file 'l10n_it_vat_registries/wizard/print_registro_iva.py' | |||
1684 | --- l10n_it_vat_registries/wizard/print_registro_iva.py 1970-01-01 00:00:00 +0000 | |||
1685 | +++ l10n_it_vat_registries/wizard/print_registro_iva.py 2013-01-29 22:10:26 +0000 | |||
1686 | @@ -0,0 +1,113 @@ | |||
1687 | 1 | # -*- encoding: utf-8 -*- | ||
1688 | 2 | ############################################################################## | ||
1689 | 3 | # | ||
1690 | 4 | # Copyright (C) 2011 Associazione OpenERP Italia | ||
1691 | 5 | # (<http://www.openerp-italia.org>). | ||
1692 | 6 | # | ||
1693 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1694 | 8 | # it under the terms of the GNU Affero General Public License as published | ||
1695 | 9 | # by the Free Software Foundation, either version 3 of the License, or | ||
1696 | 10 | # (at your option) any later version. | ||
1697 | 11 | # | ||
1698 | 12 | # This program is distributed in the hope that it will be useful, | ||
1699 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1700 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1701 | 15 | # GNU General Public License for more details. | ||
1702 | 16 | # | ||
1703 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1704 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1705 | 19 | # | ||
1706 | 20 | ############################################################################## | ||
1707 | 21 | |||
1708 | 22 | from osv import fields,osv | ||
1709 | 23 | from tools.translate import _ | ||
1710 | 24 | import time | ||
1711 | 25 | |||
1712 | 26 | class wizard_registro_iva(osv.osv_memory): | ||
1713 | 27 | |||
1714 | 28 | _name = "wizard.registro.iva" | ||
1715 | 29 | _columns = { | ||
1716 | 30 | 'date_from': fields.date('From date', required=True), | ||
1717 | 31 | 'date_to': fields.date('To date', required=True), | ||
1718 | 32 | 'type': fields.selection([ | ||
1719 | 33 | ('customer', 'Customer Invoices'), | ||
1720 | 34 | ('supplier', 'Supplier Invoices'), | ||
1721 | 35 | ('corrispettivi', 'Corrispettivi'), | ||
1722 | 36 | ], 'Layout', required=True), | ||
1723 | 37 | 'journal_ids': fields.many2many('account.journal', 'registro_iva_journals_rel', 'journal_id', 'registro_id', 'Journals', help='Select journals you want retrieve documents from', required=True), | ||
1724 | 38 | 'message': fields.char('Message', size=64, readonly=True), | ||
1725 | 39 | } | ||
1726 | 40 | _defaults = { | ||
1727 | 41 | 'type': 'customer', | ||
1728 | 42 | 'date_from': lambda * a: time.strftime('%Y-%m-%d'), | ||
1729 | 43 | 'date_to': lambda * a: time.strftime('%Y-%m-%d'), | ||
1730 | 44 | #'journal_ids': lambda s, cr, uid, c: s.pool.get('account.journal').search(cr, uid, []), | ||
1731 | 45 | } | ||
1732 | 46 | |||
1733 | 47 | def counterparts_number(self, move_line): | ||
1734 | 48 | counter = 0 | ||
1735 | 49 | if not move_line.credit: | ||
1736 | 50 | for line in move_line.move_id.line_id: | ||
1737 | 51 | if line.credit: | ||
1738 | 52 | counter += 1 | ||
1739 | 53 | elif not move_line.debit: | ||
1740 | 54 | for line in move_line.move_id.line_id: | ||
1741 | 55 | if line.debit: | ||
1742 | 56 | counter += 1 | ||
1743 | 57 | return counter | ||
1744 | 58 | |||
1745 | 59 | def print_registro(self, cr, uid, ids, context=None): | ||
1746 | 60 | move_ids = [] | ||
1747 | 61 | wizard = self.read(cr, uid, ids)[0] | ||
1748 | 62 | move_line_obj = self.pool.get('account.move.line') | ||
1749 | 63 | tax_pool = self.pool.get('account.tax') | ||
1750 | 64 | search_list = [] | ||
1751 | 65 | search_list = [ | ||
1752 | 66 | ('journal_id', 'in', wizard['journal_ids']), | ||
1753 | 67 | ('move_id.date', '<=', wizard['date_to']), | ||
1754 | 68 | ('move_id.date', '>=', wizard['date_from']), | ||
1755 | 69 | ('move_id.state', '=', 'posted'), | ||
1756 | 70 | ('tax_code_id', '!=', False), | ||
1757 | 71 | ] | ||
1758 | 72 | move_line_ids = move_line_obj.search(cr, uid, search_list, order='date') | ||
1759 | 73 | if context is None: | ||
1760 | 74 | context = {} | ||
1761 | 75 | for move_line in move_line_obj.browse(cr, uid, move_line_ids): | ||
1762 | 76 | # verifico che sia coinvolto un conto imposta legato ad un'imposta tramite conto standard o conto refund | ||
1763 | 77 | if move_line.tax_code_id.tax_ids or move_line.tax_code_id.ref_tax_ids: | ||
1764 | 78 | if move_line.tax_code_id.tax_ids: | ||
1765 | 79 | if not tax_pool._have_same_rate(move_line.tax_code_id.tax_ids): | ||
1766 | 80 | raise osv.except_osv(_('Error'), _('Taxes %s have different rates') | ||
1767 | 81 | % str(move_line.tax_code_id.tax_ids)) | ||
1768 | 82 | if move_line.tax_code_id.ref_tax_ids: | ||
1769 | 83 | if not tax_pool._have_same_rate(move_line.tax_code_id.ref_tax_ids): | ||
1770 | 84 | raise osv.except_osv(_('Error'), _('Taxes %s have different rates') | ||
1771 | 85 | % str(move_line.tax_code_id.ref_tax_ids)) | ||
1772 | 86 | # controllo che ogni tax code abbia una e una sola imposta | ||
1773 | 87 | ''' non posso farlo per via dell IVA inclusa nel prezzo | ||
1774 | 88 | if len(move_line.tax_code_id.tax_ids) != 1: | ||
1775 | 89 | raise osv.except_osv(_('Error'), _('Wrong tax configuration for tax code %s') | ||
1776 | 90 | % move_line.tax_code_id.name) | ||
1777 | 91 | ''' | ||
1778 | 92 | if move_line.move_id.id not in move_ids: | ||
1779 | 93 | move_ids.append(move_line.move_id.id) | ||
1780 | 94 | if not move_ids: | ||
1781 | 95 | self.write(cr, uid, ids, {'message': _('No documents found in the current selection')}) | ||
1782 | 96 | return True | ||
1783 | 97 | datas = {'ids': move_ids} | ||
1784 | 98 | datas['model'] = 'account.move' | ||
1785 | 99 | datas['form'] = wizard | ||
1786 | 100 | datas['move_ids'] = move_ids | ||
1787 | 101 | res= { | ||
1788 | 102 | 'type': 'ir.actions.report.xml', | ||
1789 | 103 | 'datas': datas, | ||
1790 | 104 | } | ||
1791 | 105 | if wizard['type'] == 'customer': | ||
1792 | 106 | res['report_name'] = 'registro_iva_vendite' | ||
1793 | 107 | elif wizard['type'] == 'supplier': | ||
1794 | 108 | res['report_name'] = 'registro_iva_acquisti' | ||
1795 | 109 | elif wizard['type'] == 'corrispettivi': | ||
1796 | 110 | res['report_name'] = 'registro_iva_corrispettivi' | ||
1797 | 111 | return res | ||
1798 | 112 | |||
1799 | 113 | wizard_registro_iva() | ||
1800 | 0 | 114 | ||
1801 | === added file 'l10n_it_vat_registries/wizard/print_registro_iva.xml' | |||
1802 | --- l10n_it_vat_registries/wizard/print_registro_iva.xml 1970-01-01 00:00:00 +0000 | |||
1803 | +++ l10n_it_vat_registries/wizard/print_registro_iva.xml 2013-01-29 22:10:26 +0000 | |||
1804 | @@ -0,0 +1,41 @@ | |||
1805 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
1806 | 2 | <openerp> | ||
1807 | 3 | <data> | ||
1808 | 4 | |||
1809 | 5 | <record id="wizard_registro_iva" model="ir.ui.view"> | ||
1810 | 6 | <field name="name">VAT Registry</field> | ||
1811 | 7 | <field name="model">wizard.registro.iva</field> | ||
1812 | 8 | <field name="type">form</field> | ||
1813 | 9 | <field name="arch" type="xml"> | ||
1814 | 10 | <form string="Tax Journal"> | ||
1815 | 11 | <field name="date_from"/> | ||
1816 | 12 | <field name="date_to"/> | ||
1817 | 13 | <field name="type" colspan="4"/> | ||
1818 | 14 | <separator string="Journals" colspan="4"/> | ||
1819 | 15 | <field name="journal_ids" colspan="4" nolabel="1" height="250"/> | ||
1820 | 16 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | ||
1821 | 17 | <button icon="gtk-ok" name="print_registro" string="Print" type="object"/> | ||
1822 | 18 | <newline/> | ||
1823 | 19 | <field name="message" nolabel="1" colspan="4"/> | ||
1824 | 20 | </form> | ||
1825 | 21 | </field> | ||
1826 | 22 | </record> | ||
1827 | 23 | |||
1828 | 24 | <record id="action_registro_iva" model="ir.actions.act_window"> | ||
1829 | 25 | <field name="name">VAT Registry</field> | ||
1830 | 26 | <field name="type">ir.actions.act_window</field> | ||
1831 | 27 | <field name="res_model">wizard.registro.iva</field> | ||
1832 | 28 | <field name="view_type">form</field> | ||
1833 | 29 | <field name="view_mode">form</field> | ||
1834 | 30 | <field name="target">new</field> | ||
1835 | 31 | </record> | ||
1836 | 32 | |||
1837 | 33 | <menuitem | ||
1838 | 34 | name="VAT Registries" | ||
1839 | 35 | parent="account.menu_finance_reporting" | ||
1840 | 36 | action="action_registro_iva" | ||
1841 | 37 | id="menu_registro_iva" | ||
1842 | 38 | icon="STOCK_PRINT"/> | ||
1843 | 39 | |||
1844 | 40 | </data> | ||
1845 | 41 | </openerp> |
Anche qui, rimuoverei ovunque la scritta 'All Rights Reserved'.