Merge lp:~vauxoo/addons-vauxoo/7.0-invoice_report_per_journal-dev_sabrina into lp:addons-vauxoo/7.0
- 7.0-invoice_report_per_journal-dev_sabrina
- Merge into 7.0
Proposed by
Sabrina Romero - http://www.vauxoo.com
Status: | Merged |
---|---|
Merged at revision: | 1054 |
Proposed branch: | lp:~vauxoo/addons-vauxoo/7.0-invoice_report_per_journal-dev_sabrina |
Merge into: | lp:addons-vauxoo/7.0 |
Diff against target: |
766 lines (+677/-0) 16 files modified
invoice_report_per_journal/__init__.py (+27/-0) invoice_report_per_journal/__openerp__.py (+60/-0) invoice_report_per_journal/data/data.xml (+75/-0) invoice_report_per_journal/i18n/invoice_report_per_journal.pot (+73/-0) invoice_report_per_journal/model/__init__.py (+25/-0) invoice_report_per_journal/model/account_journal.py (+40/-0) invoice_report_per_journal/report/__init__.py (+25/-0) invoice_report_per_journal/report/invoice_report_demo.mako (+21/-0) invoice_report_per_journal/report/invoice_report_demo.py (+52/-0) invoice_report_per_journal/report/invoice_report_demo.xml (+20/-0) invoice_report_per_journal/test/invoice_report_per_journal.yml (+62/-0) invoice_report_per_journal/view/account_invoice_view.xml (+15/-0) invoice_report_per_journal/view/account_journal_view.xml (+15/-0) invoice_report_per_journal/wizard/__init__.py (+25/-0) invoice_report_per_journal/wizard/invoice_report_per_journal.py (+111/-0) invoice_report_per_journal/wizard/invoice_report_per_journal.xml (+31/-0) |
To merge this branch: | bzr merge lp:~vauxoo/addons-vauxoo/7.0-invoice_report_per_journal-dev_sabrina |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jose Antonio Morales Ponce(vauxoo) - - http://www.vauxoo.com | Pending | ||
Sabrina Romero - http://www.vauxoo.com | Pending | ||
Jorge Angel Naranjo Rogel - http://www.vauxoo.com | Pending | ||
Moisés López - http://www.vauxoo.com | Pending | ||
Review via email: mp+222959@code.launchpad.net |
Commit message
Description of the change
Module invoice_
This module adds a "Report" field on the journal model and a "Print Invoice" button on the customer invoices view which calls a wizard to print an invoice on a report per journal enviroment.
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 'invoice_report_per_journal' | |||
2 | === added file 'invoice_report_per_journal/__init__.py' | |||
3 | --- invoice_report_per_journal/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ invoice_report_per_journal/__init__.py 2014-06-12 15:03:58 +0000 | |||
5 | @@ -0,0 +1,27 @@ | |||
6 | 1 | # -*- encoding: utf-8 -*- # | ||
7 | 2 | ############################################################################ | ||
8 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
9 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
10 | 5 | # All Rights Reserved # | ||
11 | 6 | ###############Credits###################################################### | ||
12 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
13 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
14 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
15 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
16 | 11 | ############################################################################ | ||
17 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
18 | 13 | # it under the terms of the GNU General Public License as published by # | ||
19 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
20 | 15 | # (at your option) any later version. # | ||
21 | 16 | # # | ||
22 | 17 | # This program is distributed in the hope that it will be useful, # | ||
23 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
24 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
25 | 20 | # GNU General Public License for more details. # | ||
26 | 21 | # # | ||
27 | 22 | # You should have received a copy of the GNU General Public License # | ||
28 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
29 | 24 | ############################################################################ | ||
30 | 25 | import model | ||
31 | 26 | import wizard | ||
32 | 27 | import report | ||
33 | 0 | 28 | ||
34 | === added file 'invoice_report_per_journal/__openerp__.py' | |||
35 | --- invoice_report_per_journal/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
36 | +++ invoice_report_per_journal/__openerp__.py 2014-06-12 15:03:58 +0000 | |||
37 | @@ -0,0 +1,60 @@ | |||
38 | 1 | # -*- encoding: utf-8 -*- # | ||
39 | 2 | ############################################################################ | ||
40 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
41 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
42 | 5 | # All Rights Reserved # | ||
43 | 6 | ###############Credits###################################################### | ||
44 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
45 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
46 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
47 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
48 | 11 | ############################################################################ | ||
49 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
50 | 13 | # it under the terms of the GNU General Public License as published by # | ||
51 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
52 | 15 | # (at your option) any later version. # | ||
53 | 16 | # # | ||
54 | 17 | # This program is distributed in the hope that it will be useful, # | ||
55 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
56 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
57 | 20 | # GNU General Public License for more details. # | ||
58 | 21 | # # | ||
59 | 22 | # You should have received a copy of the GNU General Public License # | ||
60 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
61 | 24 | ############################################################################ | ||
62 | 25 | |||
63 | 26 | { | ||
64 | 27 | "name" : "Account Invoice Per Journal Report", | ||
65 | 28 | "version" : "1.0", | ||
66 | 29 | "author" : "Vauxoo", | ||
67 | 30 | "category" : "Generic Modules", | ||
68 | 31 | "description" : | ||
69 | 32 | """ | ||
70 | 33 | Adds a "Report" field on the journal model and a "Print Invoice" button on the customer invoices view which calls | ||
71 | 34 | a wizard to print an invoice on a report per journal enviroment. | ||
72 | 35 | |||
73 | 36 | This module allows the generation of txt reports using the following convention: | ||
74 | 37 | |||
75 | 38 | * Must be a report wizard type to return the txt report. | ||
76 | 39 | * The report wizard type must have the same name as his counterpart in pdf format concatenating the following string ' txt' in the report name. | ||
77 | 40 | |||
78 | 41 | In this way the module generates both reports, making available for download the report txt. | ||
79 | 42 | """, | ||
80 | 43 | "website" : "http://www.vauxoo.com/", | ||
81 | 44 | "license" : "AGPL-3", | ||
82 | 45 | "depends" : ["account", "report_webkit" | ||
83 | 46 | ], | ||
84 | 47 | "demo" : [], | ||
85 | 48 | "data" : [ | ||
86 | 49 | "data/data.xml", | ||
87 | 50 | "view/account_journal_view.xml", | ||
88 | 51 | "wizard/invoice_report_per_journal.xml", | ||
89 | 52 | "view/account_invoice_view.xml", | ||
90 | 53 | "report/invoice_report_demo.xml", | ||
91 | 54 | ], | ||
92 | 55 | 'test': [ | ||
93 | 56 | 'test/invoice_report_per_journal.yml' | ||
94 | 57 | ], | ||
95 | 58 | "installable" : True, | ||
96 | 59 | "active" : False, | ||
97 | 60 | } | ||
98 | 0 | 61 | ||
99 | === added directory 'invoice_report_per_journal/data' | |||
100 | === added file 'invoice_report_per_journal/data/data.xml' | |||
101 | --- invoice_report_per_journal/data/data.xml 1970-01-01 00:00:00 +0000 | |||
102 | +++ invoice_report_per_journal/data/data.xml 2014-06-12 15:03:58 +0000 | |||
103 | @@ -0,0 +1,75 @@ | |||
104 | 1 | <?xml version="1.0" ?> | ||
105 | 2 | <openerp> | ||
106 | 3 | <data noupdate="0"> | ||
107 | 4 | <record id="ir_header_webkit_invoice_report_demo" model="ir.header_webkit"> | ||
108 | 5 | <field name="footer_html"><![CDATA[<!DOCTYPE><html> | ||
109 | 6 | <head> | ||
110 | 7 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
111 | 8 | <script> | ||
112 | 9 | function subst() { | ||
113 | 10 | var vars={}; | ||
114 | 11 | var x=document.location.search.substring(1).split('&'); | ||
115 | 12 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
116 | 13 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
117 | 14 | for(var i in x) { | ||
118 | 15 | var y = document.getElementsByClassName(x[i]); | ||
119 | 16 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
120 | 17 | } | ||
121 | 18 | } | ||
122 | 19 | </script> | ||
123 | 20 | </head> | ||
124 | 21 | <body style="border:0; margin: 0;" onload="subst()"> | ||
125 | 22 | <table style="border-top: 1px solid black; width: 100%"> | ||
126 | 23 | <tr > | ||
127 | 24 | <td style="text-align:right;font-size:9;" width="35%">Generado con software libre en OpenERP y Webkit por http://www.vauxoo.com</td> | ||
128 | 25 | <td style="text-align:right;font-size:12;" width="55%">Page <span class="page"/></td><td style="text-align:left;font-size:12;"> of <span class="topage"/></td> | ||
129 | 26 | </tr> | ||
130 | 27 | </table> | ||
131 | 28 | </body> | ||
132 | 29 | </html>]]></field> | ||
133 | 30 | <field name="orientation">Portrait</field> | ||
134 | 31 | <field name="format">Letter</field> | ||
135 | 32 | <field name="html"><![CDATA[<!DOCTYPE><html> | ||
136 | 33 | <head> | ||
137 | 34 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
138 | 35 | <script> | ||
139 | 36 | function subst() { | ||
140 | 37 | var vars={}; | ||
141 | 38 | var x=document.location.search.substring(1).split('&'); | ||
142 | 39 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
143 | 40 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
144 | 41 | for(var i in x) { | ||
145 | 42 | var y = document.getElementsByClassName(x[i]); | ||
146 | 43 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
147 | 44 | } | ||
148 | 45 | } | ||
149 | 46 | </script> | ||
150 | 47 | <style type="text/css"> | ||
151 | 48 | ${css} | ||
152 | 49 | </style> | ||
153 | 50 | </head> | ||
154 | 51 | <body style="border:0; margin: 0;" onload="subst()"> | ||
155 | 52 | ${_debug or ''|n} </body> | ||
156 | 53 | </html>]]> | ||
157 | 54 | </field> | ||
158 | 55 | <field eval="0.0" name="margin_top"/> | ||
159 | 56 | <field name="css" ><![CDATA[ | ||
160 | 57 | |||
161 | 58 | body{ | ||
162 | 59 | font-family:helvetica; | ||
163 | 60 | font-size:9; | ||
164 | 61 | margin:0; | ||
165 | 62 | padding:0; | ||
166 | 63 | height:100%; | ||
167 | 64 | line-height:12px; | ||
168 | 65 | } | ||
169 | 66 | |||
170 | 67 | ]]> </field> | ||
171 | 68 | <field name="name">Invoice Demo Report</field> | ||
172 | 69 | </record> | ||
173 | 70 | <record id="ir_header_img_companylogo0" model="ir.header_img"> | ||
174 | 71 | <field eval=""""jpg"""" name="type"/> | ||
175 | 72 | <field eval=""""company_logo"""" name="name"/> | ||
176 | 73 | </record> | ||
177 | 74 | </data> | ||
178 | 75 | </openerp> | ||
179 | 0 | 76 | ||
180 | === added directory 'invoice_report_per_journal/demo' | |||
181 | === added directory 'invoice_report_per_journal/i18n' | |||
182 | === added file 'invoice_report_per_journal/i18n/invoice_report_per_journal.pot' | |||
183 | --- invoice_report_per_journal/i18n/invoice_report_per_journal.pot 1970-01-01 00:00:00 +0000 | |||
184 | +++ invoice_report_per_journal/i18n/invoice_report_per_journal.pot 2014-06-12 15:03:58 +0000 | |||
185 | @@ -0,0 +1,73 @@ | |||
186 | 1 | # Translation of OpenERP Server. | ||
187 | 2 | # This file contains the translation of the following modules: | ||
188 | 3 | # * invoice_report_per_journal | ||
189 | 4 | # | ||
190 | 5 | msgid "" | ||
191 | 6 | msgstr "" | ||
192 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
193 | 8 | "Report-Msgid-Bugs-To: \n" | ||
194 | 9 | "POT-Creation-Date: 2014-06-10 18:42+0000\n" | ||
195 | 10 | "PO-Revision-Date: 2014-06-10 18:42+0000\n" | ||
196 | 11 | "Last-Translator: <>\n" | ||
197 | 12 | "Language-Team: \n" | ||
198 | 13 | "MIME-Version: 1.0\n" | ||
199 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
200 | 15 | "Content-Transfer-Encoding: \n" | ||
201 | 16 | "Plural-Forms: \n" | ||
202 | 17 | |||
203 | 18 | #. module: invoice_report_per_journal | ||
204 | 19 | #: code:addons/invoice_report_per_journal/wizard/invoice_report_per_journal.py:43 | ||
205 | 20 | #, python-format | ||
206 | 21 | msgid "ERROR !" | ||
207 | 22 | msgstr "" | ||
208 | 23 | |||
209 | 24 | #. module: invoice_report_per_journal | ||
210 | 25 | #: code:addons/invoice_report_per_journal/wizard/invoice_report_per_journal.py:43 | ||
211 | 26 | #, python-format | ||
212 | 27 | msgid "There is no journal configured for this invoice." | ||
213 | 28 | msgstr "" | ||
214 | 29 | |||
215 | 30 | #. module: invoice_report_per_journal | ||
216 | 31 | #: report:addons/invoice_report_per_journal/report/invoice_report_demo.mako:14 | ||
217 | 32 | #: model:ir.actions.report.xml,name:invoice_report_per_journal.invoice_report_demo | ||
218 | 33 | msgid "Invoice Demo Report" | ||
219 | 34 | msgstr "" | ||
220 | 35 | |||
221 | 36 | #. module: invoice_report_per_journal | ||
222 | 37 | #: field:invoice.report.per.journal,journal:0 | ||
223 | 38 | #: model:ir.model,name:invoice_report_per_journal.model_account_journal | ||
224 | 39 | msgid "Journal" | ||
225 | 40 | msgstr "" | ||
226 | 41 | |||
227 | 42 | #. module: invoice_report_per_journal | ||
228 | 43 | #: field:invoice.report.per.journal,report_format:0 | ||
229 | 44 | msgid "Report" | ||
230 | 45 | msgstr "" | ||
231 | 46 | |||
232 | 47 | #. module: invoice_report_per_journal | ||
233 | 48 | #: view:invoice.report.per.journal:0 | ||
234 | 49 | #: model:ir.actions.act_window,name:invoice_report_per_journal.invoice_report_per_journal | ||
235 | 50 | msgid "Print" | ||
236 | 51 | msgstr "" | ||
237 | 52 | |||
238 | 53 | #. module: invoice_report_per_journal | ||
239 | 54 | #: field:account.journal,invoice_report_id:0 | ||
240 | 55 | msgid "Invoice Report" | ||
241 | 56 | msgstr "" | ||
242 | 57 | |||
243 | 58 | #. module: invoice_report_per_journal | ||
244 | 59 | #: view:invoice.report.per.journal:0 | ||
245 | 60 | msgid "Cancel" | ||
246 | 61 | msgstr "" | ||
247 | 62 | |||
248 | 63 | #. module: invoice_report_per_journal | ||
249 | 64 | #: model:ir.model,name:invoice_report_per_journal.model_invoice_report_per_journal | ||
250 | 65 | msgid "invoice.report.per.journal" | ||
251 | 66 | msgstr "" | ||
252 | 67 | |||
253 | 68 | #. module: invoice_report_per_journal | ||
254 | 69 | #: view:account.invoice:0 | ||
255 | 70 | #: view:invoice.report.per.journal:0 | ||
256 | 71 | msgid "Print Invoice" | ||
257 | 72 | msgstr "" | ||
258 | 73 | |||
259 | 0 | 74 | ||
260 | === added directory 'invoice_report_per_journal/model' | |||
261 | === added file 'invoice_report_per_journal/model/__init__.py' | |||
262 | --- invoice_report_per_journal/model/__init__.py 1970-01-01 00:00:00 +0000 | |||
263 | +++ invoice_report_per_journal/model/__init__.py 2014-06-12 15:03:58 +0000 | |||
264 | @@ -0,0 +1,25 @@ | |||
265 | 1 | # -*- encoding: utf-8 -*- # | ||
266 | 2 | ############################################################################ | ||
267 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
268 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
269 | 5 | # All Rights Reserved # | ||
270 | 6 | ###############Credits###################################################### | ||
271 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
272 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
273 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
274 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
275 | 11 | ############################################################################ | ||
276 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
277 | 13 | # it under the terms of the GNU General Public License as published by # | ||
278 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
279 | 15 | # (at your option) any later version. # | ||
280 | 16 | # # | ||
281 | 17 | # This program is distributed in the hope that it will be useful, # | ||
282 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
283 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
284 | 20 | # GNU General Public License for more details. # | ||
285 | 21 | # # | ||
286 | 22 | # You should have received a copy of the GNU General Public License # | ||
287 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
288 | 24 | ############################################################################ | ||
289 | 25 | import account_journal | ||
290 | 0 | 26 | ||
291 | === added file 'invoice_report_per_journal/model/account_journal.py' | |||
292 | --- invoice_report_per_journal/model/account_journal.py 1970-01-01 00:00:00 +0000 | |||
293 | +++ invoice_report_per_journal/model/account_journal.py 2014-06-12 15:03:58 +0000 | |||
294 | @@ -0,0 +1,40 @@ | |||
295 | 1 | # -*- encoding: utf-8 -*- # | ||
296 | 2 | ############################################################################ | ||
297 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
298 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
299 | 5 | # All Rights Reserved # | ||
300 | 6 | ###############Credits###################################################### | ||
301 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
302 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
303 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
304 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
305 | 11 | ############################################################################ | ||
306 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
307 | 13 | # it under the terms of the GNU General Public License as published by # | ||
308 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
309 | 15 | # (at your option) any later version. # | ||
310 | 16 | # # | ||
311 | 17 | # This program is distributed in the hope that it will be useful, # | ||
312 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
313 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
314 | 20 | # GNU General Public License for more details. # | ||
315 | 21 | # # | ||
316 | 22 | # You should have received a copy of the GNU General Public License # | ||
317 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
318 | 24 | ############################################################################ | ||
319 | 25 | |||
320 | 26 | from openerp.osv import fields, osv | ||
321 | 27 | from openerp.tools.translate import _ | ||
322 | 28 | |||
323 | 29 | |||
324 | 30 | class invoice_report_per_journal(osv.Model): | ||
325 | 31 | """ | ||
326 | 32 | invoice_report_per_journal | ||
327 | 33 | """ | ||
328 | 34 | |||
329 | 35 | _inherit = 'account.journal' | ||
330 | 36 | _columns = { | ||
331 | 37 | 'invoice_report_id': fields.many2one('ir.actions.report.xml', | ||
332 | 38 | 'Invoice Report', required=False, | ||
333 | 39 | domain="[('model','=','account.invoice')]"), | ||
334 | 40 | } | ||
335 | 0 | 41 | ||
336 | === added directory 'invoice_report_per_journal/report' | |||
337 | === added file 'invoice_report_per_journal/report/__init__.py' | |||
338 | --- invoice_report_per_journal/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
339 | +++ invoice_report_per_journal/report/__init__.py 2014-06-12 15:03:58 +0000 | |||
340 | @@ -0,0 +1,25 @@ | |||
341 | 1 | # -*- encoding: utf-8 -*- # | ||
342 | 2 | ############################################################################ | ||
343 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
344 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
345 | 5 | # All Rights Reserved # | ||
346 | 6 | ###############Credits###################################################### | ||
347 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
348 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
349 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
350 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
351 | 11 | ############################################################################ | ||
352 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
353 | 13 | # it under the terms of the GNU General Public License as published by # | ||
354 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
355 | 15 | # (at your option) any later version. # | ||
356 | 16 | # # | ||
357 | 17 | # This program is distributed in the hope that it will be useful, # | ||
358 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
359 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
360 | 20 | # GNU General Public License for more details. # | ||
361 | 21 | # # | ||
362 | 22 | # You should have received a copy of the GNU General Public License # | ||
363 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
364 | 24 | ############################################################################ | ||
365 | 25 | import invoice_report_demo | ||
366 | 0 | 26 | ||
367 | === added file 'invoice_report_per_journal/report/invoice_report_demo.mako' | |||
368 | --- invoice_report_per_journal/report/invoice_report_demo.mako 1970-01-01 00:00:00 +0000 | |||
369 | +++ invoice_report_per_journal/report/invoice_report_demo.mako 2014-06-12 15:03:58 +0000 | |||
370 | @@ -0,0 +1,21 @@ | |||
371 | 1 | <!DOCTYPE> | ||
372 | 2 | <html> | ||
373 | 3 | <head> | ||
374 | 4 | <style type="text/css"> | ||
375 | 5 | ${css} | ||
376 | 6 | </style> | ||
377 | 7 | </head> | ||
378 | 8 | <body> | ||
379 | 9 | %for o in objects : | ||
380 | 10 | <table> | ||
381 | 11 | <tr> | ||
382 | 12 | <td> | ||
383 | 13 | <div> | ||
384 | 14 | ${_("Invoice Demo Report")} | ||
385 | 15 | </div> | ||
386 | 16 | </td> | ||
387 | 17 | </tr> | ||
388 | 18 | </table> | ||
389 | 19 | %endfor | ||
390 | 20 | </body> | ||
391 | 21 | </html> | ||
392 | 0 | 22 | ||
393 | === added file 'invoice_report_per_journal/report/invoice_report_demo.py' | |||
394 | --- invoice_report_per_journal/report/invoice_report_demo.py 1970-01-01 00:00:00 +0000 | |||
395 | +++ invoice_report_per_journal/report/invoice_report_demo.py 2014-06-12 15:03:58 +0000 | |||
396 | @@ -0,0 +1,52 @@ | |||
397 | 1 | # -*- encoding: utf-8 -*- | ||
398 | 2 | ########################################################################### | ||
399 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
400 | 4 | # | ||
401 | 5 | # Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/ | ||
402 | 6 | # All Rights Reserved. | ||
403 | 7 | # info Vauxoo (info@vauxoo.com) | ||
404 | 8 | ############################################################################ | ||
405 | 9 | # Coded by: Luis Torres (luis_t@vauxoo.com) | ||
406 | 10 | ############################################################################ | ||
407 | 11 | # | ||
408 | 12 | # This program is free software: you can redistribute it and/or modify | ||
409 | 13 | # it under the terms of the GNU Affero General Public License as | ||
410 | 14 | # published by the Free Software Foundation, either version 3 of the | ||
411 | 15 | # License, or (at your option) any later version. | ||
412 | 16 | # | ||
413 | 17 | # This program is distributed in the hope that it will be useful, | ||
414 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
415 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
416 | 20 | # GNU Affero General Public License for more details. | ||
417 | 21 | # | ||
418 | 22 | # You should have received a copy of the GNU Affero General Public License | ||
419 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
420 | 24 | # | ||
421 | 25 | ############################################################################## | ||
422 | 26 | |||
423 | 27 | from openerp.report import report_sxw | ||
424 | 28 | from openerp import pooler | ||
425 | 29 | from openerp.tools.translate import _ | ||
426 | 30 | from openerp import tools | ||
427 | 31 | from openerp import tests | ||
428 | 32 | from openerp.osv import osv | ||
429 | 33 | from openerp import netsvc | ||
430 | 34 | import openerp | ||
431 | 35 | from report_webkit import webkit_report | ||
432 | 36 | import datetime | ||
433 | 37 | |||
434 | 38 | class invoice_report_demo_html(report_sxw.rml_parse): | ||
435 | 39 | def __init__(self, cr, uid, name, context=None): | ||
436 | 40 | if context is None: | ||
437 | 41 | context = {} | ||
438 | 42 | super(invoice_report_demo_html, self).__init__( | ||
439 | 43 | cr, uid, name, context=context) | ||
440 | 44 | self.localcontext.update({ | ||
441 | 45 | }) | ||
442 | 46 | |||
443 | 47 | webkit_report.WebKitParser('report.invoice.report.demo.webkit', | ||
444 | 48 | 'account.invoice', | ||
445 | 49 | 'addons/invoice_report_per_journal/report/invoice_report_demo.mako', | ||
446 | 50 | parser=invoice_report_demo_html) | ||
447 | 51 | |||
448 | 52 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
449 | 0 | 53 | ||
450 | === added file 'invoice_report_per_journal/report/invoice_report_demo.xml' | |||
451 | --- invoice_report_per_journal/report/invoice_report_demo.xml 1970-01-01 00:00:00 +0000 | |||
452 | +++ invoice_report_per_journal/report/invoice_report_demo.xml 2014-06-12 15:03:58 +0000 | |||
453 | @@ -0,0 +1,20 @@ | |||
454 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
455 | 2 | <openerp> | ||
456 | 3 | <data> | ||
457 | 4 | <report auto="False" | ||
458 | 5 | menu="False" | ||
459 | 6 | id="invoice_report_demo" | ||
460 | 7 | model="account.invoice" | ||
461 | 8 | name="invoice.report.demo.webkit" | ||
462 | 9 | file="invoice_report_per_journal/report/invoice_report_demo.mako" | ||
463 | 10 | string="Invoice Demo Report" | ||
464 | 11 | report_type="webkit"/> | ||
465 | 12 | |||
466 | 13 | <record id="property_invoice_report_demo_webkit" model="ir.property"> | ||
467 | 14 | <field name="name">webkit_header</field> | ||
468 | 15 | <field name="fields_id" ref="report_webkit.field_ir_act_report_xml_webkit_header"/> | ||
469 | 16 | <field eval="'ir.header_webkit,'+str(ref('invoice_report_per_journal.ir_header_webkit_invoice_report_demo'))" model="ir.header_webkit" name="value"/> | ||
470 | 17 | <field eval="'ir.actions.report.xml,'+str(ref('invoice_report_per_journal.invoice_report_demo'))" model="ir.actions.report.xml" name="res_id"/> | ||
471 | 18 | </record> | ||
472 | 19 | </data> | ||
473 | 20 | </openerp> | ||
474 | 0 | 21 | ||
475 | === added directory 'invoice_report_per_journal/security' | |||
476 | === added directory 'invoice_report_per_journal/test' | |||
477 | === added file 'invoice_report_per_journal/test/invoice_report_per_journal.yml' | |||
478 | --- invoice_report_per_journal/test/invoice_report_per_journal.yml 1970-01-01 00:00:00 +0000 | |||
479 | +++ invoice_report_per_journal/test/invoice_report_per_journal.yml 2014-06-12 15:03:58 +0000 | |||
480 | @@ -0,0 +1,62 @@ | |||
481 | 1 | - | ||
482 | 2 | Reports Per Journal On Invoice Tests | ||
483 | 3 | - | ||
484 | 4 | 1.- In order to test reports per journal on invoices, we will test the wizard without a report assigned in the journal | ||
485 | 5 | - | ||
486 | 6 | 1.1.- I create a customer invoice | ||
487 | 7 | - | ||
488 | 8 | !record {model: account.invoice, id: account_invoice_customer0 , view: account.invoice_form}: &account_invoice | ||
489 | 9 | payment_term: account.account_payment_term_advance | ||
490 | 10 | journal_id: account.sales_journal | ||
491 | 11 | partner_id: base.res_partner_3 | ||
492 | 12 | reference_type: none | ||
493 | 13 | name: 'Test Customer Invoice' | ||
494 | 14 | invoice_line: | ||
495 | 15 | - product_id: product.product_product_5 | ||
496 | 16 | quantity: 10.0 | ||
497 | 17 | price_unit: 1 | ||
498 | 18 | - | ||
499 | 19 | 1.2.- I overwrite the journal field (It is necessary overwrite the field to make it work! only in test yaml (BUG)) | ||
500 | 20 | - | ||
501 | 21 | !record {model: account.invoice, id: account_invoice_customer0, view: account.invoice_form}: | ||
502 | 22 | journal_id: account.sales_journal | ||
503 | 23 | - | ||
504 | 24 | 1.3.- I check that initially customer invoice state is "Draft" | ||
505 | 25 | - | ||
506 | 26 | !assert {model: account.invoice, id: account_invoice_customer0}: | ||
507 | 27 | - state == 'draft' | ||
508 | 28 | - | ||
509 | 29 | 1.4.- I check that the customer invoice is a "Customer Invoice" | ||
510 | 30 | - | ||
511 | 31 | !assert {model: account.invoice, id: account_invoice_customer0, string: This is not a customer invoice}: | ||
512 | 32 | - type == 'out_invoice' | ||
513 | 33 | - | ||
514 | 34 | 1.5.- I change the state of invoice to open by clicking Validate button | ||
515 | 35 | - | ||
516 | 36 | !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_customer0} | ||
517 | 37 | - | ||
518 | 38 | 1.6.- I check that the invoice state is now "Open" | ||
519 | 39 | - | ||
520 | 40 | !assert {model: account.invoice, id: account_invoice_customer0}: | ||
521 | 41 | - state == 'open' | ||
522 | 42 | - | ||
523 | 43 | 1.7.- I generate the default invoice report through the wizard | ||
524 | 44 | - | ||
525 | 45 | !python {model: invoice.report.per.journal}: | | ||
526 | 46 | context={} | ||
527 | 47 | context.update({'active_model': 'account.invoice', 'active_ids': [ref('account_invoice_customer0')]}) | ||
528 | 48 | self._get_journal(cr, uid, context) | ||
529 | 49 | self._get_report(cr, uid, context) | ||
530 | 50 | - | ||
531 | 51 | 2.- In order to test the report defined on an journal, we will set the Invoice Demo Report to the Sale Journal | ||
532 | 52 | - | ||
533 | 53 | !python {model: account.journal}: | | ||
534 | 54 | self.write(cr, uid, [ref('account.sales_journal')], {'invoice_report_id': ref('invoice_report_per_journal.invoice_report_demo')}) | ||
535 | 55 | - | ||
536 | 56 | 2.1.- I generate the report assigned in the journal through the wizard | ||
537 | 57 | - | ||
538 | 58 | !python {model: invoice.report.per.journal}: | | ||
539 | 59 | context={} | ||
540 | 60 | context.update({'active_model': 'account.invoice', 'active_ids': [ref('account_invoice_customer0')]}) | ||
541 | 61 | self._get_journal(cr, uid, context) | ||
542 | 62 | self._get_report(cr, uid, context) | ||
543 | 0 | 63 | ||
544 | === added directory 'invoice_report_per_journal/view' | |||
545 | === added file 'invoice_report_per_journal/view/account_invoice_view.xml' | |||
546 | --- invoice_report_per_journal/view/account_invoice_view.xml 1970-01-01 00:00:00 +0000 | |||
547 | +++ invoice_report_per_journal/view/account_invoice_view.xml 2014-06-12 15:03:58 +0000 | |||
548 | @@ -0,0 +1,15 @@ | |||
549 | 1 | <?xml version='1.0' encoding='utf-8'?> | ||
550 | 2 | <openerp> | ||
551 | 3 | <data> | ||
552 | 4 | <record model="ir.ui.view" id="view_invoice_report_per_journal_form_inherit"> | ||
553 | 5 | <field name="name">invoice.report.per.journal.form</field> | ||
554 | 6 | <field name="model">account.invoice</field> | ||
555 | 7 | <field name="inherit_id" ref="account.invoice_form"/> | ||
556 | 8 | <field name="arch" type="xml"> | ||
557 | 9 | <xpath expr="//button[@string='Print Invoice']" position="replace"> | ||
558 | 10 | <button name="%(invoice_report_per_journal)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/> | ||
559 | 11 | </xpath> | ||
560 | 12 | </field> | ||
561 | 13 | </record> | ||
562 | 14 | </data> | ||
563 | 15 | </openerp> | ||
564 | 0 | 16 | ||
565 | === added file 'invoice_report_per_journal/view/account_journal_view.xml' | |||
566 | --- invoice_report_per_journal/view/account_journal_view.xml 1970-01-01 00:00:00 +0000 | |||
567 | +++ invoice_report_per_journal/view/account_journal_view.xml 2014-06-12 15:03:58 +0000 | |||
568 | @@ -0,0 +1,15 @@ | |||
569 | 1 | <?xml version='1.0' encoding='utf-8'?> | ||
570 | 2 | <openerp> | ||
571 | 3 | <data> | ||
572 | 4 | <record model="ir.ui.view" id="account_journal_form_inherit"> | ||
573 | 5 | <field name="name">account.journal.form.inherit</field> | ||
574 | 6 | <field name="model">account.journal</field> | ||
575 | 7 | <field name="inherit_id" ref="account.view_account_journal_form"/> | ||
576 | 8 | <field name="arch" type="xml"> | ||
577 | 9 | <field name="sequence_id" position="after"> | ||
578 | 10 | <field name="invoice_report_id" attrs="{'invisible': [('type', 'not in', ('sale','sale_refund'))]}" /> | ||
579 | 11 | </field> | ||
580 | 12 | </field> | ||
581 | 13 | </record> | ||
582 | 14 | </data> | ||
583 | 15 | </openerp> | ||
584 | 0 | 16 | ||
585 | === added directory 'invoice_report_per_journal/wizard' | |||
586 | === added file 'invoice_report_per_journal/wizard/__init__.py' | |||
587 | --- invoice_report_per_journal/wizard/__init__.py 1970-01-01 00:00:00 +0000 | |||
588 | +++ invoice_report_per_journal/wizard/__init__.py 2014-06-12 15:03:58 +0000 | |||
589 | @@ -0,0 +1,25 @@ | |||
590 | 1 | # -*- encoding: utf-8 -*- # | ||
591 | 2 | ############################################################################ | ||
592 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
593 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
594 | 5 | # All Rights Reserved # | ||
595 | 6 | ###############Credits###################################################### | ||
596 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
597 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
598 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
599 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
600 | 11 | ############################################################################ | ||
601 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
602 | 13 | # it under the terms of the GNU General Public License as published by # | ||
603 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
604 | 15 | # (at your option) any later version. # | ||
605 | 16 | # # | ||
606 | 17 | # This program is distributed in the hope that it will be useful, # | ||
607 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
608 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
609 | 20 | # GNU General Public License for more details. # | ||
610 | 21 | # # | ||
611 | 22 | # You should have received a copy of the GNU General Public License # | ||
612 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
613 | 24 | ############################################################################ | ||
614 | 25 | import invoice_report_per_journal | ||
615 | 0 | 26 | ||
616 | === added file 'invoice_report_per_journal/wizard/invoice_report_per_journal.py' | |||
617 | --- invoice_report_per_journal/wizard/invoice_report_per_journal.py 1970-01-01 00:00:00 +0000 | |||
618 | +++ invoice_report_per_journal/wizard/invoice_report_per_journal.py 2014-06-12 15:03:58 +0000 | |||
619 | @@ -0,0 +1,111 @@ | |||
620 | 1 | # -*- encoding: utf-8 -*- # | ||
621 | 2 | ############################################################################ | ||
622 | 3 | # Module Writen to OpenERP, Open Source Management Solution # | ||
623 | 4 | # Copyright (C) Vauxoo (<http://vauxoo.com>). # | ||
624 | 5 | # All Rights Reserved # | ||
625 | 6 | ###############Credits###################################################### | ||
626 | 7 | # Coded by: Sabrina Romero (sabrina@vauxoo.com) # | ||
627 | 8 | # Planified by: Nhomar Hernandez (nhomar@vauxoo.com) # | ||
628 | 9 | # Finance by: COMPANY NAME <EMAIL-COMPANY> # | ||
629 | 10 | # Audited by: author NAME LASTNAME <email@vauxoo.com> # | ||
630 | 11 | ############################################################################ | ||
631 | 12 | # This program is free software: you can redistribute it and/or modify # | ||
632 | 13 | # it under the terms of the GNU General Public License as published by # | ||
633 | 14 | # the Free Software Foundation, either version 3 of the License, or # | ||
634 | 15 | # (at your option) any later version. # | ||
635 | 16 | # # | ||
636 | 17 | # This program is distributed in the hope that it will be useful, # | ||
637 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | ||
638 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | ||
639 | 20 | # GNU General Public License for more details. # | ||
640 | 21 | # # | ||
641 | 22 | # You should have received a copy of the GNU General Public License # | ||
642 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | ||
643 | 24 | ############################################################################ | ||
644 | 25 | from openerp.osv import fields, osv | ||
645 | 26 | from openerp.tools.translate import _ | ||
646 | 27 | |||
647 | 28 | import base64 | ||
648 | 29 | import openerp.netsvc as netsvc | ||
649 | 30 | import logging | ||
650 | 31 | _logger = logging.getLogger(__name__) | ||
651 | 32 | |||
652 | 33 | class invoice_report_per_journal(osv.TransientModel): | ||
653 | 34 | """ | ||
654 | 35 | OpenERP Wizard: invoice.report.per.journal | ||
655 | 36 | """ | ||
656 | 37 | _name = "invoice.report.per.journal" | ||
657 | 38 | |||
658 | 39 | def get_journal_object(self, cr, uid, context=None): | ||
659 | 40 | record_brw = self.pool.get(context['active_model']).browse( | ||
660 | 41 | cr, uid, context['active_ids'][0]) | ||
661 | 42 | if not record_brw.journal_id: | ||
662 | 43 | raise except_osv(_('ERROR !'), _( | ||
663 | 44 | 'There is no journal configured for this invoice.')) | ||
664 | 45 | return record_brw.journal_id | ||
665 | 46 | |||
666 | 47 | def _get_journal(self, cr, uid, context=None): | ||
667 | 48 | return self.get_journal_object(cr, uid, context=context).name | ||
668 | 49 | |||
669 | 50 | def _prepare_service(self, cr, uid, report, context=None): | ||
670 | 51 | service = netsvc.LocalService('report.' + report.report_name) | ||
671 | 52 | (result, format) = service.create(cr, uid, context[ | ||
672 | 53 | 'active_ids'], {'model': context['active_model']}, {}) | ||
673 | 54 | return (result, format) | ||
674 | 55 | |||
675 | 56 | def _get_report(self, cr, uid, context=None): | ||
676 | 57 | report = self.get_journal_object( | ||
677 | 58 | cr, uid, context=context).invoice_report_id | ||
678 | 59 | try: | ||
679 | 60 | (result, format) = self._prepare_service(cr, uid, report, context=context) | ||
680 | 61 | except: | ||
681 | 62 | if report: | ||
682 | 63 | _logger.warning("Error occurred in the report, the report set to the journal will be ignored.") | ||
683 | 64 | rep_id = self.pool.get("ir.actions.report.xml").search( | ||
684 | 65 | cr, uid, [('model', '=', 'account.invoice'),], order="id", | ||
685 | 66 | context=context)[0] | ||
686 | 67 | report_ = self.pool.get( | ||
687 | 68 | "ir.actions.report.xml").browse(cr, uid, rep_id, context=context) | ||
688 | 69 | (result, format) = self._prepare_service(cr, uid, report_, context=context) | ||
689 | 70 | try: | ||
690 | 71 | act_id = self.pool.get('ir.actions.act_window').search(cr, uid, [('name','=', report.name + ' txt')], context=context)[0] | ||
691 | 72 | if act_id: | ||
692 | 73 | act_brw = self.pool.get('ir.actions.act_window').browse(cr, uid, act_id, context=context) | ||
693 | 74 | wiz_obj = self.pool.get(act_brw.res_model) | ||
694 | 75 | wiz_id = wiz_obj.create(cr, uid, {}, context=context) | ||
695 | 76 | wiz_brw = wiz_obj.browse(cr, uid, wiz_id, context=context) | ||
696 | 77 | result = base64.decodestring(wiz_brw.fname_txt) | ||
697 | 78 | except: | ||
698 | 79 | if report: | ||
699 | 80 | _logger.info("txt report not defined for the report assigned to journal.") | ||
700 | 81 | return base64.encodestring(result) | ||
701 | 82 | |||
702 | 83 | def _get_report_name(self, cr, uid, context=None): | ||
703 | 84 | report = self.get_journal_object(cr, uid, | ||
704 | 85 | context=context).invoice_report_id | ||
705 | 86 | try: | ||
706 | 87 | (result, format) = self._prepare_service(cr, uid, report, context=context) | ||
707 | 88 | except: | ||
708 | 89 | if report: | ||
709 | 90 | _logger.warning("Error occurred in the report, the report set to the journal will be ignored.") | ||
710 | 91 | rep_id = self.pool.get("ir.actions.report.xml").search( | ||
711 | 92 | cr, uid, [('model', '=', 'account.invoice'),], order="id", | ||
712 | 93 | context=context)[0] | ||
713 | 94 | report = self.pool.get( | ||
714 | 95 | "ir.actions.report.xml").browse(cr, uid, rep_id, context=context) | ||
715 | 96 | return report.report_name | ||
716 | 97 | |||
717 | 98 | def print_invoice(self, cr, uid, ids, context=None): | ||
718 | 99 | return {'type': 'ir.actions.report.xml', | ||
719 | 100 | 'report_name': self._get_report_name(cr, uid, context=context), | ||
720 | 101 | 'datas': {'ids': context['active_ids']}} | ||
721 | 102 | |||
722 | 103 | _columns = { | ||
723 | 104 | 'journal': fields.char('Journal', 64, readonly=True, requied=True), | ||
724 | 105 | 'report_format': fields.binary("Report", readonly=True, required=True) | ||
725 | 106 | } | ||
726 | 107 | |||
727 | 108 | _defaults = { | ||
728 | 109 | 'journal': _get_journal, | ||
729 | 110 | 'report_format': _get_report, | ||
730 | 111 | } | ||
731 | 0 | 112 | ||
732 | === added file 'invoice_report_per_journal/wizard/invoice_report_per_journal.xml' | |||
733 | --- invoice_report_per_journal/wizard/invoice_report_per_journal.xml 1970-01-01 00:00:00 +0000 | |||
734 | +++ invoice_report_per_journal/wizard/invoice_report_per_journal.xml 2014-06-12 15:03:58 +0000 | |||
735 | @@ -0,0 +1,31 @@ | |||
736 | 1 | <?xml version='1.0' encoding='utf-8'?> | ||
737 | 2 | <openerp> | ||
738 | 3 | <data> | ||
739 | 4 | |||
740 | 5 | <record model="ir.ui.view" id="wizard_invoice_report_per_journal_form"> | ||
741 | 6 | <field name="name">invoice.report.per.journal.form</field> | ||
742 | 7 | <field name="model">invoice.report.per.journal</field> | ||
743 | 8 | <field name="arch" type="xml"> | ||
744 | 9 | <form string="Print" version="7.0"> | ||
745 | 10 | <group col="4" colspan="4"> | ||
746 | 11 | <field name="journal"/> | ||
747 | 12 | <newline/> | ||
748 | 13 | <field name="report_format"/> | ||
749 | 14 | <newline/> | ||
750 | 15 | <group col="2" colspan="2"> | ||
751 | 16 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | ||
752 | 17 | <button icon="gtk-ok" name="print_invoice" type="object" string="Print Invoice"/> | ||
753 | 18 | </group> | ||
754 | 19 | </group> | ||
755 | 20 | </form> | ||
756 | 21 | </field> | ||
757 | 22 | </record> | ||
758 | 23 | |||
759 | 24 | <act_window id="invoice_report_per_journal" | ||
760 | 25 | key2="client_action_per" name="Print" | ||
761 | 26 | res_model="invoice.report.per.journal" | ||
762 | 27 | view_id="wizard_invoice_report_per_journal_form" | ||
763 | 28 | view_mode="form" target="new" view_type="form"/> | ||
764 | 29 | |||
765 | 30 | </data> | ||
766 | 31 | </openerp> |