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