Merge lp:~a-camilli/openobject-italia/7.0-libro_giornale into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
- 7.0-libro_giornale
- Merge into italian-addons-7.0
Status: | Merged |
---|---|
Approved by: | Alessandro Camilli |
Approved revision: | 237 |
Merged at revision: | 239 |
Proposed branch: | lp:~a-camilli/openobject-italia/7.0-libro_giornale |
Merge into: | lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0 |
Diff against target: |
1331 lines (+1250/-0) 15 files modified
account_central_journal/AUTHORS.txt (+2/-0) account_central_journal/__init__.py (+25/-0) account_central_journal/__openerp__.py (+47/-0) account_central_journal/account.py (+42/-0) account_central_journal/account_view.xml (+27/-0) account_central_journal/i18n/account_central_journal.pot (+235/-0) account_central_journal/i18n/it.po (+233/-0) account_central_journal/report/__init__.py (+22/-0) account_central_journal/report/central_journal_report.mako (+190/-0) account_central_journal/report/central_journal_report.py (+89/-0) account_central_journal/report/report.xml (+15/-0) account_central_journal/report/webkit_model.xml (+107/-0) account_central_journal/wizard/__init__.py (+22/-0) account_central_journal/wizard/central_journal_report.py (+135/-0) account_central_journal/wizard/central_journal_report.xml (+59/-0) |
To merge this branch: | bzr merge lp:~a-camilli/openobject-italia/7.0-libro_giornale |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini | code review | Approve | |
Francesco Apruzzese (community) | Approve | ||
andrea_cg (community) | Approve | ||
Review via email: mp+208756@code.launchpad.net |
Commit message
Description of the change
Porting dalla 6.1
Francesco Apruzzese (opencode) wrote : | # |
Interessante! Approve!
Lorenzo Battistini (elbati) wrote : | # |
Riporto il diff per completezza
Lorenzo Battistini (elbati) wrote : | # |
Ciao Alessandro, Grazie.
Non credo sia corretto rimuovere il
noupdate="1"
in quanto se un utente modificasse l'header del report a proprio piacere e successivamente aggiornasse il modulo, perderebbe le modifiche fatte.
Alessandro Camilli (a-camilli) wrote : | # |
In effetti io ho pensato solo al fatto che se la comunità aggiorna l'header per correggere un bug mi sembrava giusto fare il replace di quello esistente.
In questo caso (di una aggiornamento dell'header dovuto ad un bug), come si deve comportare un utente che manualmente va a cambiare quello caricato dalla prima installazione?
- 237. By Alessandro Camilli
-
noupdate attivo su header
Lorenzo Battistini (elbati) wrote : | # |
In questo caso non è un bug ma una modifica necessaria al passaggio di versione. Quindi la modifica teoricamente dovrebbe essere messa in uno script di migrazione. In mancanza di questo, si può sempre modificare a mano.
In generale, tutti i dati di "configurazione" (vedi gli header webkit, ma anche le sequenze, le traduzioni, le imposte e tante oltre cose) non dovrebbero essere sovrascritte dall'aggiornamento dei moduli. Altrimenti le modifiche fatte dagli utenti o amministratori di sistema sarebbero vane
Alessandro Camilli (a-camilli) wrote : | # |
grazie. Ora penso dovrebbe andar bene.
Lorenzo Battistini (elbati) : | # |
Preview Diff
1 | === added directory 'account_central_journal' |
2 | === added file 'account_central_journal/AUTHORS.txt' |
3 | --- account_central_journal/AUTHORS.txt 1970-01-01 00:00:00 +0000 |
4 | +++ account_central_journal/AUTHORS.txt 2014-03-06 15:06:22 +0000 |
5 | @@ -0,0 +1,2 @@ |
6 | +Daniele Arcangeli <d.arcangeli@isa.it> |
7 | +Alessandro Camilli <a.camilli@yahoo.it> |
8 | \ No newline at end of file |
9 | |
10 | === added file 'account_central_journal/__init__.py' |
11 | --- account_central_journal/__init__.py 1970-01-01 00:00:00 +0000 |
12 | +++ account_central_journal/__init__.py 2014-03-06 15:06:22 +0000 |
13 | @@ -0,0 +1,25 @@ |
14 | +# -*- coding: utf-8 -*- |
15 | +############################################################################## |
16 | +# |
17 | +# OpenERP, Open Source Management Solution |
18 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
19 | +# |
20 | +# This program is free software: you can redistribute it and/or modify |
21 | +# it under the terms of the GNU Affero General Public License as |
22 | +# published by the Free Software Foundation, either version 3 of the |
23 | +# License, or (at your option) any later version. |
24 | +# |
25 | +# This program is distributed in the hope that it will be useful, |
26 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
27 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
28 | +# GNU Affero General Public License for more details. |
29 | +# |
30 | +# You should have received a copy of the GNU Affero General Public License |
31 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
32 | +# |
33 | +############################################################################## |
34 | + |
35 | +import account |
36 | +import wizard |
37 | +import report |
38 | + |
39 | |
40 | === added file 'account_central_journal/__openerp__.py' |
41 | --- account_central_journal/__openerp__.py 1970-01-01 00:00:00 +0000 |
42 | +++ account_central_journal/__openerp__.py 2014-03-06 15:06:22 +0000 |
43 | @@ -0,0 +1,47 @@ |
44 | +# -*- coding: utf-8 -*- |
45 | +############################################################################## |
46 | +# |
47 | +# OpenERP, Open Source Management Solution |
48 | +# Copyright (C) 2011 ISA s.r.l. (<http://www.isa.it>). |
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 |
52 | +# published by the Free Software Foundation, either version 3 of the |
53 | +# License, or (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 Affero 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 | +{ |
66 | + 'name': 'Account Central Journal', |
67 | + 'version': '3', |
68 | + 'author': "ISA S.r.l.", |
69 | + 'website': 'http://www.isa.it', |
70 | + 'category': 'Generic Modules/Accounting', |
71 | + 'description': """ |
72 | +Managing the printing of the "Central Journal" """, |
73 | + 'depends' : [ |
74 | + 'base', |
75 | + 'account', |
76 | + 'report_webkit', |
77 | + ], |
78 | + 'init_xml' : [], |
79 | + 'update_xml': [ |
80 | + 'report/webkit_model.xml', |
81 | + 'report/report.xml', |
82 | + 'wizard/central_journal_report.xml', |
83 | + 'account_view.xml', |
84 | + ], |
85 | + 'demo_xml': [], |
86 | + 'test':[], |
87 | + 'installable': True, |
88 | + 'active': False, |
89 | + 'certificate': '', |
90 | +} |
91 | |
92 | === added file 'account_central_journal/account.py' |
93 | --- account_central_journal/account.py 1970-01-01 00:00:00 +0000 |
94 | +++ account_central_journal/account.py 2014-03-06 15:06:22 +0000 |
95 | @@ -0,0 +1,42 @@ |
96 | +# -*- coding: utf-8 -*- |
97 | +############################################################################## |
98 | +# |
99 | +# OpenERP, Open Source Management Solution |
100 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
101 | +# |
102 | +# This program is free software: you can redistribute it and/or modify |
103 | +# it under the terms of the GNU Affero General Public License as |
104 | +# published by the Free Software Foundation, either version 3 of the |
105 | +# License, or (at your option) any later version. |
106 | +# |
107 | +# This program is distributed in the hope that it will be useful, |
108 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
109 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
110 | +# GNU Affero General Public License for more details. |
111 | +# |
112 | +# You should have received a copy of the GNU Affero General Public License |
113 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
114 | +# |
115 | +############################################################################## |
116 | + |
117 | +from osv import fields, orm |
118 | +from tools.translate import _ |
119 | +import decimal_precision as dp |
120 | + |
121 | +class account_fiscalyear(orm.Model): |
122 | + _inherit = "account.fiscalyear" |
123 | + _description = "Fiscal Year" |
124 | + _columns = { |
125 | + 'date_last_print': fields.date('Last printed date', readonly=True), |
126 | + 'progressive_page_number': fields.integer('Progressive of the page', required=True, readonly=True), |
127 | + 'progressive_line_number': fields.integer('Progressive line', required=True, readonly=True), |
128 | + 'progressive_credit': fields.float('Progressive Credit', digits_compute=dp.get_precision('Account'), required=True, readonly=True), |
129 | + 'progressive_debit': fields.float('Progressive Debit', digits_compute=dp.get_precision('Account'), required=True, readonly=True), |
130 | + } |
131 | + |
132 | + _defaults = { |
133 | + 'progressive_page_number': 0, |
134 | + 'progressive_line_number': 0, |
135 | + 'progressive_credit': lambda *a: float(), |
136 | + 'progressive_debit': lambda *a: float(), |
137 | + } |
138 | |
139 | === added file 'account_central_journal/account_view.xml' |
140 | --- account_central_journal/account_view.xml 1970-01-01 00:00:00 +0000 |
141 | +++ account_central_journal/account_view.xml 2014-03-06 15:06:22 +0000 |
142 | @@ -0,0 +1,27 @@ |
143 | +<?xml version="1.0" encoding="utf-8"?> |
144 | +<openerp> |
145 | + <data> |
146 | + |
147 | + <!-- |
148 | + Account Fiscal Year inheritancy |
149 | + --> |
150 | + |
151 | + <record id="account_central_journal_form_view" model="ir.ui.view"> |
152 | + <field name="name">account.central.journal.form</field> |
153 | + <field name="model">account.fiscalyear</field> |
154 | + <field name="inherit_id" ref="account.view_account_fiscalyear_form"/> |
155 | + <field name="arch" type="xml"> |
156 | + <field name="end_journal_period_id" position="after"> |
157 | + <separator colspan="4" string="Central journal info"/> |
158 | + <field name="date_last_print"/> |
159 | + <newline/> |
160 | + <field name="progressive_page_number"/> |
161 | + <field name="progressive_line_number"/> |
162 | + <field name="progressive_credit"/> |
163 | + <field name="progressive_debit"/> |
164 | + </field> |
165 | + </field> |
166 | + </record> |
167 | + |
168 | + </data> |
169 | +</openerp> |
170 | |
171 | === added directory 'account_central_journal/i18n' |
172 | === added file 'account_central_journal/i18n/account_central_journal.pot' |
173 | --- account_central_journal/i18n/account_central_journal.pot 1970-01-01 00:00:00 +0000 |
174 | +++ account_central_journal/i18n/account_central_journal.pot 2014-03-06 15:06:22 +0000 |
175 | @@ -0,0 +1,235 @@ |
176 | +# Translation of OpenERP Server. |
177 | +# This file contains the translation of the following modules: |
178 | +# * account_central_journal |
179 | +# |
180 | +msgid "" |
181 | +msgstr "" |
182 | +"Project-Id-Version: OpenERP Server 6.0.3\n" |
183 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
184 | +"POT-Creation-Date: 2012-03-16 14:39+0000\n" |
185 | +"PO-Revision-Date: 2012-03-16 14:39+0000\n" |
186 | +"Last-Translator: <>\n" |
187 | +"Language-Team: \n" |
188 | +"MIME-Version: 1.0\n" |
189 | +"Content-Type: text/plain; charset=UTF-8\n" |
190 | +"Content-Transfer-Encoding: \n" |
191 | +"Plural-Forms: \n" |
192 | + |
193 | +#. module: account_central_journal |
194 | +#: model:ir.actions.act_window,name:account_central_journal.central_journal_report_action |
195 | +#: model:ir.ui.menu,name:account_central_journal.menu_central_journal_report_action |
196 | +msgid "Print Central Journal" |
197 | +msgstr "" |
198 | + |
199 | +#. module: account_central_journal |
200 | +#: report:report.central_journal_report:135 |
201 | +msgid "Account code" |
202 | +msgstr "" |
203 | + |
204 | +#. module: account_central_journal |
205 | +#: report:report.central_journal_report:144 |
206 | +#: report:report.central_journal_report:170 |
207 | +msgid "Progressives =>" |
208 | +msgstr "" |
209 | + |
210 | +#. module: account_central_journal |
211 | +#: model:ir.model,name:account_central_journal.model_central_journal_report |
212 | +#: model:ir.model,name:account_central_journal.model_wizard_central_journal_report |
213 | +#: view:wizard.central.journal.report:0 |
214 | +msgid "Printing parameters of the Center Journal" |
215 | +msgstr "" |
216 | + |
217 | +#. module: account_central_journal |
218 | +#: field:wizard.central.journal.report,print_state:0 |
219 | +msgid "State" |
220 | +msgstr "" |
221 | + |
222 | +#. module: account_central_journal |
223 | +#: selection:wizard.central.journal.report,print_state:0 |
224 | +msgid "Draft" |
225 | +msgstr "" |
226 | + |
227 | +#. module: account_central_journal |
228 | +#: report:report.central_journal_report:134 |
229 | +msgid "Account move" |
230 | +msgstr "" |
231 | + |
232 | +#. module: account_central_journal |
233 | +#: report:report.central_journal_report:138 |
234 | +msgid "Debit" |
235 | +msgstr "" |
236 | + |
237 | +#. module: account_central_journal |
238 | +#: view:wizard.central.journal.report:0 |
239 | +msgid "Print" |
240 | +msgstr "" |
241 | + |
242 | +#. module: account_central_journal |
243 | +#: field:account.fiscalyear,progressive_credit:0 |
244 | +msgid "Progressive Credit" |
245 | +msgstr "" |
246 | + |
247 | +#. module: account_central_journal |
248 | +#: model:ir.module.module,description:account_central_journal.module_meta_information |
249 | +msgid "\n" |
250 | +"Managing the printing of the \"Central Journal\" " |
251 | +msgstr "" |
252 | + |
253 | +#. module: account_central_journal |
254 | +#: constraint:account.fiscalyear:0 |
255 | +msgid "Error! You cannot define overlapping fiscal years" |
256 | +msgstr "" |
257 | + |
258 | +#. module: account_central_journal |
259 | +#: report:report.central_journal_report:133 |
260 | +msgid "Ref" |
261 | +msgstr "" |
262 | + |
263 | +#. module: account_central_journal |
264 | +#: field:account.fiscalyear,date_last_print:0 |
265 | +msgid "Last printed date" |
266 | +msgstr "" |
267 | + |
268 | +#. module: account_central_journal |
269 | +#: selection:wizard.central.journal.report,print_state:0 |
270 | +msgid "Printed" |
271 | +msgstr "" |
272 | + |
273 | +#. module: account_central_journal |
274 | +#: report:report.central_journal_report:136 |
275 | +msgid "Account name" |
276 | +msgstr "" |
277 | + |
278 | +#. module: account_central_journal |
279 | +#: report:report.central_journal_report:132 |
280 | +msgid "Date" |
281 | +msgstr "" |
282 | + |
283 | +#. module: account_central_journal |
284 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:51 |
285 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:54 |
286 | +#, python-format |
287 | +msgid "Wrong dates !" |
288 | +msgstr "" |
289 | + |
290 | +#. module: account_central_journal |
291 | +#: view:wizard.central.journal.report:0 |
292 | +msgid "Dates movements" |
293 | +msgstr "" |
294 | + |
295 | +#. module: account_central_journal |
296 | +#: field:account.fiscalyear,progressive_debit:0 |
297 | +msgid "Progressive Debit" |
298 | +msgstr "" |
299 | + |
300 | +#. module: account_central_journal |
301 | +#: report:report.central_journal_report:124 |
302 | +#: field:wizard.central.journal.report,date_move_line_to:0 |
303 | +msgid "to date" |
304 | +msgstr "" |
305 | + |
306 | +#. module: account_central_journal |
307 | +#: report:report.central_journal_report:137 |
308 | +msgid "Name" |
309 | +msgstr "" |
310 | + |
311 | +#. module: account_central_journal |
312 | +#: model:ir.module.module,shortdesc:account_central_journal.module_meta_information |
313 | +msgid "Account Central Journal" |
314 | +msgstr "" |
315 | + |
316 | +#. module: account_central_journal |
317 | +#: field:account.fiscalyear,progressive_line_number:0 |
318 | +msgid "Progressive line" |
319 | +msgstr "" |
320 | + |
321 | +#. module: account_central_journal |
322 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:54 |
323 | +#, python-format |
324 | +msgid "The end date can not be greater than today's date." |
325 | +msgstr "" |
326 | + |
327 | +#. module: account_central_journal |
328 | +#: report:report.central_journal_report:139 |
329 | +msgid "Credit" |
330 | +msgstr "" |
331 | + |
332 | +#. module: account_central_journal |
333 | +#: model:ir.model,name:account_central_journal.model_account_fiscalyear |
334 | +#: field:wizard.central.journal.report,fiscalyear:0 |
335 | +msgid "Fiscal Year" |
336 | +msgstr "" |
337 | + |
338 | +#. module: account_central_journal |
339 | +#: constraint:account.fiscalyear:0 |
340 | +msgid "Error! The duration of the Fiscal Year is invalid. " |
341 | +msgstr "" |
342 | + |
343 | +#. module: account_central_journal |
344 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:51 |
345 | +#, python-format |
346 | +msgid "The end date must be greater than the initial date." |
347 | +msgstr "" |
348 | + |
349 | +#. module: account_central_journal |
350 | +#: view:wizard.central.journal.report:0 |
351 | +msgid "Reference" |
352 | +msgstr "" |
353 | + |
354 | +#. module: account_central_journal |
355 | +#: model:ir.actions.report.xml,name:account_central_journal.central_journal_report_id |
356 | +msgid "central_journal" |
357 | +msgstr "" |
358 | + |
359 | +#. module: account_central_journal |
360 | +#: field:account.fiscalyear,progressive_page_number:0 |
361 | +msgid "Progressive of the page" |
362 | +msgstr "" |
363 | + |
364 | +#. module: account_central_journal |
365 | +#: report:report.central_journal_report:124 |
366 | +msgid "TEST PRINTING" |
367 | +msgstr "" |
368 | + |
369 | +#. module: account_central_journal |
370 | +#: view:account.fiscalyear:0 |
371 | +msgid "Central journal info" |
372 | +msgstr "" |
373 | + |
374 | +#. module: account_central_journal |
375 | +#: report:report.central_journal_report:127 |
376 | +msgid "Page:" |
377 | +msgstr "" |
378 | + |
379 | +#. module: account_central_journal |
380 | +#: report:report.central_journal_report:124 |
381 | +#: field:wizard.central.journal.report,date_move_line_from:0 |
382 | +#: field:wizard.central.journal.report,date_move_line_from_view:0 |
383 | +msgid "From date" |
384 | +msgstr "" |
385 | + |
386 | +#. module: account_central_journal |
387 | +#: selection:wizard.central.journal.report,print_state:0 |
388 | +msgid "Ready for printing" |
389 | +msgstr "" |
390 | + |
391 | +#. module: account_central_journal |
392 | +#: view:wizard.central.journal.report:0 |
393 | +msgid "Cancel" |
394 | +msgstr "" |
395 | + |
396 | +#. module: account_central_journal |
397 | +#: report:report.central_journal_report:131 |
398 | +msgid "Row" |
399 | +msgstr "" |
400 | + |
401 | +#. module: account_central_journal |
402 | +#: view:wizard.central.journal.report:0 |
403 | +msgid "Final print" |
404 | +msgstr "" |
405 | + |
406 | +#. module: account_central_journal |
407 | +#: report:report.central_journal_report:116 |
408 | +msgid "ACCOUNT JOURNAL" |
409 | +msgstr "" |
410 | + |
411 | |
412 | === added file 'account_central_journal/i18n/it.mo' |
413 | Binary files account_central_journal/i18n/it.mo 1970-01-01 00:00:00 +0000 and account_central_journal/i18n/it.mo 2014-03-06 15:06:22 +0000 differ |
414 | === added file 'account_central_journal/i18n/it.po' |
415 | --- account_central_journal/i18n/it.po 1970-01-01 00:00:00 +0000 |
416 | +++ account_central_journal/i18n/it.po 2014-03-06 15:06:22 +0000 |
417 | @@ -0,0 +1,233 @@ |
418 | +msgid "" |
419 | +msgstr "" |
420 | +"Project-Id-Version: Account Central Journal\n" |
421 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
422 | +"POT-Creation-Date: 2012-03-16 14:39+0000\n" |
423 | +"PO-Revision-Date: \n" |
424 | +"Last-Translator: Daniele Arcangeli <d.arcangeli@isa.it>\n" |
425 | +"Language-Team: \n" |
426 | +"MIME-Version: 1.0\n" |
427 | +"Content-Type: text/plain; charset=UTF-8\n" |
428 | +"Content-Transfer-Encoding: 8bit\n" |
429 | + |
430 | +#. module: account_central_journal |
431 | +#: model:ir.actions.act_window,name:account_central_journal.central_journal_report_action |
432 | +#: model:ir.ui.menu,name:account_central_journal.menu_central_journal_report_action |
433 | +msgid "Print Central Journal" |
434 | +msgstr "Giornale Centralizzato" |
435 | + |
436 | +#. module: account_central_journal |
437 | +#: report:report.central_journal_report:135 |
438 | +msgid "Account code" |
439 | +msgstr "Codice Conto" |
440 | + |
441 | +#. module: account_central_journal |
442 | +#: report:report.central_journal_report:144 |
443 | +#: report:report.central_journal_report:170 |
444 | +msgid "Progressives =>" |
445 | +msgstr "Progressivi =>" |
446 | + |
447 | +#. module: account_central_journal |
448 | +#: model:ir.model,name:account_central_journal.model_central_journal_report |
449 | +#: model:ir.model,name:account_central_journal.model_wizard_central_journal_report |
450 | +#: view:wizard.central.journal.report:0 |
451 | +msgid "Printing parameters of the Center Journal" |
452 | +msgstr "Parametri di stampa del Giornale Centralizzato" |
453 | + |
454 | +#. module: account_central_journal |
455 | +#: field:wizard.central.journal.report,print_state:0 |
456 | +msgid "State" |
457 | +msgstr "Stato" |
458 | + |
459 | +#. module: account_central_journal |
460 | +#: selection:wizard.central.journal.report,print_state:0 |
461 | +msgid "Draft" |
462 | +msgstr "Bozza" |
463 | + |
464 | +#. module: account_central_journal |
465 | +#: report:report.central_journal_report:134 |
466 | +msgid "Account move" |
467 | +msgstr "Movimento" |
468 | + |
469 | +#. module: account_central_journal |
470 | +#: report:report.central_journal_report:138 |
471 | +msgid "Debit" |
472 | +msgstr "Dare" |
473 | + |
474 | +#. module: account_central_journal |
475 | +#: view:wizard.central.journal.report:0 |
476 | +msgid "Print" |
477 | +msgstr "Stampa" |
478 | + |
479 | +#. module: account_central_journal |
480 | +#: field:account.fiscalyear,progressive_credit:0 |
481 | +msgid "Progressive Credit" |
482 | +msgstr "Progressivo Avere" |
483 | + |
484 | +#. module: account_central_journal |
485 | +#: model:ir.module.module,description:account_central_journal.module_meta_information |
486 | +msgid "" |
487 | +"\n" |
488 | +"Managing the printing of the \"Central Journal\" " |
489 | +msgstr "" |
490 | +"\n" |
491 | +"Gestione della stampa del \"Giornale Centralizzato\"" |
492 | + |
493 | +#. module: account_central_journal |
494 | +#: constraint:account.fiscalyear:0 |
495 | +msgid "Error! You cannot define overlapping fiscal years" |
496 | +msgstr "Errore! Non è possibile definire una sovrapposizione degli anni fiscali." |
497 | + |
498 | +#. module: account_central_journal |
499 | +#: report:report.central_journal_report:133 |
500 | +msgid "Ref" |
501 | +msgstr "Rif." |
502 | + |
503 | +#. module: account_central_journal |
504 | +#: field:account.fiscalyear,date_last_print:0 |
505 | +msgid "Last printed date" |
506 | +msgstr "Data ultima stampa" |
507 | + |
508 | +#. module: account_central_journal |
509 | +#: selection:wizard.central.journal.report,print_state:0 |
510 | +msgid "Printed" |
511 | +msgstr "Stampato" |
512 | + |
513 | +#. module: account_central_journal |
514 | +#: report:report.central_journal_report:136 |
515 | +msgid "Account name" |
516 | +msgstr "Conto" |
517 | + |
518 | +#. module: account_central_journal |
519 | +#: report:report.central_journal_report:132 |
520 | +msgid "Date" |
521 | +msgstr "Data" |
522 | + |
523 | +#. module: account_central_journal |
524 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:51 |
525 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:54 |
526 | +#, python-format |
527 | +msgid "Wrong dates !" |
528 | +msgstr "Date errate !" |
529 | + |
530 | +#. module: account_central_journal |
531 | +#: view:wizard.central.journal.report:0 |
532 | +msgid "Dates movements" |
533 | +msgstr "Date dei movimenti" |
534 | + |
535 | +#. module: account_central_journal |
536 | +#: field:account.fiscalyear,progressive_debit:0 |
537 | +msgid "Progressive Debit" |
538 | +msgstr "Progressivo Dare" |
539 | + |
540 | +#. module: account_central_journal |
541 | +#: report:report.central_journal_report:124 |
542 | +#: field:wizard.central.journal.report,date_move_line_to:0 |
543 | +msgid "to date" |
544 | +msgstr "alla data" |
545 | + |
546 | +#. module: account_central_journal |
547 | +#: report:report.central_journal_report:137 |
548 | +msgid "Name" |
549 | +msgstr "Descrizione movimento" |
550 | + |
551 | +#. module: account_central_journal |
552 | +#: model:ir.module.module,shortdesc:account_central_journal.module_meta_information |
553 | +msgid "Account Central Journal" |
554 | +msgstr "Giornale Centralizzato" |
555 | + |
556 | +#. module: account_central_journal |
557 | +#: field:account.fiscalyear,progressive_line_number:0 |
558 | +msgid "Progressive line" |
559 | +msgstr "Progressivo della riga" |
560 | + |
561 | +#. module: account_central_journal |
562 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:54 |
563 | +#, python-format |
564 | +msgid "The end date can not be greater than today's date." |
565 | +msgstr "La data finale non può essere maggiore della data odierna" |
566 | + |
567 | +#. module: account_central_journal |
568 | +#: report:report.central_journal_report:139 |
569 | +msgid "Credit" |
570 | +msgstr "Avere" |
571 | + |
572 | +#. module: account_central_journal |
573 | +#: model:ir.model,name:account_central_journal.model_account_fiscalyear |
574 | +#: field:wizard.central.journal.report,fiscalyear:0 |
575 | +msgid "Fiscal Year" |
576 | +msgstr "Anno Fiscale" |
577 | + |
578 | +#. module: account_central_journal |
579 | +#: constraint:account.fiscalyear:0 |
580 | +msgid "Error! The duration of the Fiscal Year is invalid. " |
581 | +msgstr "Errore! La durata dell'anno fiscale non è valida." |
582 | + |
583 | +#. module: account_central_journal |
584 | +#: code:addons/account_central_journal/wizard/central_journal_report.py:51 |
585 | +#, python-format |
586 | +msgid "The end date must be greater than the initial date." |
587 | +msgstr "La data finale deve essere maggiore della data iniziale" |
588 | + |
589 | +#. module: account_central_journal |
590 | +#: view:wizard.central.journal.report:0 |
591 | +msgid "Reference" |
592 | +msgstr "Riferimento" |
593 | + |
594 | +#. module: account_central_journal |
595 | +#: model:ir.actions.report.xml,name:account_central_journal.central_journal_report_id |
596 | +msgid "central_journal" |
597 | +msgstr "Giornale Centralizzato Report Webkit" |
598 | + |
599 | +#. module: account_central_journal |
600 | +#: field:account.fiscalyear,progressive_page_number:0 |
601 | +msgid "Progressive of the page" |
602 | +msgstr "Progressivo della pagina" |
603 | + |
604 | +#. module: account_central_journal |
605 | +#: report:report.central_journal_report:124 |
606 | +msgid "TEST PRINTING" |
607 | +msgstr "STAMPA DI PROVA" |
608 | + |
609 | +#. module: account_central_journal |
610 | +#: view:account.fiscalyear:0 |
611 | +msgid "Central journal info" |
612 | +msgstr "Informazione del Giornale Centralizzato" |
613 | + |
614 | +#. module: account_central_journal |
615 | +#: report:report.central_journal_report:127 |
616 | +msgid "Page:" |
617 | +msgstr "Pagina:" |
618 | + |
619 | +#. module: account_central_journal |
620 | +#: report:report.central_journal_report:124 |
621 | +#: field:wizard.central.journal.report,date_move_line_from:0 |
622 | +#: field:wizard.central.journal.report,date_move_line_from_view:0 |
623 | +msgid "From date" |
624 | +msgstr "Dalla data" |
625 | + |
626 | +#. module: account_central_journal |
627 | +#: selection:wizard.central.journal.report,print_state:0 |
628 | +msgid "Ready for printing" |
629 | +msgstr "Pronto per la stampa" |
630 | + |
631 | +#. module: account_central_journal |
632 | +#: view:wizard.central.journal.report:0 |
633 | +msgid "Cancel" |
634 | +msgstr "Annulla" |
635 | + |
636 | +#. module: account_central_journal |
637 | +#: report:report.central_journal_report:131 |
638 | +msgid "Row" |
639 | +msgstr "N.riga" |
640 | + |
641 | +#. module: account_central_journal |
642 | +#: view:wizard.central.journal.report:0 |
643 | +msgid "Final print" |
644 | +msgstr "Stampa definitiva" |
645 | + |
646 | +#. module: account_central_journal |
647 | +#: report:report.central_journal_report:116 |
648 | +msgid "ACCOUNT JOURNAL" |
649 | +msgstr "Giornale di Contabilità" |
650 | + |
651 | |
652 | === added directory 'account_central_journal/report' |
653 | === added file 'account_central_journal/report/__init__.py' |
654 | --- account_central_journal/report/__init__.py 1970-01-01 00:00:00 +0000 |
655 | +++ account_central_journal/report/__init__.py 2014-03-06 15:06:22 +0000 |
656 | @@ -0,0 +1,22 @@ |
657 | +# -*- coding: utf-8 -*- |
658 | +############################################################################## |
659 | +# |
660 | +# OpenERP, Open Source Management Solution |
661 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
662 | +# |
663 | +# This program is free software: you can redistribute it and/or modify |
664 | +# it under the terms of the GNU Affero General Public License as |
665 | +# published by the Free Software Foundation, either version 3 of the |
666 | +# License, or (at your option) any later version. |
667 | +# |
668 | +# This program is distributed in the hope that it will be useful, |
669 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
670 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
671 | +# GNU Affero General Public License for more details. |
672 | +# |
673 | +# You should have received a copy of the GNU Affero General Public License |
674 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
675 | +# |
676 | +############################################################################## |
677 | + |
678 | +import central_journal_report |
679 | |
680 | === added file 'account_central_journal/report/central_journal_report.mako' |
681 | --- account_central_journal/report/central_journal_report.mako 1970-01-01 00:00:00 +0000 |
682 | +++ account_central_journal/report/central_journal_report.mako 2014-03-06 15:06:22 +0000 |
683 | @@ -0,0 +1,190 @@ |
684 | +<html> |
685 | +<head> |
686 | + <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> |
687 | + <style type="text/css"> |
688 | + ${css} |
689 | + |
690 | + .page_block { |
691 | + page-break-after: always; |
692 | + width: 100%; |
693 | + } |
694 | + .page_table { |
695 | + width: 100%; |
696 | + } |
697 | + .p_row { |
698 | + page-break-inside: avoid; |
699 | + vertical-align:text-top; |
700 | + height: 21px; |
701 | + } |
702 | + .p_cell { |
703 | + overflow: hidden; |
704 | + padding: 1px 5px; |
705 | + } |
706 | + .p_text { |
707 | + color: black; |
708 | + font-size: 9px; |
709 | + font-family: "Courier New", Courier, monospace; |
710 | + } |
711 | + .p_cell_debit, .p_cell_credit { |
712 | + text-align: right; |
713 | + } |
714 | + |
715 | + .p_row_head { |
716 | + border: 1px solid black; |
717 | + border-width: 1px 0px; |
718 | + } |
719 | + .p_cell_head { |
720 | + font-weight: bold; |
721 | + padding: 3px 5px; |
722 | + } |
723 | + |
724 | + .p_row_page { |
725 | + font-weight: bold; |
726 | + } |
727 | + .p_cell_test { |
728 | + padding: 5px 5px; |
729 | + } |
730 | + .p_cell_page { |
731 | + padding: 5px 5px; |
732 | + text-align: right; |
733 | + } |
734 | + |
735 | + .p_row_total { |
736 | + font-weight: bold; |
737 | + border: 1px solid gray; |
738 | + } |
739 | + .p_row_total_up { |
740 | + border-width: 0px 0px 1px 0px; |
741 | + } |
742 | + .p_row_total_down { |
743 | + border-width: 1px 0px 0px 0px; |
744 | + } |
745 | + .p_cell_progressive { |
746 | + padding: 3px 5px; |
747 | + text-align: right; |
748 | + } |
749 | + |
750 | + /* COLUMNS WIDTH |
751 | + .p_cell_progr_row { width: 15px;} |
752 | + .p_cell_date { width: 45px;} |
753 | + .p_cell_ref { width: 70px;} |
754 | + .p_cell_move_id_name { width: 70px;} |
755 | + .p_cell_account_id_code { width: 50px;} |
756 | + .p_cell_account_id_name { width: 200px;} |
757 | + .p_cell_name { width: 250px;} |
758 | + .p_cell_debit { width: 70px;} |
759 | + .p_cell_credit { width: 70px;} |
760 | + */ |
761 | + </style> |
762 | +</head> |
763 | + |
764 | +<body> |
765 | + <% |
766 | + flag_print_final = data["print_final"] |
767 | + fiscalyear_id = data["form"]["fiscalyear"] |
768 | + date_from = data["form"]["date_move_line_from"] |
769 | + date_to = data["form"]["date_move_line_to"] |
770 | + %> |
771 | + <% |
772 | + print_info = get_print_info(fiscalyear_id) |
773 | + result_wizard = set_wizard_params(data["form"]) |
774 | + result_rows = get_movements() |
775 | + %> |
776 | + <% |
777 | + page_rows = 25 |
778 | + |
779 | + num_rows = len(result_rows) |
780 | + num_row = 0 |
781 | + new_page = True |
782 | + |
783 | + progr_page = print_info['start_page'] |
784 | + progr_row = print_info['start_row'] |
785 | + %> |
786 | + <% |
787 | + debit_tot = print_info['start_debit'] |
788 | + credit_tot = print_info['start_credit'] |
789 | + %> |
790 | + <% result_rows and result_rows[0] and result_rows[0].company_id and result_rows[0].company_id.partner_id and result_rows[0].company_id and result_rows[0].company_id.partner_id.lang and setLang(result_rows[0].company_id and result_rows[0].company_id.partner_id.lang) %> |
791 | + |
792 | + %for line in result_rows : |
793 | + <% num_row = num_row + 1 %> |
794 | + <% progr_row = progr_row + 1 %> |
795 | + % if new_page == True: |
796 | + <% |
797 | + new_page = False |
798 | + progr_page = progr_page + 1 |
799 | + %> |
800 | + <div class="page_block"> |
801 | + <table class="header" style="border-bottom: 0px solid black; width: 100%"> |
802 | + <tr> |
803 | + <td style="text-align:center;"><span style="font-weight: bold; font-size: 14px;">${_("ACCOUNT JOURNAL")}</span></td> |
804 | + </tr> |
805 | + </table> |
806 | + |
807 | + <table class="page_table"> |
808 | + <tr class="p_row p_row_page"> |
809 | + <td colspan="7" class="p_cell p_cell_test"> |
810 | + % if flag_print_final == False: |
811 | + <span class="p_text">${ _("TEST PRINTING") } ${ _("From date") } ${ formatLang(date_from, date=True) or ''|entity } ${ _("to date") } ${ formatLang(date_to, date=True) or ''|entity }</span> |
812 | + % endif |
813 | + </td> |
814 | + <td colspan="2" class="p_cell p_cell_page"><span class="p_text p_page">${ _("Page:") } ${progr_page} / ${print_info['year_name']}</span></td> |
815 | + </tr> |
816 | + |
817 | + <tr class="p_row p_row_head"> |
818 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Row") }</span></td> |
819 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Date") }</span></td> |
820 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Ref") }</span></td> |
821 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Account move") }</span></td> |
822 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Account code") }</span></td> |
823 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Account name") }</span></td> |
824 | + <td class="p_cell p_cell_head"><span class="p_text">${ _("Name") }</span></td> |
825 | + <td class="p_cell p_cell_head p_cell_debit"><span class="p_text">${ _("Debit") }</span></td> |
826 | + <td class="p_cell p_cell_head p_cell_credit"><span class="p_text">${ _("Credit") }</span></td> |
827 | + </tr> |
828 | + |
829 | + <tr class="p_row p_row_total p_row_total_up"> |
830 | + <td colspan="6"></td> |
831 | + <td class="p_cell p_cell_progressive"><span class="p_text">${ _("Progressives =>") }</span></td> |
832 | + <td class="p_cell p_cell_debit"><span class="p_text p_debit">${ formatLang(debit_tot, digits=get_digits(dp='Account')) |entity }</span></td> |
833 | + <td class="p_cell p_cell_credit"><span class="p_text p_credit">${ formatLang(credit_tot, digits=get_digits(dp='Account')) |entity }</span></td> |
834 | + </tr> |
835 | + % endif |
836 | + <tr class="p_row"> |
837 | + <td class="p_cell p_cell_progr_row"><span class="p_text p_progr_row">${progr_row}</span></td> |
838 | + <td class="p_cell p_cell_date"><span class="p_text p_date">${ formatLang(line.date, date=True) or ''|entity }</span></td> |
839 | + <td class="p_cell p_cell_ref"><span class="p_text p_ref">${ line.ref or ''|entity }</span></td> |
840 | + <td class="p_cell p_cell_move_id_name"><span class="p_text p_move_id_name">${ line.move_id.name or ''|entity }</span></td> |
841 | + <td class="p_cell p_cell_account_id_code"><span class="p_text p_account_id_code">${ line.account_id.code or ''|entity }</span></td> |
842 | + <td class="p_cell p_cell_account_id_name"><span class="p_text p_account_id_name">${ line.account_id.name or ''|entity }</span></td> |
843 | + <td class="p_cell p_cell_name"><span class="p_text p_name">${ line.name or ''|entity }</span></td> |
844 | + <td class="p_cell p_cell_debit"><span class="p_text p_debit">${ formatLang(line.debit, digits=get_digits(dp='Account')) |entity }</span></td> |
845 | + <td class="p_cell p_cell_credit"><span class="p_text p_credit">${ formatLang(line.credit, digits=get_digits(dp='Account')) |entity }</span></td> |
846 | + </tr> |
847 | + <% |
848 | + debit_tot = debit_tot + line.debit |
849 | + credit_tot = credit_tot + line.credit |
850 | + %> |
851 | + % if (num_row % page_rows) == 0 or num_row == num_rows : |
852 | + <% |
853 | + new_page = True |
854 | + %> |
855 | + <tr class="p_row p_row_total p_row_total_down"> |
856 | + <td colspan="6"></td> |
857 | + <td class="p_cell p_cell_progressive"><span class="p_text">${ _("Progressives =>") }</span></td> |
858 | + <td class="p_cell p_cell_debit"><span class="p_text p_debit">${ formatLang(debit_tot, digits=get_digits(dp='Account')) |entity }</span></td> |
859 | + <td class="p_cell p_cell_credit"><span class="p_text p_credit">${ formatLang(credit_tot, digits=get_digits(dp='Account')) |entity }</span></td> |
860 | + </tr> |
861 | + </table> |
862 | + </div> |
863 | + % endif |
864 | + %endfor |
865 | + |
866 | + <% |
867 | + if flag_print_final == True: |
868 | + print_info = set_print_info(fiscalyear_id, date_to, progr_row, progr_page, debit_tot, credit_tot) |
869 | + %> |
870 | + |
871 | +</body> |
872 | +</html> |
873 | + |
874 | |
875 | === added file 'account_central_journal/report/central_journal_report.py' |
876 | --- account_central_journal/report/central_journal_report.py 1970-01-01 00:00:00 +0000 |
877 | +++ account_central_journal/report/central_journal_report.py 2014-03-06 15:06:22 +0000 |
878 | @@ -0,0 +1,89 @@ |
879 | +# -*- coding: utf-8 -*- |
880 | +############################################################################## |
881 | +# |
882 | +# OpenERP, Open Source Management Solution |
883 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
884 | +# |
885 | +# This program is free software: you can redistribute it and/or modify |
886 | +# it under the terms of the GNU Affero General Public License as |
887 | +# published by the Free Software Foundation, either version 3 of the |
888 | +# License, or (at your option) any later version. |
889 | +# |
890 | +# This program is distributed in the hope that it will be useful, |
891 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
892 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
893 | +# GNU Affero General Public License for more details. |
894 | +# |
895 | +# You should have received a copy of the GNU Affero General Public License |
896 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
897 | +# |
898 | +############################################################################## |
899 | + |
900 | +import time |
901 | +from report import report_sxw |
902 | +from osv import osv |
903 | +from tools.translate import _ |
904 | + |
905 | +class central_journal_report(report_sxw.rml_parse): |
906 | + |
907 | + def _set_wizard_params(self,form_values): |
908 | + if form_values['date_move_line_from'] : |
909 | + date_move_line_from=form_values['date_move_line_from'] |
910 | + filter=("date",">=",date_move_line_from) |
911 | + self.filters.append(filter) |
912 | + if form_values['date_move_line_to'] : |
913 | + date_move_line_to=form_values['date_move_line_to'] |
914 | + filter=("date","<=",date_move_line_to) |
915 | + self.filters.append(filter) |
916 | + return True |
917 | + |
918 | + def _get_print_info(self, fiscalyear_id): |
919 | + fiscalyear_obj = self.pool.get('account.fiscalyear') |
920 | + fiscalyear_ids=fiscalyear_obj.search(self.cr,self.uid,[('id','=',fiscalyear_id),]) |
921 | + fiscalyear_data=fiscalyear_obj.browse(self.cr,self.uid,fiscalyear_ids)[0] |
922 | + print_info = { |
923 | + 'start_row': fiscalyear_data.progressive_line_number, |
924 | + 'start_page': fiscalyear_data.progressive_page_number, |
925 | + 'start_debit': fiscalyear_data.progressive_debit, |
926 | + 'start_credit': fiscalyear_data.progressive_credit, |
927 | + 'year_name': fiscalyear_data.name, |
928 | + } |
929 | + return print_info |
930 | + |
931 | + def _set_print_info(self, fiscalyear_id, end_date_print, end_row, end_page, end_debit, end_credit): |
932 | + fiscalyear_obj = self.pool.get('account.fiscalyear') |
933 | + fiscalyear_ids=fiscalyear_obj.search(self.cr,self.uid,[('id','=',fiscalyear_id),]) |
934 | + fiscalyear_data=fiscalyear_obj.browse(self.cr,self.uid,fiscalyear_ids)[0] |
935 | + print_info = { |
936 | + 'date_last_print': end_date_print, |
937 | + 'progressive_line_number': end_row, |
938 | + 'progressive_page_number': end_page, |
939 | + 'progressive_debit': end_debit, |
940 | + 'progressive_credit': end_credit, |
941 | + } |
942 | + res = fiscalyear_obj.write(self.cr, self.uid, fiscalyear_ids, print_info) |
943 | + return res |
944 | + |
945 | + def _get_movements(self): |
946 | + move_line_obj = self.pool.get('account.move.line') |
947 | + line_ids=move_line_obj.search(self.cr,self.uid,self.filters,order="date, move_id asc") |
948 | + report_lines=move_line_obj.browse(self.cr,self.uid,line_ids) |
949 | + return report_lines |
950 | + |
951 | + def __init__(self, cr, uid, name, context): |
952 | + self.filters=[] |
953 | + super(central_journal_report, self).__init__(cr, uid, name, context) |
954 | + self.localcontext.update({ |
955 | + 'time': time, |
956 | + 'cr':cr, |
957 | + 'uid': uid, |
958 | + 'get_print_info': self._get_print_info, |
959 | + 'set_print_info': self._set_print_info, |
960 | + 'set_wizard_params': self._set_wizard_params, |
961 | + 'get_movements': self._get_movements, |
962 | + }) |
963 | + |
964 | +report_sxw.report_sxw('report.central_journal_report', |
965 | + 'account.move.line', |
966 | + 'addons/account_central_journal/report/central_journal_report.mako', |
967 | + parser=central_journal_report) |
968 | |
969 | === added file 'account_central_journal/report/report.xml' |
970 | --- account_central_journal/report/report.xml 1970-01-01 00:00:00 +0000 |
971 | +++ account_central_journal/report/report.xml 2014-03-06 15:06:22 +0000 |
972 | @@ -0,0 +1,15 @@ |
973 | +<?xml version="1.0"?> |
974 | +<openerp> |
975 | + <data> |
976 | + <record id="central_journal_report_id" model="ir.actions.report.xml"> |
977 | + <field name="name">central_journal</field> |
978 | + <field name="type">ir.actions.report.xml</field> |
979 | + <field name="model">account.move.line</field> |
980 | + <field name="report_name">central_journal_report</field> |
981 | + <field name="report_rml">account_central_journal/report/central_journal_report.mako</field> |
982 | + <field name="report_type">webkit</field> |
983 | + <field name="webkit_header" ref="ir_header_central_journal_report"/> |
984 | + </record> |
985 | + </data> |
986 | +</openerp> |
987 | + |
988 | |
989 | === added file 'account_central_journal/report/webkit_model.xml' |
990 | --- account_central_journal/report/webkit_model.xml 1970-01-01 00:00:00 +0000 |
991 | +++ account_central_journal/report/webkit_model.xml 2014-03-06 15:06:22 +0000 |
992 | @@ -0,0 +1,107 @@ |
993 | +<?xml version="1.0" ?> |
994 | +<openerp> |
995 | + <data noupdate="1"> |
996 | + <record id="ir_header_central_journal_report" model="ir.header_webkit"> |
997 | + <field name="footer_html"></field> |
998 | + <field eval=""""Landscape"""" name="orientation"/> |
999 | + <field eval=""""A4"""" name="format"/> |
1000 | + <field name="html"><![CDATA[<html> |
1001 | + <head> |
1002 | + <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> |
1003 | + <script> |
1004 | + function subst() { |
1005 | + var vars={}; |
1006 | + var x=document.location.search.substring(1).split('&'); |
1007 | + for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} |
1008 | + var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; |
1009 | + for(var i in x) { |
1010 | + var y = document.getElementsByClassName(x[i]); |
1011 | + for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; |
1012 | + } |
1013 | + } |
1014 | + </script> |
1015 | + <style type="text/css"> |
1016 | + ${css} |
1017 | + </style> |
1018 | + </head> |
1019 | + <body style="border:0; margin:0;" onload="subst()"> |
1020 | + <table class="header" style="border-bottom: 0px solid black; width: 100%"> |
1021 | + <tr> |
1022 | + <td style="text-align:left; padding: 5px 0px;"> |
1023 | + <span style="font-weight: bold;"> |
1024 | + ${company.partner_id.name |entity} - P.IVA: |
1025 | + ${company.partner_id.vat or '' |entity} <br/> |
1026 | + ${company.partner_id.street or '' |entity} |
1027 | + ${company.partner_id.street2 or '' |entity} |
1028 | + ${company.partner_id.zip or '' |entity} |
1029 | + ${company.partner_id.city or '' |entity} </span> |
1030 | + </td> |
1031 | + </tr> |
1032 | + </table> ${_debug or ''|n} |
1033 | + </body> |
1034 | +</html>]]> |
1035 | +</field> |
1036 | + <field eval="20.0" name="margin_top"/> |
1037 | + <field eval="15.0" name="margin_bottom"/> |
1038 | + <field eval="15.0" name="margin_left"/> |
1039 | + <field eval="15.0" name="margin_right"/> |
1040 | + <field name="css" ><![CDATA[ |
1041 | + /* http://meyerweb.com/eric/tools/css/reset/ |
1042 | + v2.0 | 20110126 |
1043 | + License: none (public domain) |
1044 | + */ |
1045 | + /* START OF RESET CSS */ |
1046 | + html, body, div, span, applet, object, iframe, |
1047 | + h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
1048 | + a, abbr, acronym, address, big, cite, code, |
1049 | + del, dfn, em, img, ins, kbd, q, s, samp, |
1050 | + small, strike, strong, sub, sup, tt, var, |
1051 | + b, u, i, center, |
1052 | + dl, dt, dd, ol, ul, li, |
1053 | + fieldset, form, label, legend, |
1054 | + table, caption, tbody, tfoot, thead, tr, th, td, |
1055 | + article, aside, canvas, details, embed, |
1056 | + figure, figcaption, footer, header, hgroup, |
1057 | + menu, nav, output, ruby, section, summary, |
1058 | + time, mark, audio, video { |
1059 | + margin: 0; |
1060 | + padding: 0; |
1061 | + border: 0; |
1062 | + font-size: 100%; |
1063 | + font: inherit; |
1064 | + vertical-align: baseline; |
1065 | + } |
1066 | + /* HTML5 display-role reset for older browsers */ |
1067 | + article, aside, details, figcaption, figure, |
1068 | + footer, header, hgroup, menu, nav, section { |
1069 | + display: block; |
1070 | + } |
1071 | + body { |
1072 | + line-height: 1; |
1073 | + } |
1074 | + ol, ul { |
1075 | + list-style: none; |
1076 | + } |
1077 | + blockquote, q { |
1078 | + quotes: none; |
1079 | + } |
1080 | + blockquote:before, blockquote:after, |
1081 | + q:before, q:after { |
1082 | + content: ''; |
1083 | + content: none; |
1084 | + } |
1085 | + table { |
1086 | + border-collapse: collapse; |
1087 | + border-spacing: 0; |
1088 | + } |
1089 | + /* END OF RESET CSS */ |
1090 | + |
1091 | + body { |
1092 | + font-family: font-family: Verdana, Arial, Helvetica, sans-serif; |
1093 | + font-size: 12px; |
1094 | + } |
1095 | +]]> </field> |
1096 | + <field eval=""""Central Journal Report"""" name="name"/> |
1097 | + </record> |
1098 | + </data> |
1099 | +</openerp> |
1100 | |
1101 | === added directory 'account_central_journal/wizard' |
1102 | === added file 'account_central_journal/wizard/__init__.py' |
1103 | --- account_central_journal/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
1104 | +++ account_central_journal/wizard/__init__.py 2014-03-06 15:06:22 +0000 |
1105 | @@ -0,0 +1,22 @@ |
1106 | +# -*- coding: utf-8 -*- |
1107 | +############################################################################## |
1108 | +# |
1109 | +# OpenERP, Open Source Management Solution |
1110 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
1111 | +# |
1112 | +# This program is free software: you can redistribute it and/or modify |
1113 | +# it under the terms of the GNU Affero General Public License as |
1114 | +# published by the Free Software Foundation, either version 3 of the |
1115 | +# License, or (at your option) any later version. |
1116 | +# |
1117 | +# This program is distributed in the hope that it will be useful, |
1118 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1119 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1120 | +# GNU Affero General Public License for more details. |
1121 | +# |
1122 | +# You should have received a copy of the GNU Affero General Public License |
1123 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1124 | +# |
1125 | +############################################################################## |
1126 | + |
1127 | +import central_journal_report |
1128 | |
1129 | === added file 'account_central_journal/wizard/central_journal_report.py' |
1130 | --- account_central_journal/wizard/central_journal_report.py 1970-01-01 00:00:00 +0000 |
1131 | +++ account_central_journal/wizard/central_journal_report.py 2014-03-06 15:06:22 +0000 |
1132 | @@ -0,0 +1,135 @@ |
1133 | +# -*- coding: utf-8 -*- |
1134 | +############################################################################## |
1135 | +# |
1136 | +# OpenERP, Open Source Management Solution |
1137 | +# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>). |
1138 | +# |
1139 | +# This program is free software: you can redistribute it and/or modify |
1140 | +# it under the terms of the GNU Affero General Public License as |
1141 | +# published by the Free Software Foundation, either version 3 of the |
1142 | +# License, or (at your option) any later version. |
1143 | +# |
1144 | +# This program is distributed in the hope that it will be useful, |
1145 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1146 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1147 | +# GNU Affero General Public License for more details. |
1148 | +# |
1149 | +# You should have received a copy of the GNU Affero General Public License |
1150 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1151 | +# |
1152 | +############################################################################## |
1153 | + |
1154 | +import time |
1155 | +from datetime import datetime, date, timedelta |
1156 | +from osv import osv, fields |
1157 | +from tools.translate import _ |
1158 | + |
1159 | +class central_journal_report(osv.osv_memory): |
1160 | + |
1161 | + _name = 'wizard.central.journal.report' |
1162 | + _description = 'Printing parameters of the Center Journal' |
1163 | + |
1164 | + def _get_fiscal_years(self, cr, uid, context=None): |
1165 | + fiscalyear_obj = self.pool.get('account.fiscalyear') |
1166 | + fiscalyear_ids = fiscalyear_obj.search(cr, uid, [], order="id desc") |
1167 | + fiscalyears = [] |
1168 | + for account_fiscalyear in fiscalyear_obj.browse(cr,uid,fiscalyear_ids) : |
1169 | + fiscalyears.append((account_fiscalyear.id, account_fiscalyear.name)) |
1170 | + return fiscalyears |
1171 | + |
1172 | + def _get_account_fiscalyear_data(self, cr, uid, ids, fiscalyear_id): |
1173 | + fiscalyear_obj = self.pool.get('account.fiscalyear') |
1174 | + fiscalyear_ids=fiscalyear_obj.search(cr,uid,[('id','=',fiscalyear_id),]) |
1175 | + fiscalyear_data=fiscalyear_obj.browse(cr,uid,fiscalyear_ids)[0] |
1176 | + return fiscalyear_data |
1177 | + |
1178 | + def _dates_control(self, str_date_start, str_date_end): |
1179 | + today_date = date.today() |
1180 | + date_start = datetime.strptime(str_date_start,"%Y-%m-%d").date() |
1181 | + date_stop = datetime.strptime(str_date_end,"%Y-%m-%d").date() |
1182 | + if date_start > date_stop: |
1183 | + raise osv.except_osv(_('Wrong dates !'), _("The end date must be greater than the initial date.")) |
1184 | + return False |
1185 | + if date_stop > today_date: |
1186 | + raise osv.except_osv(_('Wrong dates !'), _("The end date can not be greater than today's date.")) |
1187 | + return False |
1188 | + return True |
1189 | + |
1190 | + def _get_report_datas(self, cr, uid, ids, context={}): |
1191 | + wizard_form_datas = self.read(cr, uid, ids)[0] |
1192 | + datas = { |
1193 | + 'ids': [], |
1194 | + 'model': 'account.move.line', |
1195 | + 'form': wizard_form_datas, |
1196 | + } |
1197 | + return datas |
1198 | + |
1199 | + _columns = { |
1200 | + 'date_move_line_from': fields.date('From date', required=True,), |
1201 | + 'date_move_line_from_view': fields.date('From date'), |
1202 | + 'date_move_line_to': fields.date('to date', required=True), |
1203 | + 'fiscalyear': fields.selection(_get_fiscal_years, 'Fiscal Year', required=True), |
1204 | + 'print_state': fields.selection([('draft','Draft'),('print','Ready for printing'),('printed','Printed')],'State',readonly=True), |
1205 | + } |
1206 | + |
1207 | + def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None): |
1208 | + print_state = 'draft' |
1209 | + date_move_line_from = date_move_line_from_view = False |
1210 | + date_move_line_to = False |
1211 | + if fiscalyear_id: |
1212 | + print_state = 'print' |
1213 | + fiscalyear_data = self._get_account_fiscalyear_data(cr, uid, ids, fiscalyear_id) |
1214 | + #set values |
1215 | + today_date = date.today() |
1216 | + date_start = datetime.strptime(fiscalyear_data.date_start,"%Y-%m-%d").date() |
1217 | + date_stop = datetime.strptime(fiscalyear_data.date_stop,"%Y-%m-%d").date() |
1218 | + #set date_move_line_from |
1219 | + if fiscalyear_data.date_last_print: |
1220 | + date_last_print = datetime.strptime(fiscalyear_data.date_last_print,"%Y-%m-%d").date() |
1221 | + date_move_line_from = date_move_line_from_view = (date_last_print+timedelta(days=1)).__str__() |
1222 | + if date_last_print == date_stop: |
1223 | + date_move_line_from = date_move_line_from_view = date_start.__str__() |
1224 | + print_state = 'printed' |
1225 | + else: |
1226 | + date_move_line_from = date_move_line_from_view = date_start.__str__() |
1227 | + #set date_move_line_to |
1228 | + if today_date > date_stop: |
1229 | + date_move_line_to = date_stop.__str__() |
1230 | + else: |
1231 | + date_move_line_to = (today_date-timedelta(days=1)).__str__() |
1232 | + |
1233 | + return {'value': { |
1234 | + 'date_move_line_from': date_move_line_from, |
1235 | + 'date_move_line_from_view': date_move_line_from_view, |
1236 | + 'date_move_line_to': date_move_line_to, |
1237 | + 'print_state': print_state, |
1238 | + } |
1239 | + } |
1240 | + |
1241 | + def print_report(self, cr, uid, ids, context={}): |
1242 | + datas = self._get_report_datas(cr, uid, ids, context) |
1243 | + if self._dates_control(datas['form']['date_move_line_from'],datas['form']['date_move_line_to']) == False: |
1244 | + return False |
1245 | + datas['print_final'] = False |
1246 | + return { |
1247 | + 'type': 'ir.actions.report.xml', |
1248 | + 'report_name': 'central_journal_report', |
1249 | + 'datas': datas, |
1250 | + } |
1251 | + |
1252 | + def print_report_final(self, cr, uid, ids, context={}): |
1253 | + datas = self._get_report_datas(cr, uid, ids, context) |
1254 | + if self._dates_control(datas['form']['date_move_line_from'],datas['form']['date_move_line_to']) == False: |
1255 | + return False |
1256 | + datas['print_final'] = True |
1257 | + return { |
1258 | + 'type': 'ir.actions.report.xml', |
1259 | + 'report_name': 'central_journal_report', |
1260 | + 'datas': datas, |
1261 | + } |
1262 | + |
1263 | + _defaults = { |
1264 | + 'print_state': 'draft', |
1265 | + } |
1266 | + |
1267 | +central_journal_report() |
1268 | |
1269 | === added file 'account_central_journal/wizard/central_journal_report.xml' |
1270 | --- account_central_journal/wizard/central_journal_report.xml 1970-01-01 00:00:00 +0000 |
1271 | +++ account_central_journal/wizard/central_journal_report.xml 2014-03-06 15:06:22 +0000 |
1272 | @@ -0,0 +1,59 @@ |
1273 | +<?xml version="1.0" encoding="utf-8"?> |
1274 | +<openerp> |
1275 | + <data> |
1276 | + |
1277 | + <!-- |
1278 | + Central Journal Report Filter View |
1279 | + --> |
1280 | + |
1281 | + <record model="ir.ui.view" id="central_journal_report_form_view"> |
1282 | + <field name="name">wizard.central.journal.report.form</field> |
1283 | + <field name="model">wizard.central.journal.report</field> |
1284 | + <field name="type">form</field> |
1285 | + <field name="arch" type="xml"> |
1286 | + <form string="Printing parameters of the Center Journal"> |
1287 | + <group colspan="4" col="4"> |
1288 | + <separator colspan="4" string="Reference"/> |
1289 | + <field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/> |
1290 | + <separator colspan="4" string="Dates movements"/> |
1291 | + <field name="date_move_line_from" invisible="1"/> |
1292 | + <field name="date_move_line_from_view" readonly="1"/> |
1293 | + <field name="date_move_line_to" attrs="{'readonly':[('print_state','!=','print')]}"/> |
1294 | + </group> |
1295 | + <newline/> |
1296 | + <separator colspan="4"/> |
1297 | + <group colspan="4" col="6"> |
1298 | + <field name="print_state"/> |
1299 | + <button special="cancel" string="Cancel" icon='gtk-cancel'/> |
1300 | + <button name="print_report" string="Print" type="object" icon="gtk-print" attrs="{'invisible':[('print_state','=','printed')]}"/> |
1301 | + <button name="print_report_final" string="Final print" type="object" icon="gtk-print" attrs="{'invisible':[('print_state','=','printed')]}"/> |
1302 | + </group> |
1303 | + </form> |
1304 | + </field> |
1305 | + </record> |
1306 | + |
1307 | + <!--action --> |
1308 | + <record model="ir.actions.act_window" id="central_journal_report_action"> |
1309 | + <field name="name">Print Central Journal</field> |
1310 | + <field name="type">ir.actions.act_window</field> |
1311 | + <field name="res_model">wizard.central.journal.report</field> |
1312 | + <field name="view_type">form</field> |
1313 | + <field name="view_mode">form</field> |
1314 | + <field name="target">new</field> |
1315 | + </record> |
1316 | + |
1317 | + <!--this feature works only in this file. Don't move--> |
1318 | + <record model="ir.values" id="central_journal_report_webkit"> |
1319 | + <field name="model_id" ref="account.model_account_move_line" /> |
1320 | + <field name="object" eval="1" /> |
1321 | + <field name="name">central_journal</field> |
1322 | + <field name="key2">client_print_multi</field> |
1323 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('central_journal_report_action'))" /> |
1324 | + <field name="key">action</field> |
1325 | + <field name="model">account.move.line</field> |
1326 | + </record> |
1327 | + |
1328 | + <menuitem id="menu_central_journal_report_action" parent="account.menu_finance_legal_statement" action="central_journal_report_action"/> |
1329 | + |
1330 | + </data> |
1331 | +</openerp> |
Bel Lavoro! Approvo!