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