Merge lp:~l-turchetti/openobject-italia/add_account_central_journal into lp:~openobject-italia-core-devs/openobject-italia/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
Reviewer Review Type Date Requested Status
OpenERP Italia core devs Pending
Review via email: mp+112317@code.launchpad.net
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
=== added directory 'account_central_journal'
=== added file 'account_central_journal/AUTHORS.txt'
--- account_central_journal/AUTHORS.txt 1970-01-01 00:00:00 +0000
+++ account_central_journal/AUTHORS.txt 2012-06-27 10:38:24 +0000
@@ -0,0 +1,1 @@
1Daniele Arcangeli <d.arcangeli@isa.it>
02
=== added file 'account_central_journal/__init__.py'
--- account_central_journal/__init__.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/__init__.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,25 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account
23import wizard
24import report
25
026
=== added file 'account_central_journal/__openerp__.py'
--- account_central_journal/__openerp__.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/__openerp__.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,47 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22{
23 'name': 'Account Central Journal',
24 'version': '3',
25 'author': "ISA S.r.l.",
26 'website': 'http://www.isa.it',
27 'category': 'Generic Modules/Accounting',
28 'description': """
29Managing the printing of the "Central Journal" """,
30 'depends' : [
31 'base',
32 'account',
33 'report_webkit',
34 ],
35 'init_xml' : [],
36 'update_xml': [
37 'report/report.xml',
38 'report/webkit_model.xml',
39 'wizard/central_journal_report.xml',
40 'account_view.xml',
41 ],
42 'demo_xml': [],
43 'test':[],
44 'installable': True,
45 'active': False,
46 'certificate': '',
47}
048
=== added file 'account_central_journal/account.py'
--- account_central_journal/account.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/account.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,44 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import fields, osv
23from tools.translate import _
24import decimal_precision as dp
25
26class account_fiscalyear(osv.osv):
27 _inherit = "account.fiscalyear"
28 _description = "Fiscal Year"
29 _columns = {
30 'date_last_print': fields.date('Last printed date', readonly=True),
31 'progressive_page_number': fields.integer('Progressive of the page', required=True, readonly=True),
32 'progressive_line_number': fields.integer('Progressive line', required=True, readonly=True),
33 'progressive_credit': fields.float('Progressive Credit', digits_compute=dp.get_precision('Account'), required=True, readonly=True),
34 'progressive_debit': fields.float('Progressive Debit', digits_compute=dp.get_precision('Account'), required=True, readonly=True),
35 }
36
37 _defaults = {
38 'progressive_page_number': 0,
39 'progressive_line_number': 0,
40 'progressive_credit': lambda *a: float(),
41 'progressive_debit': lambda *a: float(),
42 }
43
44account_fiscalyear()
045
=== added file 'account_central_journal/account_view.xml'
--- account_central_journal/account_view.xml 1970-01-01 00:00:00 +0000
+++ account_central_journal/account_view.xml 2012-06-27 10:38:24 +0000
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <!--
6 Account Fiscal Year inheritancy
7 -->
8
9 <record id="account_central_journal_form_view" model="ir.ui.view">
10 <field name="name">account.central.journal.form</field>
11 <field name="model">account.fiscalyear</field>
12 <field name="inherit_id" ref="account.view_account_fiscalyear_form"/>
13 <field name="arch" type="xml">
14 <field name="end_journal_period_id" position="after">
15 <separator colspan="4" string="Central journal info"/>
16 <field name="date_last_print"/>
17 <newline/>
18 <field name="progressive_page_number"/>
19 <field name="progressive_line_number"/>
20 <field name="progressive_credit"/>
21 <field name="progressive_debit"/>
22 </field>
23 </field>
24 </record>
25
26 </data>
27</openerp>
028
=== added directory 'account_central_journal/i18n'
=== added file 'account_central_journal/i18n/account_central_journal.pot'
--- account_central_journal/i18n/account_central_journal.pot 1970-01-01 00:00:00 +0000
+++ account_central_journal/i18n/account_central_journal.pot 2012-06-27 10:38:24 +0000
@@ -0,0 +1,235 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_central_journal
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2012-03-16 14:39+0000\n"
10"PO-Revision-Date: 2012-03-16 14:39+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_central_journal
19#: model:ir.actions.act_window,name:account_central_journal.central_journal_report_action
20#: model:ir.ui.menu,name:account_central_journal.menu_central_journal_report_action
21msgid "Print Central Journal"
22msgstr ""
23
24#. module: account_central_journal
25#: report:report.central_journal_report:135
26msgid "Account code"
27msgstr ""
28
29#. module: account_central_journal
30#: report:report.central_journal_report:144
31#: report:report.central_journal_report:170
32msgid "Progressives =>"
33msgstr ""
34
35#. module: account_central_journal
36#: model:ir.model,name:account_central_journal.model_central_journal_report
37#: model:ir.model,name:account_central_journal.model_wizard_central_journal_report
38#: view:wizard.central.journal.report:0
39msgid "Printing parameters of the Center Journal"
40msgstr ""
41
42#. module: account_central_journal
43#: field:wizard.central.journal.report,print_state:0
44msgid "State"
45msgstr ""
46
47#. module: account_central_journal
48#: selection:wizard.central.journal.report,print_state:0
49msgid "Draft"
50msgstr ""
51
52#. module: account_central_journal
53#: report:report.central_journal_report:134
54msgid "Account move"
55msgstr ""
56
57#. module: account_central_journal
58#: report:report.central_journal_report:138
59msgid "Debit"
60msgstr ""
61
62#. module: account_central_journal
63#: view:wizard.central.journal.report:0
64msgid "Print"
65msgstr ""
66
67#. module: account_central_journal
68#: field:account.fiscalyear,progressive_credit:0
69msgid "Progressive Credit"
70msgstr ""
71
72#. module: account_central_journal
73#: model:ir.module.module,description:account_central_journal.module_meta_information
74msgid "\n"
75"Managing the printing of the \"Central Journal\" "
76msgstr ""
77
78#. module: account_central_journal
79#: constraint:account.fiscalyear:0
80msgid "Error! You cannot define overlapping fiscal years"
81msgstr ""
82
83#. module: account_central_journal
84#: report:report.central_journal_report:133
85msgid "Ref"
86msgstr ""
87
88#. module: account_central_journal
89#: field:account.fiscalyear,date_last_print:0
90msgid "Last printed date"
91msgstr ""
92
93#. module: account_central_journal
94#: selection:wizard.central.journal.report,print_state:0
95msgid "Printed"
96msgstr ""
97
98#. module: account_central_journal
99#: report:report.central_journal_report:136
100msgid "Account name"
101msgstr ""
102
103#. module: account_central_journal
104#: report:report.central_journal_report:132
105msgid "Date"
106msgstr ""
107
108#. module: account_central_journal
109#: code:addons/account_central_journal/wizard/central_journal_report.py:51
110#: code:addons/account_central_journal/wizard/central_journal_report.py:54
111#, python-format
112msgid "Wrong dates !"
113msgstr ""
114
115#. module: account_central_journal
116#: view:wizard.central.journal.report:0
117msgid "Dates movements"
118msgstr ""
119
120#. module: account_central_journal
121#: field:account.fiscalyear,progressive_debit:0
122msgid "Progressive Debit"
123msgstr ""
124
125#. module: account_central_journal
126#: report:report.central_journal_report:124
127#: field:wizard.central.journal.report,date_move_line_to:0
128msgid "to date"
129msgstr ""
130
131#. module: account_central_journal
132#: report:report.central_journal_report:137
133msgid "Name"
134msgstr ""
135
136#. module: account_central_journal
137#: model:ir.module.module,shortdesc:account_central_journal.module_meta_information
138msgid "Account Central Journal"
139msgstr ""
140
141#. module: account_central_journal
142#: field:account.fiscalyear,progressive_line_number:0
143msgid "Progressive line"
144msgstr ""
145
146#. module: account_central_journal
147#: code:addons/account_central_journal/wizard/central_journal_report.py:54
148#, python-format
149msgid "The end date can not be greater than today's date."
150msgstr ""
151
152#. module: account_central_journal
153#: report:report.central_journal_report:139
154msgid "Credit"
155msgstr ""
156
157#. module: account_central_journal
158#: model:ir.model,name:account_central_journal.model_account_fiscalyear
159#: field:wizard.central.journal.report,fiscalyear:0
160msgid "Fiscal Year"
161msgstr ""
162
163#. module: account_central_journal
164#: constraint:account.fiscalyear:0
165msgid "Error! The duration of the Fiscal Year is invalid. "
166msgstr ""
167
168#. module: account_central_journal
169#: code:addons/account_central_journal/wizard/central_journal_report.py:51
170#, python-format
171msgid "The end date must be greater than the initial date."
172msgstr ""
173
174#. module: account_central_journal
175#: view:wizard.central.journal.report:0
176msgid "Reference"
177msgstr ""
178
179#. module: account_central_journal
180#: model:ir.actions.report.xml,name:account_central_journal.central_journal_report_id
181msgid "central_journal"
182msgstr ""
183
184#. module: account_central_journal
185#: field:account.fiscalyear,progressive_page_number:0
186msgid "Progressive of the page"
187msgstr ""
188
189#. module: account_central_journal
190#: report:report.central_journal_report:124
191msgid "TEST PRINTING"
192msgstr ""
193
194#. module: account_central_journal
195#: view:account.fiscalyear:0
196msgid "Central journal info"
197msgstr ""
198
199#. module: account_central_journal
200#: report:report.central_journal_report:127
201msgid "Page:"
202msgstr ""
203
204#. module: account_central_journal
205#: report:report.central_journal_report:124
206#: field:wizard.central.journal.report,date_move_line_from:0
207#: field:wizard.central.journal.report,date_move_line_from_view:0
208msgid "From date"
209msgstr ""
210
211#. module: account_central_journal
212#: selection:wizard.central.journal.report,print_state:0
213msgid "Ready for printing"
214msgstr ""
215
216#. module: account_central_journal
217#: view:wizard.central.journal.report:0
218msgid "Cancel"
219msgstr ""
220
221#. module: account_central_journal
222#: report:report.central_journal_report:131
223msgid "Row"
224msgstr ""
225
226#. module: account_central_journal
227#: view:wizard.central.journal.report:0
228msgid "Final print"
229msgstr ""
230
231#. module: account_central_journal
232#: report:report.central_journal_report:116
233msgid "ACCOUNT JOURNAL"
234msgstr ""
235
0236
=== added file 'account_central_journal/i18n/it.mo'
1Binary 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 differ237Binary 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
=== added file 'account_central_journal/i18n/it.po'
--- account_central_journal/i18n/it.po 1970-01-01 00:00:00 +0000
+++ account_central_journal/i18n/it.po 2012-06-27 10:38:24 +0000
@@ -0,0 +1,233 @@
1msgid ""
2msgstr ""
3"Project-Id-Version: Account Central Journal\n"
4"Report-Msgid-Bugs-To: support@openerp.com\n"
5"POT-Creation-Date: 2012-03-16 14:39+0000\n"
6"PO-Revision-Date: \n"
7"Last-Translator: Daniele Arcangeli <d.arcangeli@isa.it>\n"
8"Language-Team: \n"
9"MIME-Version: 1.0\n"
10"Content-Type: text/plain; charset=UTF-8\n"
11"Content-Transfer-Encoding: 8bit\n"
12
13#. module: account_central_journal
14#: model:ir.actions.act_window,name:account_central_journal.central_journal_report_action
15#: model:ir.ui.menu,name:account_central_journal.menu_central_journal_report_action
16msgid "Print Central Journal"
17msgstr "Giornale Centralizzato"
18
19#. module: account_central_journal
20#: report:report.central_journal_report:135
21msgid "Account code"
22msgstr "Codice Conto"
23
24#. module: account_central_journal
25#: report:report.central_journal_report:144
26#: report:report.central_journal_report:170
27msgid "Progressives =>"
28msgstr "Progressivi =>"
29
30#. module: account_central_journal
31#: model:ir.model,name:account_central_journal.model_central_journal_report
32#: model:ir.model,name:account_central_journal.model_wizard_central_journal_report
33#: view:wizard.central.journal.report:0
34msgid "Printing parameters of the Center Journal"
35msgstr "Parametri di stampa del Giornale Centralizzato"
36
37#. module: account_central_journal
38#: field:wizard.central.journal.report,print_state:0
39msgid "State"
40msgstr "Stato"
41
42#. module: account_central_journal
43#: selection:wizard.central.journal.report,print_state:0
44msgid "Draft"
45msgstr "Bozza"
46
47#. module: account_central_journal
48#: report:report.central_journal_report:134
49msgid "Account move"
50msgstr "Movimento"
51
52#. module: account_central_journal
53#: report:report.central_journal_report:138
54msgid "Debit"
55msgstr "Dare"
56
57#. module: account_central_journal
58#: view:wizard.central.journal.report:0
59msgid "Print"
60msgstr "Stampa"
61
62#. module: account_central_journal
63#: field:account.fiscalyear,progressive_credit:0
64msgid "Progressive Credit"
65msgstr "Progressivo Avere"
66
67#. module: account_central_journal
68#: model:ir.module.module,description:account_central_journal.module_meta_information
69msgid ""
70"\n"
71"Managing the printing of the \"Central Journal\" "
72msgstr ""
73"\n"
74"Gestione della stampa del \"Giornale Centralizzato\""
75
76#. module: account_central_journal
77#: constraint:account.fiscalyear:0
78msgid "Error! You cannot define overlapping fiscal years"
79msgstr "Errore! Non è possibile definire una sovrapposizione degli anni fiscali."
80
81#. module: account_central_journal
82#: report:report.central_journal_report:133
83msgid "Ref"
84msgstr "Rif."
85
86#. module: account_central_journal
87#: field:account.fiscalyear,date_last_print:0
88msgid "Last printed date"
89msgstr "Data ultima stampa"
90
91#. module: account_central_journal
92#: selection:wizard.central.journal.report,print_state:0
93msgid "Printed"
94msgstr "Stampato"
95
96#. module: account_central_journal
97#: report:report.central_journal_report:136
98msgid "Account name"
99msgstr "Conto"
100
101#. module: account_central_journal
102#: report:report.central_journal_report:132
103msgid "Date"
104msgstr "Data"
105
106#. module: account_central_journal
107#: code:addons/account_central_journal/wizard/central_journal_report.py:51
108#: code:addons/account_central_journal/wizard/central_journal_report.py:54
109#, python-format
110msgid "Wrong dates !"
111msgstr "Date errate !"
112
113#. module: account_central_journal
114#: view:wizard.central.journal.report:0
115msgid "Dates movements"
116msgstr "Date dei movimenti"
117
118#. module: account_central_journal
119#: field:account.fiscalyear,progressive_debit:0
120msgid "Progressive Debit"
121msgstr "Progressivo Dare"
122
123#. module: account_central_journal
124#: report:report.central_journal_report:124
125#: field:wizard.central.journal.report,date_move_line_to:0
126msgid "to date"
127msgstr "alla data"
128
129#. module: account_central_journal
130#: report:report.central_journal_report:137
131msgid "Name"
132msgstr "Descrizione movimento"
133
134#. module: account_central_journal
135#: model:ir.module.module,shortdesc:account_central_journal.module_meta_information
136msgid "Account Central Journal"
137msgstr "Giornale Centralizzato"
138
139#. module: account_central_journal
140#: field:account.fiscalyear,progressive_line_number:0
141msgid "Progressive line"
142msgstr "Progressivo della riga"
143
144#. module: account_central_journal
145#: code:addons/account_central_journal/wizard/central_journal_report.py:54
146#, python-format
147msgid "The end date can not be greater than today's date."
148msgstr "La data finale non può essere maggiore della data odierna"
149
150#. module: account_central_journal
151#: report:report.central_journal_report:139
152msgid "Credit"
153msgstr "Avere"
154
155#. module: account_central_journal
156#: model:ir.model,name:account_central_journal.model_account_fiscalyear
157#: field:wizard.central.journal.report,fiscalyear:0
158msgid "Fiscal Year"
159msgstr "Anno Fiscale"
160
161#. module: account_central_journal
162#: constraint:account.fiscalyear:0
163msgid "Error! The duration of the Fiscal Year is invalid. "
164msgstr "Errore! La durata dell'anno fiscale non è valida."
165
166#. module: account_central_journal
167#: code:addons/account_central_journal/wizard/central_journal_report.py:51
168#, python-format
169msgid "The end date must be greater than the initial date."
170msgstr "La data finale deve essere maggiore della data iniziale"
171
172#. module: account_central_journal
173#: view:wizard.central.journal.report:0
174msgid "Reference"
175msgstr "Riferimento"
176
177#. module: account_central_journal
178#: model:ir.actions.report.xml,name:account_central_journal.central_journal_report_id
179msgid "central_journal"
180msgstr "Giornale Centralizzato Report Webkit"
181
182#. module: account_central_journal
183#: field:account.fiscalyear,progressive_page_number:0
184msgid "Progressive of the page"
185msgstr "Progressivo della pagina"
186
187#. module: account_central_journal
188#: report:report.central_journal_report:124
189msgid "TEST PRINTING"
190msgstr "STAMPA DI PROVA"
191
192#. module: account_central_journal
193#: view:account.fiscalyear:0
194msgid "Central journal info"
195msgstr "Informazione del Giornale Centralizzato"
196
197#. module: account_central_journal
198#: report:report.central_journal_report:127
199msgid "Page:"
200msgstr "Pagina:"
201
202#. module: account_central_journal
203#: report:report.central_journal_report:124
204#: field:wizard.central.journal.report,date_move_line_from:0
205#: field:wizard.central.journal.report,date_move_line_from_view:0
206msgid "From date"
207msgstr "Dalla data"
208
209#. module: account_central_journal
210#: selection:wizard.central.journal.report,print_state:0
211msgid "Ready for printing"
212msgstr "Pronto per la stampa"
213
214#. module: account_central_journal
215#: view:wizard.central.journal.report:0
216msgid "Cancel"
217msgstr "Annulla"
218
219#. module: account_central_journal
220#: report:report.central_journal_report:131
221msgid "Row"
222msgstr "N.riga"
223
224#. module: account_central_journal
225#: view:wizard.central.journal.report:0
226msgid "Final print"
227msgstr "Stampa definitiva"
228
229#. module: account_central_journal
230#: report:report.central_journal_report:116
231msgid "ACCOUNT JOURNAL"
232msgstr "Giornale di Contabilità"
233
0234
=== added directory 'account_central_journal/report'
=== added file 'account_central_journal/report/__init__.py'
--- account_central_journal/report/__init__.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/report/__init__.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import central_journal_report
023
=== added file 'account_central_journal/report/central_journal_report.mako'
--- account_central_journal/report/central_journal_report.mako 1970-01-01 00:00:00 +0000
+++ account_central_journal/report/central_journal_report.mako 2012-06-27 10:38:24 +0000
@@ -0,0 +1,186 @@
1<html>
2<head>
3 <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
4 <style type="text/css">
5 ${css}
6
7 .page_block {
8 /*border: 1px solid red;*/
9 page-break-after: always;
10 /*page-break-inside: avoid;*/
11 }
12 .p_row {
13 page-break-inside: avoid;
14 vertical-align:text-top;
15 }
16 .p_cell {
17 overflow: hidden;
18 padding: 1px 5px;
19 }
20 .p_text {
21 color: black;
22 font-size: 9px;
23 font-family: "Courier New", Courier, monospace;
24 }
25 .p_cell_progr_row, .p_cell_debit, .p_cell_credit {
26 text-align: right;
27 }
28
29 .p_row_head {
30 border: 1px solid black;
31 border-width: 1px 0px;
32 }
33 .p_cell_head {
34 font-weight: bold;
35 padding: 3px 5px;
36 }
37
38 .p_row_page {
39 font-weight: bold;
40 }
41 .p_cell_test {
42 padding: 5px 5px;
43 }
44 .p_cell_page {
45 padding: 5px 5px;
46 text-align: right;
47 }
48
49 .p_row_total {
50 font-weight: bold;
51 border: 1px solid gray;
52 }
53 .p_row_total_up {
54 border-width: 0px 0px 1px 0px;
55 }
56 .p_row_total_down {
57 border-width: 1px 0px 0px 0px;
58 }
59 .p_cell_progressive {
60 padding: 3px 5px;
61 text-align: right;
62 }
63
64 /* COLUMNS WIDTH */
65 .p_cell_progr_row { width: 40px;}
66 .p_cell_date { width: 65px;}
67 .p_cell_ref { width: 70px;}
68 .p_cell_move_id_name { width: 70px;}
69 .p_cell_account_id_code { width: 50px;}
70 .p_cell_account_id_name { width: 200px;}
71 .p_cell_name { width: 250px;}
72 .p_cell_debit { width: 70px;}
73 .p_cell_credit { width: 70px;}
74 </style>
75</head>
76
77<body>
78 <% setLang(user.context_lang) %>
79 <%
80 flag_print_final = data["print_final"]
81 fiscalyear_id = data["form"]["fiscalyear"]
82 date_from = data["form"]["date_move_line_from"]
83 date_to = data["form"]["date_move_line_to"]
84 %>
85 <%
86 print_info = get_print_info(fiscalyear_id)
87 result_wizard = set_wizard_params(data["form"])
88 result_rows = get_movements()
89 %>
90 <%
91 page_rows = 50
92
93 num_rows = len(result_rows)
94 num_row = 0
95 new_page = True
96
97 progr_page = print_info['start_page']
98 progr_row = print_info['start_row']
99 %>
100 <%
101 debit_tot = print_info['start_debit']
102 credit_tot = print_info['start_credit']
103 %>
104
105 %for line in result_rows :
106 <% num_row = num_row + 1 %>
107 <% progr_row = progr_row + 1 %>
108 % if new_page == True:
109 <%
110 new_page = False
111 progr_page = progr_page + 1
112 %>
113 <div class="page_block">
114 <table class="header" style="border-bottom: 0px solid black; width: 100%">
115 <tr>
116 <td style="text-align:center;"><span style="font-weight: bold; font-size: 14px;">${_("ACCOUNT JOURNAL")}</span></td>
117 </tr>
118 </table>
119
120 <table>
121 <tr class="p_row p_row_page">
122 <td colspan="7" class="p_cell p_cell_test">
123 % if flag_print_final == False:
124 <span class="p_text">${ _("TEST PRINTING") }&nbsp;${ _("From date") }&nbsp;${ formatLang(date_from, date=True) or ''|entity }&nbsp;${ _("to date") }&nbsp;${ formatLang(date_to, date=True) or ''|entity }</span>
125 % endif
126 </td>
127 <td colspan="2" class="p_cell p_cell_page"><span class="p_text p_page">${ _("Page:") }&nbsp;&nbsp;${progr_page}</span></td>
128 </tr>
129
130 <tr class="p_row p_row_head">
131 <td class="p_cell p_cell_head"><span class="p_text">${ _("Row") }</span></td>
132 <td class="p_cell p_cell_head"><span class="p_text">${ _("Date") }</span></td>
133 <td class="p_cell p_cell_head"><span class="p_text">${ _("Ref") }</span></td>
134 <td class="p_cell p_cell_head"><span class="p_text">${ _("Account move") }</span></td>
135 <td class="p_cell p_cell_head"><span class="p_text">${ _("Account code") }</span></td>
136 <td class="p_cell p_cell_head"><span class="p_text">${ _("Account name") }</span></td>
137 <td class="p_cell p_cell_head"><span class="p_text">${ _("Name") }</span></td>
138 <td class="p_cell p_cell_head p_cell_debit"><span class="p_text">${ _("Debit") }</span></td>
139 <td class="p_cell p_cell_head p_cell_credit"><span class="p_text">${ _("Credit") }</span></td>
140 </tr>
141
142 <tr class="p_row p_row_total p_row_total_up">
143 <td colspan="6"></td>
144 <td class="p_cell p_cell_progressive"><span class="p_text">${ _("Progressives =>") }</span></td>
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>
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>
147 </tr>
148 % endif
149 <tr class="p_row">
150 <td class="p_cell p_cell_progr_row"><span class="p_text p_progr_row">${progr_row}</span></td>
151 <td class="p_cell p_cell_date"><span class="p_text p_date">${ formatLang(line.date, date=True) or ''|entity }</span></td>
152 <td class="p_cell p_cell_ref"><span class="p_text p_ref">${ line.ref or ''|entity }</span></td>
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>
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>
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>
156 <td class="p_cell p_cell_name"><span class="p_text p_name">${ line.name or ''|entity }</span></td>
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>
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>
159 </tr>
160 <%
161 debit_tot = debit_tot + line.debit
162 credit_tot = credit_tot + line.credit
163 %>
164 % if (num_row % page_rows) == 0 or num_row == num_rows :
165 <%
166 new_page = True
167 %>
168 <tr class="p_row p_row_total p_row_total_down">
169 <td colspan="6"></td>
170 <td class="p_cell p_cell_progressive"><span class="p_text">${ _("Progressives =>") }</span></td>
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>
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>
173 </tr>
174 </table>
175 </div>
176 % endif
177 %endfor
178
179 <%
180 if flag_print_final == True:
181 print_info = set_print_info(fiscalyear_id, date_to, progr_row, progr_page, debit_tot, credit_tot)
182 %>
183
184</body>
185</html>
186
0187
=== added file 'account_central_journal/report/central_journal_report.py'
--- account_central_journal/report/central_journal_report.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/report/central_journal_report.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,88 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from report import report_sxw
24from osv import osv
25from tools.translate import _
26
27class central_journal_report(report_sxw.rml_parse):
28
29 def _set_wizard_params(self,form_values):
30 if form_values['date_move_line_from'] :
31 date_move_line_from=form_values['date_move_line_from']
32 filter=("date",">=",date_move_line_from)
33 self.filters.append(filter)
34 if form_values['date_move_line_to'] :
35 date_move_line_to=form_values['date_move_line_to']
36 filter=("date","<=",date_move_line_to)
37 self.filters.append(filter)
38 return True
39
40 def _get_print_info(self, fiscalyear_id):
41 fiscalyear_obj = self.pool.get('account.fiscalyear')
42 fiscalyear_ids=fiscalyear_obj.search(self.cr,self.uid,[('id','=',fiscalyear_id),])
43 fiscalyear_data=fiscalyear_obj.browse(self.cr,self.uid,fiscalyear_ids)[0]
44 print_info = {
45 'start_row': fiscalyear_data.progressive_line_number,
46 'start_page': fiscalyear_data.progressive_page_number,
47 'start_debit': fiscalyear_data.progressive_debit,
48 'start_credit': fiscalyear_data.progressive_credit,
49 }
50 return print_info
51
52 def _set_print_info(self, fiscalyear_id, end_date_print, end_row, end_page, end_debit, end_credit):
53 fiscalyear_obj = self.pool.get('account.fiscalyear')
54 fiscalyear_ids=fiscalyear_obj.search(self.cr,self.uid,[('id','=',fiscalyear_id),])
55 fiscalyear_data=fiscalyear_obj.browse(self.cr,self.uid,fiscalyear_ids)[0]
56 print_info = {
57 'date_last_print': end_date_print,
58 'progressive_line_number': end_row,
59 'progressive_page_number': end_page,
60 'progressive_debit': end_debit,
61 'progressive_credit': end_credit,
62 }
63 res = fiscalyear_obj.write(self.cr, self.uid, fiscalyear_ids, print_info)
64 return res
65
66 def _get_movements(self):
67 move_line_obj = self.pool.get('account.move.line')
68 line_ids=move_line_obj.search(self.cr,self.uid,self.filters,order="id asc")
69 report_lines=move_line_obj.browse(self.cr,self.uid,line_ids)
70 return report_lines
71
72 def __init__(self, cr, uid, name, context):
73 self.filters=[]
74 super(central_journal_report, self).__init__(cr, uid, name, context)
75 self.localcontext.update({
76 'time': time,
77 'cr':cr,
78 'uid': uid,
79 'get_print_info': self._get_print_info,
80 'set_print_info': self._set_print_info,
81 'set_wizard_params': self._set_wizard_params,
82 'get_movements': self._get_movements,
83 })
84
85report_sxw.report_sxw('report.central_journal_report',
86 'account.move.line',
87 'addons/account_central_journal/report/central_journal_report.mako',
88 parser=central_journal_report)
089
=== added file 'account_central_journal/report/report.xml'
--- account_central_journal/report/report.xml 1970-01-01 00:00:00 +0000
+++ account_central_journal/report/report.xml 2012-06-27 10:38:24 +0000
@@ -0,0 +1,14 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <record id="central_journal_report_id" model="ir.actions.report.xml">
5 <field name="name">central_journal</field>
6 <field name="type">ir.actions.report.xml</field>
7 <field name="model">account.move.line</field>
8 <field name="report_name">central_journal_report</field>
9 <field name="report_rml">account_central_journal/report/central_journal_report.mako</field>
10 <field name="report_type">webkit</field>
11 </record>
12 </data>
13</openerp>
14
015
=== added file 'account_central_journal/report/webkit_model.xml'
--- account_central_journal/report/webkit_model.xml 1970-01-01 00:00:00 +0000
+++ account_central_journal/report/webkit_model.xml 2012-06-27 10:38:24 +0000
@@ -0,0 +1,107 @@
1<?xml version="1.0" ?>
2<openerp>
3 <data noupdate="1">
4 <record id="ir_header_central_journal_report" model="ir.header_webkit">
5 <field name="footer_html"></field>
6 <field eval="&quot;&quot;&quot;Landscape&quot;&quot;&quot;" name="orientation"/>
7 <field eval="&quot;&quot;&quot;A4&quot;&quot;&quot;" name="format"/>
8 <field name="html"><![CDATA[<html>
9 <head>
10 <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
11 <script>
12 function subst() {
13 var vars={};
14 var x=document.location.search.substring(1).split('&');
15 for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
16 var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
17 for(var i in x) {
18 var y = document.getElementsByClassName(x[i]);
19 for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
20 }
21 }
22 </script>
23 <style type="text/css">
24 ${css}
25 </style>
26 </head>
27 <body style="border:0; margin:0;" onload="subst()">
28 <table class="header" style="border-bottom: 0px solid black; width: 100%">
29 <tr>
30 <td style="text-align:left; padding: 5px 0px;">
31 <span style="font-weight: bold;">
32 ${company.partner_id.name |entity}&nbsp;
33 ${company.partner_id.vat or '' |entity}&nbsp;
34 ${company.partner_id.address and company.partner_id.address[0].street or '' |entity}&nbsp;
35 ${company.partner_id.address and company.partner_id.address[0].street2 or '' |entity}&nbsp;
36 ${company.partner_id.address and company.partner_id.address[0].zip or '' |entity}&nbsp;
37 ${company.partner_id.address and company.partner_id.address[0].city or '' |entity}&nbsp;</span>
38 </td>
39 </tr>
40 </table> ${_debug or ''|n}
41 </body>
42</html>]]>
43</field>
44 <field eval="20.0" name="margin_top"/>
45 <field eval="15.0" name="margin_bottom"/>
46 <field eval="15.0" name="margin_left"/>
47 <field eval="15.0" name="margin_right"/>
48 <field name="css" ><![CDATA[
49 /* http://meyerweb.com/eric/tools/css/reset/
50 v2.0 | 20110126
51 License: none (public domain)
52 */
53 /* START OF RESET CSS */
54 html, body, div, span, applet, object, iframe,
55 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
56 a, abbr, acronym, address, big, cite, code,
57 del, dfn, em, img, ins, kbd, q, s, samp,
58 small, strike, strong, sub, sup, tt, var,
59 b, u, i, center,
60 dl, dt, dd, ol, ul, li,
61 fieldset, form, label, legend,
62 table, caption, tbody, tfoot, thead, tr, th, td,
63 article, aside, canvas, details, embed,
64 figure, figcaption, footer, header, hgroup,
65 menu, nav, output, ruby, section, summary,
66 time, mark, audio, video {
67 margin: 0;
68 padding: 0;
69 border: 0;
70 font-size: 100%;
71 font: inherit;
72 vertical-align: baseline;
73 }
74 /* HTML5 display-role reset for older browsers */
75 article, aside, details, figcaption, figure,
76 footer, header, hgroup, menu, nav, section {
77 display: block;
78 }
79 body {
80 line-height: 1;
81 }
82 ol, ul {
83 list-style: none;
84 }
85 blockquote, q {
86 quotes: none;
87 }
88 blockquote:before, blockquote:after,
89 q:before, q:after {
90 content: '';
91 content: none;
92 }
93 table {
94 border-collapse: collapse;
95 border-spacing: 0;
96 }
97 /* END OF RESET CSS */
98
99 body {
100 font-family: font-family: Verdana, Arial, Helvetica, sans-serif;
101 font-size: 12px;
102 }
103]]> </field>
104 <field eval="&quot;&quot;&quot;Central Journal Report&quot;&quot;&quot;" name="name"/>
105 </record>
106 </data>
107</openerp>
0108
=== added directory 'account_central_journal/wizard'
=== added file 'account_central_journal/wizard/__init__.py'
--- account_central_journal/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/wizard/__init__.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import central_journal_report
023
=== added file 'account_central_journal/wizard/central_journal_report.py'
--- account_central_journal/wizard/central_journal_report.py 1970-01-01 00:00:00 +0000
+++ account_central_journal/wizard/central_journal_report.py 2012-06-27 10:38:24 +0000
@@ -0,0 +1,135 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 ISA s.r.l. (<http://www.isa.it>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from datetime import datetime, date, timedelta
24from osv import osv, fields
25from tools.translate import _
26
27class central_journal_report(osv.osv_memory):
28
29 _name = 'wizard.central.journal.report'
30 _description = 'Printing parameters of the Center Journal'
31
32 def _get_fiscal_years(self, cr, uid, context=None):
33 fiscalyear_obj = self.pool.get('account.fiscalyear')
34 fiscalyear_ids = fiscalyear_obj.search(cr, uid, [], order="id desc")
35 fiscalyears = []
36 for account_fiscalyear in fiscalyear_obj.browse(cr,uid,fiscalyear_ids) :
37 fiscalyears.append((account_fiscalyear.id, account_fiscalyear.name))
38 return fiscalyears
39
40 def _get_account_fiscalyear_data(self, cr, uid, ids, fiscalyear_id):
41 fiscalyear_obj = self.pool.get('account.fiscalyear')
42 fiscalyear_ids=fiscalyear_obj.search(cr,uid,[('id','=',fiscalyear_id),])
43 fiscalyear_data=fiscalyear_obj.browse(cr,uid,fiscalyear_ids)[0]
44 return fiscalyear_data
45
46 def _dates_control(self, str_date_start, str_date_end):
47 today_date = date.today()
48 date_start = datetime.strptime(str_date_start,"%Y-%m-%d").date()
49 date_stop = datetime.strptime(str_date_end,"%Y-%m-%d").date()
50 if date_start > date_stop:
51 raise osv.except_osv(_('Wrong dates !'), _("The end date must be greater than the initial date."))
52 return False
53 if date_stop > today_date:
54 raise osv.except_osv(_('Wrong dates !'), _("The end date can not be greater than today's date."))
55 return False
56 return True
57
58 def _get_report_datas(self, cr, uid, ids, context={}):
59 wizard_form_datas = self.read(cr, uid, ids)[0]
60 datas = {
61 'ids': [],
62 'model': 'account.move.line',
63 'form': wizard_form_datas,
64 }
65 return datas
66
67 _columns = {
68 'date_move_line_from': fields.date('From date', required=True,),
69 'date_move_line_from_view': fields.date('From date'),
70 'date_move_line_to': fields.date('to date', required=True),
71 'fiscalyear': fields.selection(_get_fiscal_years, 'Fiscal Year', required=True),
72 'print_state': fields.selection([('draft','Draft'),('print','Ready for printing'),('printed','Printed')],'State',readonly=True),
73 }
74
75 def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None):
76 print_state = 'draft'
77 date_move_line_from = date_move_line_from_view = False
78 date_move_line_to = False
79 if fiscalyear_id:
80 print_state = 'print'
81 fiscalyear_data = self._get_account_fiscalyear_data(cr, uid, ids, fiscalyear_id)
82 #set values
83 today_date = date.today()
84 date_start = datetime.strptime(fiscalyear_data.date_start,"%Y-%m-%d").date()
85 date_stop = datetime.strptime(fiscalyear_data.date_stop,"%Y-%m-%d").date()
86 #set date_move_line_from
87 if fiscalyear_data.date_last_print:
88 date_last_print = datetime.strptime(fiscalyear_data.date_last_print,"%Y-%m-%d").date()
89 date_move_line_from = date_move_line_from_view = (date_last_print+timedelta(days=1)).__str__()
90 if date_last_print == date_stop:
91 date_move_line_from = date_move_line_from_view = date_start.__str__()
92 print_state = 'printed'
93 else:
94 date_move_line_from = date_move_line_from_view = date_start.__str__()
95 #set date_move_line_to
96 if today_date > date_stop:
97 date_move_line_to = date_stop.__str__()
98 else:
99 date_move_line_to = (today_date-timedelta(days=1)).__str__()
100
101 return {'value': {
102 'date_move_line_from': date_move_line_from,
103 'date_move_line_from_view': date_move_line_from_view,
104 'date_move_line_to': date_move_line_to,
105 'print_state': print_state,
106 }
107 }
108
109 def print_report(self, cr, uid, ids, context={}):
110 datas = self._get_report_datas(cr, uid, ids, context)
111 if self._dates_control(datas['form']['date_move_line_from'],datas['form']['date_move_line_to']) == False:
112 return False
113 datas['print_final'] = False
114 return {
115 'type': 'ir.actions.report.xml',
116 'report_name': 'central_journal_report',
117 'datas': datas,
118 }
119
120 def print_report_final(self, cr, uid, ids, context={}):
121 datas = self._get_report_datas(cr, uid, ids, context)
122 if self._dates_control(datas['form']['date_move_line_from'],datas['form']['date_move_line_to']) == False:
123 return False
124 datas['print_final'] = True
125 return {
126 'type': 'ir.actions.report.xml',
127 'report_name': 'central_journal_report',
128 'datas': datas,
129 }
130
131 _defaults = {
132 'print_state': 'draft',
133 }
134
135central_journal_report()
0136
=== added file 'account_central_journal/wizard/central_journal_report.xml'
--- account_central_journal/wizard/central_journal_report.xml 1970-01-01 00:00:00 +0000
+++ account_central_journal/wizard/central_journal_report.xml 2012-06-27 10:38:24 +0000
@@ -0,0 +1,59 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <!--
6 Central Journal Report Filter View
7 -->
8
9 <record model="ir.ui.view" id="central_journal_report_form_view">
10 <field name="name">wizard.central.journal.report.form</field>
11 <field name="model">wizard.central.journal.report</field>
12 <field name="type">form</field>
13 <field name="arch" type="xml">
14 <form string="Printing parameters of the Center Journal">
15 <group colspan="4" col="4">
16 <separator colspan="4" string="Reference"/>
17 <field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/>
18 <separator colspan="4" string="Dates movements"/>
19 <field name="date_move_line_from" invisible="1"/>
20 <field name="date_move_line_from_view" readonly="1"/>
21 <field name="date_move_line_to" attrs="{'readonly':[('print_state','!=','print')]}"/>
22 </group>
23 <newline/>
24 <separator colspan="4"/>
25 <group colspan="4" col="6">
26 <field name="print_state"/>
27 <button special="cancel" string="Cancel" icon='gtk-cancel'/>
28 <button name="print_report" string="Print" type="object" icon="gtk-print" attrs="{'invisible':[('print_state','=','printed')]}"/>
29 <button name="print_report_final" string="Final print" type="object" icon="gtk-print" attrs="{'invisible':[('print_state','=','printed')]}"/>
30 </group>
31 </form>
32 </field>
33 </record>
34
35 <!--action -->
36 <record model="ir.actions.act_window" id="central_journal_report_action">
37 <field name="name">Print Central Journal</field>
38 <field name="type">ir.actions.act_window</field>
39 <field name="res_model">wizard.central.journal.report</field>
40 <field name="view_type">form</field>
41 <field name="view_mode">form</field>
42 <field name="target">new</field>
43 </record>
44
45 <!--this feature works only in this file. Don't move-->
46 <record model="ir.values" id="central_journal_report_webkit">
47 <field name="model_id" ref="account.model_account_move_line" />
48 <field name="object" eval="1" />
49 <field name="name">central_journal</field>
50 <field name="key2">client_print_multi</field>
51 <field name="value" eval="'ir.actions.act_window,' + str(ref('central_journal_report_action'))" />
52 <field name="key">action</field>
53 <field name="model">account.move.line</field>
54 </record>
55
56 <menuitem id="menu_central_journal_report_action" parent="account.menu_finance_legal_statement" action="central_journal_report_action"/>
57
58 </data>
59</openerp>

Subscribers

People subscribed via source and target branches