Merge lp:~serpentcs/purchase-report/purchase-serpentcs into lp:~purchase-core-editors/purchase-report/7.0
- purchase-serpentcs
- Merge into 7.0
Proposed by
Nishant Jogi (Serpent Consulting Services)
Status: | Work in progress |
---|---|
Proposed branch: | lp:~serpentcs/purchase-report/purchase-serpentcs |
Merge into: | lp:~purchase-core-editors/purchase-report/7.0 |
Diff against target: |
1127 lines (+1051/-0) 14 files modified
purchase_requisition_webkit/__init__.py (+25/-0) purchase_requisition_webkit/__openerp__.py (+42/-0) purchase_requisition_webkit/purchase_requisition_report.xml (+160/-0) purchase_requisition_webkit/report/__init__.py (+24/-0) purchase_requisition_webkit/report/purchase_requisition.mako (+141/-0) purchase_requisition_webkit/report/requisition.py (+37/-0) purchase_webkit/__init__.py (+25/-0) purchase_webkit/__openerp__.py (+43/-0) purchase_webkit/purchase_report.xml (+175/-0) purchase_webkit/report/__init__.py (+23/-0) purchase_webkit/report/order.mako (+190/-0) purchase_webkit/report/order.py (+35/-0) purchase_webkit/report/request_quotation.mako (+94/-0) purchase_webkit/report/request_quotation.py (+37/-0) |
To merge this branch: | bzr merge lp:~serpentcs/purchase-report/purchase-serpentcs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandre Fayolle - camptocamp | Needs Resubmitting | ||
Lorenzo Battistini (community) | Needs Fixing | ||
Review via email: mp+190323@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Nishant Jogi (Serpent Consulting Services) (njogi-serpentcs) wrote : | # |
Hello Lorenzo,
Yes, you are right.
Both module contains same things.
I think it was committed by mistake by me.
It is not wanted.
Thank you.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
Hello,
The management of the project has moved to Github: https:/
Please migrate your merge proposal to Github. You may want to check https:/
Thanks for contributing to the project
review:
Needs Resubmitting
Unmerged revisions
- 11. By Nishant Jogi (Serpent Consulting Services)
-
[ADD] Added Purchase report with rml to webkit conversion.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory 'purchase_requisition_webkit' | |||
2 | === added file 'purchase_requisition_webkit/__init__.py' | |||
3 | --- purchase_requisition_webkit/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ purchase_requisition_webkit/__init__.py 2013-10-10 09:53:37 +0000 | |||
5 | @@ -0,0 +1,25 @@ | |||
6 | 1 | # -*- coding: utf-8 -*- | ||
7 | 2 | ############################################################################## | ||
8 | 3 | # | ||
9 | 4 | # OpenERP, Open Source Management Solution | ||
10 | 5 | # Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) | ||
11 | 6 | # | ||
12 | 7 | # This program is free software: you can redistribute it and/or modify | ||
13 | 8 | # it under the terms of the GNU Affero General Public License as | ||
14 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
15 | 10 | # License, or (at your option) any later version. | ||
16 | 11 | # | ||
17 | 12 | # This program is distributed in the hope that it will be useful, | ||
18 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | 15 | # GNU Affero General Public License for more details. | ||
21 | 16 | # | ||
22 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
23 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
24 | 19 | # | ||
25 | 20 | ############################################################################ | ||
26 | 21 | |||
27 | 22 | |||
28 | 23 | import report | ||
29 | 24 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
30 | 25 | |||
31 | 0 | 26 | ||
32 | === added file 'purchase_requisition_webkit/__openerp__.py' | |||
33 | --- purchase_requisition_webkit/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
34 | +++ purchase_requisition_webkit/__openerp__.py 2013-10-10 09:53:37 +0000 | |||
35 | @@ -0,0 +1,42 @@ | |||
36 | 1 | # -*- coding: utf-8 -*- | ||
37 | 2 | ############################################################################## | ||
38 | 3 | # | ||
39 | 4 | # OpenERP, Open Source Management Solution | ||
40 | 5 | # Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) | ||
41 | 6 | # | ||
42 | 7 | # This program is free software: you can redistribute it and/or modify | ||
43 | 8 | # it under the terms of the GNU Affero General Public License as | ||
44 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
45 | 10 | # License, or (at your option) any later version. | ||
46 | 11 | # | ||
47 | 12 | # This program is distributed in the hope that it will be useful, | ||
48 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
49 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
50 | 15 | # GNU Affero General Public License for more details. | ||
51 | 16 | # | ||
52 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
53 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
54 | 19 | # | ||
55 | 20 | ############################################################################ | ||
56 | 21 | |||
57 | 22 | { | ||
58 | 23 | 'name': 'Purchase Requisitions', | ||
59 | 24 | 'version': '0.1', | ||
60 | 25 | 'author': 'Serpent Consulting Services', | ||
61 | 26 | 'category': 'Purchase Management', | ||
62 | 27 | 'website': 'http://www.serpentcs.com', | ||
63 | 28 | 'description': """ | ||
64 | 29 | This module allows you to manage your Purchase Requisition. | ||
65 | 30 | =========================================================== | ||
66 | 31 | It is conversion of rml report to Webkit Report. | ||
67 | 32 | |||
68 | 33 | """, | ||
69 | 34 | 'depends' : ['purchase_requisition','report_webkit'], | ||
70 | 35 | 'data': [ | ||
71 | 36 | 'purchase_requisition_report.xml', | ||
72 | 37 | ], | ||
73 | 38 | 'auto_install': False, | ||
74 | 39 | 'installable': True, | ||
75 | 40 | } | ||
76 | 41 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
77 | 42 | |||
78 | 0 | 43 | ||
79 | === added file 'purchase_requisition_webkit/purchase_requisition_report.xml' | |||
80 | --- purchase_requisition_webkit/purchase_requisition_report.xml 1970-01-01 00:00:00 +0000 | |||
81 | +++ purchase_requisition_webkit/purchase_requisition_report.xml 2013-10-10 09:53:37 +0000 | |||
82 | @@ -0,0 +1,160 @@ | |||
83 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
84 | 2 | <openerp> | ||
85 | 3 | <data> | ||
86 | 4 | <record id="Purchase_Req_webkit_header" model="ir.header_webkit"> | ||
87 | 5 | <field name="footer_html"><![CDATA[]]></field> | ||
88 | 6 | <field name="orientation">Portrait</field> | ||
89 | 7 | <field name="format">A4</field> | ||
90 | 8 | <field name="html"><![CDATA[ | ||
91 | 9 | <html> | ||
92 | 10 | <head> | ||
93 | 11 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
94 | 12 | <script> | ||
95 | 13 | function subst() { | ||
96 | 14 | var vars={}; | ||
97 | 15 | var x=document.location.search.substring(1).split('&'); | ||
98 | 16 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
99 | 17 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
100 | 18 | for(var i in x) { | ||
101 | 19 | var y = document.getElementsByClassName(x[i]); | ||
102 | 20 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
103 | 21 | } | ||
104 | 22 | } | ||
105 | 23 | </script> | ||
106 | 24 | <style type="text/css"> | ||
107 | 25 | |||
108 | 26 | ${css} | ||
109 | 27 | </style> | ||
110 | 28 | </head> | ||
111 | 29 | |||
112 | 30 | ${_debug or ''|n} </body> | ||
113 | 31 | </html>]]> | ||
114 | 32 | </field> | ||
115 | 33 | <field name="orientation">Portrait</field> | ||
116 | 34 | <field name="format">A4</field> | ||
117 | 35 | <field name="html"><![CDATA[ | ||
118 | 36 | <html> | ||
119 | 37 | <head> | ||
120 | 38 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
121 | 39 | <script> | ||
122 | 40 | function subst() { | ||
123 | 41 | var vars={}; | ||
124 | 42 | var x=document.location.search.substring(1).split('&'); | ||
125 | 43 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
126 | 44 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
127 | 45 | for(var i in x) { | ||
128 | 46 | var y = document.getElementsByClassName(x[i]); | ||
129 | 47 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
130 | 48 | } | ||
131 | 49 | } | ||
132 | 50 | </script> | ||
133 | 51 | <style type="text/css"> | ||
134 | 52 | ${css} | ||
135 | 53 | </style> | ||
136 | 54 | </head> | ||
137 | 55 | <body style="border:0; margin:0 ;" onload="subst()"> | ||
138 | 56 | <table class="header" style="border-bottom: 1px solid black; width: 100%"> | ||
139 | 57 | <tr > | ||
140 | 58 | <td style="text-align:right;font-size:12;" width="20%">${ helper.embed_image('png',company.logo,200,40)|n }</td> | ||
141 | 59 | <td style="text-align:right;font-size:12;" width="80%"></br></br>${ company.rml_header1 }</td> | ||
142 | 60 | </tr> | ||
143 | 61 | </table> ${_debug or ''|n} </body> | ||
144 | 62 | <p style="text-align:left;font-size:12;">${company.name}</p></br></br></br> | ||
145 | 63 | <table width="100%"> | ||
146 | 64 | <tr> | ||
147 | 65 | <td style="text-align:left;font-size:10;" width="25%"> | ||
148 | 66 | Phone: ${company.phone or ''} | ||
149 | 67 | </td> | ||
150 | 68 | <td width="75%"></td> | ||
151 | 69 | </tr> | ||
152 | 70 | |||
153 | 71 | <tr> | ||
154 | 72 | <td style="text-align:left;font-size:10; border-bottom: 1px solid black;" width="25%"> | ||
155 | 73 | Mail: ${company.email} | ||
156 | 74 | </td> | ||
157 | 75 | <td width="75%"></td> | ||
158 | 76 | </tr> | ||
159 | 77 | </table> | ||
160 | 78 | |||
161 | 79 | </html>]]> | ||
162 | 80 | </field> | ||
163 | 81 | <field eval="55.0" name="margin_top"/> | ||
164 | 82 | <field eval="5.0" name="margin_bottom"/> | ||
165 | 83 | <field name="css"><![CDATA[ | ||
166 | 84 | |||
167 | 85 | |||
168 | 86 | .list_table { | ||
169 | 87 | border-color:black; | ||
170 | 88 | text-align:center; | ||
171 | 89 | border-collapse: collapse; | ||
172 | 90 | } | ||
173 | 91 | .list_table td { | ||
174 | 92 | border-bottom:1px solid #ccc; | ||
175 | 93 | text-align:left; | ||
176 | 94 | font-size:10px; | ||
177 | 95 | padding-left:3px | ||
178 | 96 | padding-right:3px | ||
179 | 97 | padding-top:3px | ||
180 | 98 | padding-bottom:3px | ||
181 | 99 | } | ||
182 | 100 | .list_table1 { | ||
183 | 101 | border-color:black; | ||
184 | 102 | text-align:center; | ||
185 | 103 | border-collapse: collapse; | ||
186 | 104 | } | ||
187 | 105 | .list_table1 td { | ||
188 | 106 | border-bottom:1px solid black; | ||
189 | 107 | text-align:left; | ||
190 | 108 | font-size:11px; | ||
191 | 109 | padding-left:3px; | ||
192 | 110 | padding-right:3px; | ||
193 | 111 | padding-top:3px; | ||
194 | 112 | padding-bottom:3px; | ||
195 | 113 | } | ||
196 | 114 | |||
197 | 115 | .basic_table { | ||
198 | 116 | border-color:#ccc; | ||
199 | 117 | text-align:center; | ||
200 | 118 | border-collapse: collapse; | ||
201 | 119 | font-family: Helvetica; | ||
202 | 120 | } | ||
203 | 121 | .basic_table td { | ||
204 | 122 | border-color:#ccc; | ||
205 | 123 | border:1px solid #ccc; | ||
206 | 124 | text-align:center; | ||
207 | 125 | font-size:12px; | ||
208 | 126 | padding-left:5px; | ||
209 | 127 | padding-right:3px; | ||
210 | 128 | padding-top:3px; | ||
211 | 129 | padding-bottom:3px; | ||
212 | 130 | font-family: Helvetica; | ||
213 | 131 | } | ||
214 | 132 | |||
215 | 133 | .title{ | ||
216 | 134 | text-align:left | ||
217 | 135 | font-size:15px; | ||
218 | 136 | font-family: Helvetica-Bold; | ||
219 | 137 | } | ||
220 | 138 | |||
221 | 139 | .title1{ | ||
222 | 140 | text-align:left; | ||
223 | 141 | font-size:11px; | ||
224 | 142 | font-family: Helvetica-Bold; | ||
225 | 143 | } | ||
226 | 144 | |||
227 | 145 | ]]> | ||
228 | 146 | </field> | ||
229 | 147 | <field name="name">Purchase Requisition webkit header</field> | ||
230 | 148 | </record> | ||
231 | 149 | |||
232 | 150 | <report | ||
233 | 151 | auto="False" | ||
234 | 152 | id="report_purchase_requisition" | ||
235 | 153 | model="purchase.requisition" | ||
236 | 154 | name="purchase.requisition.webkit" | ||
237 | 155 | file="purchase_requisition_webkit/report/purchase_requisition.mako" | ||
238 | 156 | string="Purchase Requisition" | ||
239 | 157 | report_type="webkit" | ||
240 | 158 | webkit_header="Purchase_Req_webkit_header"/> | ||
241 | 159 | </data> | ||
242 | 160 | </openerp> | ||
243 | 0 | 161 | ||
244 | === added directory 'purchase_requisition_webkit/report' | |||
245 | === added file 'purchase_requisition_webkit/report/__init__.py' | |||
246 | --- purchase_requisition_webkit/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
247 | +++ purchase_requisition_webkit/report/__init__.py 2013-10-10 09:53:37 +0000 | |||
248 | @@ -0,0 +1,24 @@ | |||
249 | 1 | # -*- coding: utf-8 -*- | ||
250 | 2 | ############################################################################## | ||
251 | 3 | # | ||
252 | 4 | # OpenERP, Open Source Management Solution | ||
253 | 5 | # Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) | ||
254 | 6 | # | ||
255 | 7 | # This program is free software: you can redistribute it and/or modify | ||
256 | 8 | # it under the terms of the GNU Affero General Public License as | ||
257 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
258 | 10 | # License, or (at your option) any later version. | ||
259 | 11 | # | ||
260 | 12 | # This program is distributed in the hope that it will be useful, | ||
261 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
262 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
263 | 15 | # GNU Affero General Public License for more details. | ||
264 | 16 | # | ||
265 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
266 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
267 | 19 | # | ||
268 | 20 | ############################################################################ | ||
269 | 21 | import requisition | ||
270 | 22 | |||
271 | 23 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
272 | 24 | |||
273 | 0 | 25 | ||
274 | === added file 'purchase_requisition_webkit/report/purchase_requisition.mako' | |||
275 | --- purchase_requisition_webkit/report/purchase_requisition.mako 1970-01-01 00:00:00 +0000 | |||
276 | +++ purchase_requisition_webkit/report/purchase_requisition.mako 2013-10-10 09:53:37 +0000 | |||
277 | @@ -0,0 +1,141 @@ | |||
278 | 1 | <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
279 | 2 | |||
280 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
281 | 4 | <head> | ||
282 | 5 | <style type="text/css"> | ||
283 | 6 | ${css} | ||
284 | 7 | </style> | ||
285 | 8 | <title>Purchase for Requisitions.pdf</title> | ||
286 | 9 | </head> | ||
287 | 10 | <body> | ||
288 | 11 | %for requisition in objects: | ||
289 | 12 | <table width="100%" class="title"> | ||
290 | 13 | <tr> | ||
291 | 14 | <td><br/><br/> | ||
292 | 15 | <b> ${ _('Purchase for Requisitions') } ${requisition.name}</b><br/><br/> | ||
293 | 16 | </td> | ||
294 | 17 | </tr> | ||
295 | 18 | </table> | ||
296 | 19 | |||
297 | 20 | <table class="basic_table" width="100%"> | ||
298 | 21 | <tr> | ||
299 | 22 | <td width="30%"> | ||
300 | 23 | <b>${ _('Requisition Reference') }</b> | ||
301 | 24 | </td> | ||
302 | 25 | <td width="30%"> | ||
303 | 26 | <b>${ _('Requisition Date') }</b> | ||
304 | 27 | </td> | ||
305 | 28 | <td width="20%"> | ||
306 | 29 | <b>${ _('Type') }</b> | ||
307 | 30 | </td> | ||
308 | 31 | <td width="20%"> | ||
309 | 32 | <b>${ _('Source') }</b> | ||
310 | 33 | </td> | ||
311 | 34 | </tr> | ||
312 | 35 | </table> | ||
313 | 36 | |||
314 | 37 | <table class="basic_table" width="100%"> | ||
315 | 38 | <tr> | ||
316 | 39 | <td width="30%"> | ||
317 | 40 | ${requisition.name} | ||
318 | 41 | </td> | ||
319 | 42 | <td width="30%"> | ||
320 | 43 | ${formatLang(requisition.date_start,date_time='True')} | ||
321 | 44 | </td> | ||
322 | 45 | <td width="20%"> | ||
323 | 46 | ${requisition.exclusive=='multiple' and 'Multiple Requisitions' or requisition.exclusive=='exclusive' and 'Purchase Requisitions (exclusive)'} | ||
324 | 47 | </td> | ||
325 | 48 | <td width="20%"> | ||
326 | 49 | ${requisition.origin or ''} | ||
327 | 50 | </td> | ||
328 | 51 | </tr> | ||
329 | 52 | </table><br/> | ||
330 | 53 | |||
331 | 54 | %if requisition.line_ids==[]: | ||
332 | 55 | |||
333 | 56 | %else: | ||
334 | 57 | <table width="100%" class="title1"> | ||
335 | 58 | <tr> | ||
336 | 59 | <td> | ||
337 | 60 | <b> ${ _('Product Detail') }</b><br/> | ||
338 | 61 | </td> | ||
339 | 62 | </tr> | ||
340 | 63 | </table> | ||
341 | 64 | </br> | ||
342 | 65 | <table class="list_table1" width="100%"> | ||
343 | 66 | <tr> | ||
344 | 67 | <td style="text-align:left ;padding-left:5px" width="60%"> | ||
345 | 68 | <b>${ _('Description') }</b> | ||
346 | 69 | </td> | ||
347 | 70 | <td style="text-align:right;" width="20%"> | ||
348 | 71 | <b>${ _('Qty') }</b> | ||
349 | 72 | </td> | ||
350 | 73 | <td style="text-align:center;"width="20%"> | ||
351 | 74 | <b>${ _('Product UoM') }</b> | ||
352 | 75 | </td> | ||
353 | 76 | </tr> | ||
354 | 77 | </table> | ||
355 | 78 | |||
356 | 79 | %for line_ids in requisition.line_ids: | ||
357 | 80 | <table class="list_table" width="100%"> | ||
358 | 81 | <tr> | ||
359 | 82 | <td style="text-align:left;padding-left:5px"width="60%"> | ||
360 | 83 | [${line_ids.product_id and line_ids.product_id.code or ''}] ${line_ids.product_id and line_ids.product_id.name or ''} | ||
361 | 84 | </td> | ||
362 | 85 | <td style="text-align:right;"width="20%"> | ||
363 | 86 | ${ formatLang(line_ids.product_qty) } | ||
364 | 87 | </td> | ||
365 | 88 | <td style="text-align:center;"width="20%"> | ||
366 | 89 | ${line_ids.product_uom_id and line_ids.product_uom_id.category_id and line_ids.product_uom_id.category_id.name or ''} | ||
367 | 90 | </td> | ||
368 | 91 | </tr> | ||
369 | 92 | </table><br/> | ||
370 | 93 | %endfor | ||
371 | 94 | %endif | ||
372 | 95 | |||
373 | 96 | %if requisition.purchase_ids ==[]: | ||
374 | 97 | |||
375 | 98 | %else: | ||
376 | 99 | <table width="100%" class="title1"> | ||
377 | 100 | <tr> | ||
378 | 101 | <td> | ||
379 | 102 | <b> ${ _('Quotation Detail') }</b><br/> | ||
380 | 103 | </td> | ||
381 | 104 | </tr> | ||
382 | 105 | </table> | ||
383 | 106 | </br> | ||
384 | 107 | <table class="list_table1" width="100%"> | ||
385 | 108 | <tr> | ||
386 | 109 | <td style="text-align:left ;padding-left:5px"width="60%"> | ||
387 | 110 | <b>${ _('Supplier') }<b/> | ||
388 | 111 | </td> | ||
389 | 112 | <td style="text-align:center;"width="20%"> | ||
390 | 113 | <b>${ _('Date Ordered') }<b/> | ||
391 | 114 | </td> | ||
392 | 115 | <td style="text-align:center;"width="20%"> | ||
393 | 116 | <b>${ _('Order Reference') }<b/> | ||
394 | 117 | </td> | ||
395 | 118 | </tr> | ||
396 | 119 | </table> | ||
397 | 120 | |||
398 | 121 | %for purchase_ids in requisition.purchase_ids: | ||
399 | 122 | <table class="list_table " width="100%"> | ||
400 | 123 | <tr> | ||
401 | 124 | <td style="text-align:left; padding-left:5px" width="60%"> | ||
402 | 125 | ${purchase_ids.partner_id and purchase_ids.partner_id.name or ''} | ||
403 | 126 | </td> | ||
404 | 127 | <td style="text-align:center;"width="20%"> | ||
405 | 128 | ${formatLang(purchase_ids.date_order,date='True')} | ||
406 | 129 | </td> | ||
407 | 130 | <td style="text-align:center;"width="20%"> | ||
408 | 131 | ${purchase_ids.name} | ||
409 | 132 | </td> | ||
410 | 133 | </tr> | ||
411 | 134 | </table> | ||
412 | 135 | %endfor | ||
413 | 136 | %endif | ||
414 | 137 | |||
415 | 138 | <p style="page-break-after:always"></p> | ||
416 | 139 | %endfor | ||
417 | 140 | </body> | ||
418 | 141 | </html> | ||
419 | 0 | \ No newline at end of file | 142 | \ No newline at end of file |
420 | 1 | 143 | ||
421 | === added file 'purchase_requisition_webkit/report/requisition.py' | |||
422 | --- purchase_requisition_webkit/report/requisition.py 1970-01-01 00:00:00 +0000 | |||
423 | +++ purchase_requisition_webkit/report/requisition.py 2013-10-10 09:53:37 +0000 | |||
424 | @@ -0,0 +1,37 @@ | |||
425 | 1 | # -*- coding: utf-8 -*- | ||
426 | 2 | ############################################################################## | ||
427 | 3 | # | ||
428 | 4 | # OpenERP, Open Source Management Solution | ||
429 | 5 | # Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) | ||
430 | 6 | # | ||
431 | 7 | # This program is free software: you can redistribute it and/or modify | ||
432 | 8 | # it under the terms of the GNU Affero General Public License as | ||
433 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
434 | 10 | # License, or (at your option) any later version. | ||
435 | 11 | # | ||
436 | 12 | # This program is distributed in the hope that it will be useful, | ||
437 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
438 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
439 | 15 | # GNU Affero General Public License for more details. | ||
440 | 16 | # | ||
441 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
442 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
443 | 19 | # | ||
444 | 20 | ############################################################################ | ||
445 | 21 | |||
446 | 22 | import time | ||
447 | 23 | from openerp.report import report_sxw | ||
448 | 24 | from openerp.osv import osv | ||
449 | 25 | from openerp import pooler | ||
450 | 26 | |||
451 | 27 | class requisition(report_sxw.rml_parse): | ||
452 | 28 | def __init__(self, cr, uid, name, context): | ||
453 | 29 | super(requisition, self).__init__(cr, uid, name, context=context) | ||
454 | 30 | self.localcontext.update({ | ||
455 | 31 | 'time': time, | ||
456 | 32 | }) | ||
457 | 33 | |||
458 | 34 | report_sxw.report_sxw('report.purchase.requisition.webkit','purchase.requisition','addons/purchase_requisition_webkit/report/purchase_requisition.mako',parser=requisition) | ||
459 | 35 | |||
460 | 36 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
461 | 37 | |||
462 | 0 | 38 | ||
463 | === added directory 'purchase_webkit' | |||
464 | === added file 'purchase_webkit/__init__.py' | |||
465 | --- purchase_webkit/__init__.py 1970-01-01 00:00:00 +0000 | |||
466 | +++ purchase_webkit/__init__.py 2013-10-10 09:53:37 +0000 | |||
467 | @@ -0,0 +1,25 @@ | |||
468 | 1 | # -*- coding: utf-8 -*- | ||
469 | 2 | ############################################################################## | ||
470 | 3 | # | ||
471 | 4 | # OpenERP, Open Source Management Solution | ||
472 | 5 | # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). | ||
473 | 6 | # | ||
474 | 7 | # This program is free software: you can redistribute it and/or modify | ||
475 | 8 | # it under the terms of the GNU Affero General Public License as | ||
476 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
477 | 10 | # License, or (at your option) any later version. | ||
478 | 11 | # | ||
479 | 12 | # This program is distributed in the hope that it will be useful, | ||
480 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
481 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
482 | 15 | # GNU Affero General Public License for more details. | ||
483 | 16 | # | ||
484 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
485 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
486 | 19 | # | ||
487 | 20 | ############################################################################## | ||
488 | 21 | |||
489 | 22 | import report | ||
490 | 23 | |||
491 | 24 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
492 | 25 | |||
493 | 0 | 26 | ||
494 | === added file 'purchase_webkit/__openerp__.py' | |||
495 | --- purchase_webkit/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
496 | +++ purchase_webkit/__openerp__.py 2013-10-10 09:53:37 +0000 | |||
497 | @@ -0,0 +1,43 @@ | |||
498 | 1 | # -*- coding: utf-8 -*- | ||
499 | 2 | ############################################################################## | ||
500 | 3 | # | ||
501 | 4 | # OpenERP, Open Source Management Solution | ||
502 | 5 | # Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) | ||
503 | 6 | # | ||
504 | 7 | # This program is free software: you can redistribute it and/or modify | ||
505 | 8 | # it under the terms of the GNU Affero General Public License as | ||
506 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
507 | 10 | # License, or (at your option) any later version. | ||
508 | 11 | # | ||
509 | 12 | # This program is distributed in the hope that it will be useful, | ||
510 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
511 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
512 | 15 | # GNU Affero General Public License for more details. | ||
513 | 16 | # | ||
514 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
515 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
516 | 19 | # | ||
517 | 20 | ############################################################################ | ||
518 | 21 | |||
519 | 22 | { | ||
520 | 23 | 'name': 'Purchase Management', | ||
521 | 24 | 'version': '1.1', | ||
522 | 25 | 'category': 'Purchase Management', | ||
523 | 26 | 'summary': 'Purchase Orders, Receptions, Supplier Invoices', | ||
524 | 27 | 'description': """ | ||
525 | 28 | Manage goods requirement by Purchase Orders easily | ||
526 | 29 | ================================================== | ||
527 | 30 | |||
528 | 31 | It is conversion of rml report to Webkit Report. | ||
529 | 32 | """, | ||
530 | 33 | 'author': 'Serpent Consulting Services', | ||
531 | 34 | 'website': 'http://www.serpentcs.com', | ||
532 | 35 | 'depends': ['purchase','report_webkit'], | ||
533 | 36 | 'data': [ | ||
534 | 37 | 'purchase_report.xml', | ||
535 | 38 | ], | ||
536 | 39 | 'installable': True, | ||
537 | 40 | 'auto_install': False, | ||
538 | 41 | 'application': True, | ||
539 | 42 | } | ||
540 | 43 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
541 | 0 | 44 | ||
542 | === added file 'purchase_webkit/purchase_report.xml' | |||
543 | --- purchase_webkit/purchase_report.xml 1970-01-01 00:00:00 +0000 | |||
544 | +++ purchase_webkit/purchase_report.xml 2013-10-10 09:53:37 +0000 | |||
545 | @@ -0,0 +1,175 @@ | |||
546 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
547 | 2 | <openerp> | ||
548 | 3 | <data> | ||
549 | 4 | <record id="purchase_order_header" model="ir.header_webkit"> | ||
550 | 5 | <field name="footer_html"><![CDATA[ | ||
551 | 6 | <html> | ||
552 | 7 | <head> | ||
553 | 8 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
554 | 9 | <script> | ||
555 | 10 | function subst() { | ||
556 | 11 | var vars={}; | ||
557 | 12 | var x=document.location.search.substring(1).split('&'); | ||
558 | 13 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
559 | 14 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
560 | 15 | for(var i in x) { | ||
561 | 16 | var y = document.getElementsByClassName(x[i]); | ||
562 | 17 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
563 | 18 | } | ||
564 | 19 | } | ||
565 | 20 | </script> | ||
566 | 21 | <style type="text/css"> | ||
567 | 22 | |||
568 | 23 | ${css} | ||
569 | 24 | </style> | ||
570 | 25 | </head> | ||
571 | 26 | <body style="border:0; margin: 0;" onload="subst()"> | ||
572 | 27 | <table class="header" style="border-top: 1px solid black; width: 100%"> | ||
573 | 28 | <tr > | ||
574 | 29 | <td style="text-align:center;font-size:12;" >${ company.rml_footer }</td> | ||
575 | 30 | </tr> | ||
576 | 31 | <tr > | ||
577 | 32 | <td style="text-align:center;font-size:12;" >Contact : ${ user.name }</td> | ||
578 | 33 | </tr> | ||
579 | 34 | </table> ${_debug or ''|n} </body> | ||
580 | 35 | </html> | ||
581 | 36 | ]]></field> | ||
582 | 37 | <field name="orientation">Portrait</field> | ||
583 | 38 | <field name="format">A4</field> | ||
584 | 39 | <field name="html"><![CDATA[ | ||
585 | 40 | <html> | ||
586 | 41 | <head> | ||
587 | 42 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
588 | 43 | <script> | ||
589 | 44 | function subst() { | ||
590 | 45 | var vars={}; | ||
591 | 46 | var x=document.location.search.substring(1).split('&'); | ||
592 | 47 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
593 | 48 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
594 | 49 | for(var i in x) { | ||
595 | 50 | var y = document.getElementsByClassName(x[i]); | ||
596 | 51 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
597 | 52 | } | ||
598 | 53 | } | ||
599 | 54 | </script> | ||
600 | 55 | <style type="text/css"> | ||
601 | 56 | |||
602 | 57 | ${css} | ||
603 | 58 | </style> | ||
604 | 59 | </head> | ||
605 | 60 | <body style="border:0; margin: 0;" onload="subst()"> | ||
606 | 61 | <table class="header" style="border-bottom: 1px solid black; width: 100%"> | ||
607 | 62 | <tr > | ||
608 | 63 | <td style="text-align:left;font-size:12;" width="20%">${ helper.embed_image('png',company.logo,200,50)|n }</td> | ||
609 | 64 | <td style="text-align:right;font-size:12;" width="80%"></br></br>${ company.rml_header1 }</td> | ||
610 | 65 | </tr> | ||
611 | 66 | </table> ${_debug or ''|n} </body> | ||
612 | 67 | <p style="text-align:left;font-size:12;">${company.name}</p> | ||
613 | 68 | </html>]]> | ||
614 | 69 | </field> | ||
615 | 70 | <field eval="25.0" name="margin_top"/> | ||
616 | 71 | <field eval="25.0" name="margin_bottom"/> | ||
617 | 72 | <field name="css"><![CDATA[ | ||
618 | 73 | |||
619 | 74 | body, table, td, span, div { | ||
620 | 75 | font-family: Helvetica, Arial; | ||
621 | 76 | } | ||
622 | 77 | |||
623 | 78 | body { | ||
624 | 79 | font-family:Arial; | ||
625 | 80 | font-size:9; | ||
626 | 81 | |||
627 | 82 | } | ||
628 | 83 | |||
629 | 84 | |||
630 | 85 | .header { | ||
631 | 86 | margin-left:0; | ||
632 | 87 | text-align:left; | ||
633 | 88 | width:300px; | ||
634 | 89 | font-size:12; | ||
635 | 90 | } | ||
636 | 91 | .title { | ||
637 | 92 | font-size:16; | ||
638 | 93 | font-weight: bold; | ||
639 | 94 | font-family: Helvetica, Arial; | ||
640 | 95 | } | ||
641 | 96 | |||
642 | 97 | |||
643 | 98 | .basic_table{ | ||
644 | 99 | width:100%; | ||
645 | 100 | text-align:center; | ||
646 | 101 | border:1px solid lightGrey; | ||
647 | 102 | border-collapse: collapse; | ||
648 | 103 | font-family: Helvetica; | ||
649 | 104 | } | ||
650 | 105 | .basic_table td { | ||
651 | 106 | border:1px solid lightGrey; | ||
652 | 107 | font-size:12; | ||
653 | 108 | font-family: Helvetica; | ||
654 | 109 | } | ||
655 | 110 | |||
656 | 111 | .list_table { | ||
657 | 112 | border-color:black; | ||
658 | 113 | text-align:center; | ||
659 | 114 | border-collapse: collapse; | ||
660 | 115 | font-family: Helvetica; | ||
661 | 116 | } | ||
662 | 117 | .tbl_header{ | ||
663 | 118 | width:100%; | ||
664 | 119 | font-size:10px; | ||
665 | 120 | } | ||
666 | 121 | .tr_bottom_line{ | ||
667 | 122 | border-bottom: thin solid black; | ||
668 | 123 | width:100%; | ||
669 | 124 | font-size:12px; | ||
670 | 125 | font-weight: bold; | ||
671 | 126 | font-family: Helvetica; | ||
672 | 127 | } | ||
673 | 128 | .tr_bottom_line_dark_grey{ | ||
674 | 129 | border-top: thin solid #ccc; | ||
675 | 130 | width:100%; | ||
676 | 131 | font-size:12px; | ||
677 | 132 | font-family: Helvetica; | ||
678 | 133 | } | ||
679 | 134 | .tr_top{ | ||
680 | 135 | border-top: thin solid black; | ||
681 | 136 | width:100%; | ||
682 | 137 | font-size:12px; | ||
683 | 138 | font-family: Helvetica; | ||
684 | 139 | } | ||
685 | 140 | |||
686 | 141 | .td_f12{ | ||
687 | 142 | font-size:12px; | ||
688 | 143 | font-family: Helvetica; | ||
689 | 144 | } | ||
690 | 145 | |||
691 | 146 | |||
692 | 147 | |||
693 | 148 | ]]> | ||
694 | 149 | </field> | ||
695 | 150 | <field name="name">Purchase Order Header</field> | ||
696 | 151 | </record> | ||
697 | 152 | |||
698 | 153 | <report | ||
699 | 154 | auto="False" | ||
700 | 155 | id="report_purchase_quotation" | ||
701 | 156 | model="purchase.order" | ||
702 | 157 | name="purchase.quotation.webkit" | ||
703 | 158 | file="purchase_webkit/report/request_quotation.mako" | ||
704 | 159 | string="Request for Quotation" | ||
705 | 160 | report_type="webkit" | ||
706 | 161 | webkit_header="purchase_order_header" /> | ||
707 | 162 | |||
708 | 163 | <report | ||
709 | 164 | auto="False" | ||
710 | 165 | id="report_purchase_order" | ||
711 | 166 | model="purchase.order" | ||
712 | 167 | name="purchase.order.webkit" | ||
713 | 168 | file="purchase_webkit/report/order.mako" | ||
714 | 169 | usage="default" | ||
715 | 170 | string="Purchase Order" | ||
716 | 171 | report_type="webkit" | ||
717 | 172 | webkit_header="purchase_order_header"/> | ||
718 | 173 | |||
719 | 174 | </data> | ||
720 | 175 | </openerp> | ||
721 | 0 | 176 | ||
722 | === added directory 'purchase_webkit/report' | |||
723 | === added file 'purchase_webkit/report/__init__.py' | |||
724 | --- purchase_webkit/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
725 | +++ purchase_webkit/report/__init__.py 2013-10-10 09:53:37 +0000 | |||
726 | @@ -0,0 +1,23 @@ | |||
727 | 1 | # -*- coding: utf-8 -*- | ||
728 | 2 | ############################################################################## | ||
729 | 3 | # | ||
730 | 4 | # OpenERP, Open Source Management Solution | ||
731 | 5 | # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). | ||
732 | 6 | # | ||
733 | 7 | # This program is free software: you can redistribute it and/or modify | ||
734 | 8 | # it under the terms of the GNU Affero General Public License as | ||
735 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
736 | 10 | # License, or (at your option) any later version. | ||
737 | 11 | # | ||
738 | 12 | # This program is distributed in the hope that it will be useful, | ||
739 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
740 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
741 | 15 | # GNU Affero General Public License for more details. | ||
742 | 16 | # | ||
743 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
744 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
745 | 19 | # | ||
746 | 20 | ############################################################################## | ||
747 | 21 | |||
748 | 22 | import order | ||
749 | 23 | import request_quotation | ||
750 | 0 | 24 | ||
751 | === added file 'purchase_webkit/report/order.mako' | |||
752 | --- purchase_webkit/report/order.mako 1970-01-01 00:00:00 +0000 | |||
753 | +++ purchase_webkit/report/order.mako 2013-10-10 09:53:37 +0000 | |||
754 | @@ -0,0 +1,190 @@ | |||
755 | 1 | <html> | ||
756 | 2 | <head> | ||
757 | 3 | <style type="text/css"> | ||
758 | 4 | ${css} | ||
759 | 5 | </style> | ||
760 | 6 | </head> | ||
761 | 7 | <body> | ||
762 | 8 | </br> | ||
763 | 9 | </br> | ||
764 | 10 | </br> | ||
765 | 11 | |||
766 | 12 | %for o in objects: | ||
767 | 13 | </br> | ||
768 | 14 | <table class="td_f12 tr_bottom_line_dark" width="40%" > | ||
769 | 15 | <tr> | ||
770 | 16 | <td width="25%">Phone</td> | ||
771 | 17 | <td>: ${ company.phone or ''}</td> | ||
772 | 18 | </tr> | ||
773 | 19 | <tr> | ||
774 | 20 | <td>Mail</td> | ||
775 | 21 | <td>: ${ company.email or '' }</td> | ||
776 | 22 | </tr> | ||
777 | 23 | </table> | ||
778 | 24 | </br> | ||
779 | 25 | </br> | ||
780 | 26 | <table width="100%"> | ||
781 | 27 | <tr> | ||
782 | 28 | <td width="3%"></td> | ||
783 | 29 | <td class="td_f12" > | ||
784 | 30 | <b>${_('Shipping address :')}</b></br> | ||
785 | 31 | ${(o.dest_address_id and o.dest_address_id.name) or (o.warehouse_id and o.warehouse_id.name) or ''}</br> | ||
786 | 32 | ${(o.dest_address_id and display_address(o.dest_address_id)) or (o.warehouse_id and display_address(o.warehouse_id.partner_id)) or ''}</br> | ||
787 | 33 | </br> | ||
788 | 34 | |||
789 | 35 | |||
790 | 36 | </td> | ||
791 | 37 | <td class="td_f12" > | ||
792 | 38 | ${o.partner_id and o.partner_id and o.partner_id.name or '' }</br> | ||
793 | 39 | ${o.partner_id.street}</br> | ||
794 | 40 | ${o.partner_id.city or '' } ${o.partner_id.zip or '' }</br> | ||
795 | 41 | ${o.partner_id.country_id.name or ''} | ||
796 | 42 | </td> | ||
797 | 43 | <td> </td> | ||
798 | 44 | </tr> | ||
799 | 45 | </table> | ||
800 | 46 | </br> | ||
801 | 47 | </br> | ||
802 | 48 | %if o.state =='draft': | ||
803 | 49 | <h1><b>Purchase Order Confirmation N° ${ o.name }</b></h1> | ||
804 | 50 | %endif | ||
805 | 51 | %if o.state <>'draft': | ||
806 | 52 | <h1><b> Request for Quotation N° ${ o.name } </b></h1> | ||
807 | 53 | %endif | ||
808 | 54 | </br> | ||
809 | 55 | </br> | ||
810 | 56 | <table class="basic_table"> | ||
811 | 57 | <tr> | ||
812 | 58 | <td width="25%"> | ||
813 | 59 | <b>${_('Our Order Reference')}</b> | ||
814 | 60 | </td> | ||
815 | 61 | <td width="25%"> | ||
816 | 62 | <b>${_('Your Order Reference')}</b> | ||
817 | 63 | </td> | ||
818 | 64 | <td width="25%"> | ||
819 | 65 | <b>${_('Order Date')}</b> | ||
820 | 66 | </td> | ||
821 | 67 | <td width="25%"> | ||
822 | 68 | <b>${_('Validated By')}</b> | ||
823 | 69 | </td> | ||
824 | 70 | </tr> | ||
825 | 71 | <tr> | ||
826 | 72 | <td> | ||
827 | 73 | ${ o.name or '' } | ||
828 | 74 | </td> | ||
829 | 75 | <td> | ||
830 | 76 | ${ o.partner_ref or '' } | ||
831 | 77 | </td> | ||
832 | 78 | <td> | ||
833 | 79 | ${ o.date_order } | ||
834 | 80 | </td> | ||
835 | 81 | <td> | ||
836 | 82 | ${ (o.validator and o.validator.name) or '' } | ||
837 | 83 | </td> | ||
838 | 84 | </tr> | ||
839 | 85 | </table> | ||
840 | 86 | </br> | ||
841 | 87 | </br> | ||
842 | 88 | <table class="tr_bottom_line"> | ||
843 | 89 | <tr> | ||
844 | 90 | <td width="34%"> | ||
845 | 91 | <b>${_('Description')}</b> | ||
846 | 92 | </td> | ||
847 | 93 | <td width="10%"> | ||
848 | 94 | <b>${_('Taxes')}</b> | ||
849 | 95 | </td> | ||
850 | 96 | <td width="15%"> | ||
851 | 97 | <b>${_('Date Req.')}</b> | ||
852 | 98 | </td> | ||
853 | 99 | <td width="15%" align="right"> | ||
854 | 100 | <b>${_('Qty')}</b> | ||
855 | 101 | </td> | ||
856 | 102 | <td width="13%" align="right"> | ||
857 | 103 | <b>${_('Unit Price')}</b> | ||
858 | 104 | </td> | ||
859 | 105 | <td width="13%" align="right"> | ||
860 | 106 | <b>${_('Net Price')}</b> | ||
861 | 107 | </td> | ||
862 | 108 | </tr> | ||
863 | 109 | </table> | ||
864 | 110 | %for line in o.order_line: | ||
865 | 111 | <table class="tr_bottom_line_dark_grey"> | ||
866 | 112 | <tr> | ||
867 | 113 | <td width="34%"> | ||
868 | 114 | ${ line.name } | ||
869 | 115 | </td> | ||
870 | 116 | <td width="10%"> | ||
871 | 117 | ${ ', '.join(map(lambda x: x.name, line.taxes_id)) } | ||
872 | 118 | </td> | ||
873 | 119 | <td width="15%"> | ||
874 | 120 | ${ formatLang( line.date_planned, date=True)} | ||
875 | 121 | </td> | ||
876 | 122 | <td width="15%" align="right"> | ||
877 | 123 | ${ formatLang(line.product_qty )} ${ line.product_uom.name } | ||
878 | 124 | </td> | ||
879 | 125 | <td width="13%" align="right"> | ||
880 | 126 | ${ formatLang(line.price_unit, digits=get_digits(dp='Product Price') ) } | ||
881 | 127 | </td> | ||
882 | 128 | <td width="13%" align="right"> | ||
883 | 129 | ${ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) } | ||
884 | 130 | </td> | ||
885 | 131 | </tr> | ||
886 | 132 | </table> | ||
887 | 133 | %endfor | ||
888 | 134 | <table width="100%"> | ||
889 | 135 | <tr> | ||
890 | 136 | <td width="70%"> | ||
891 | 137 | </td> | ||
892 | 138 | <td width="30%"> | ||
893 | 139 | <table class="tr_top"> | ||
894 | 140 | <tr> | ||
895 | 141 | <td> | ||
896 | 142 | Net Total : | ||
897 | 143 | </td> | ||
898 | 144 | <td> | ||
899 | 145 | </td> | ||
900 | 146 | <td align="right"> | ||
901 | 147 | ${ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) } | ||
902 | 148 | </td> | ||
903 | 149 | </tr> | ||
904 | 150 | <tr> | ||
905 | 151 | <td> | ||
906 | 152 | Taxes : | ||
907 | 153 | </td> | ||
908 | 154 | <td> | ||
909 | 155 | </td> | ||
910 | 156 | <td align="right"> | ||
911 | 157 | ${ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) } | ||
912 | 158 | </td> | ||
913 | 159 | </tr> | ||
914 | 160 | </table> | ||
915 | 161 | <table class="tr_top"> | ||
916 | 162 | <tr> | ||
917 | 163 | <td> | ||
918 | 164 | <b>Total :</b> | ||
919 | 165 | </td> | ||
920 | 166 | <td> | ||
921 | 167 | </td> | ||
922 | 168 | <td> | ||
923 | 169 | <td align="right"> | ||
924 | 170 | <b>${ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id ) }</b> | ||
925 | 171 | </td> | ||
926 | 172 | </tr> | ||
927 | 173 | </table> | ||
928 | 174 | </td> | ||
929 | 175 | </tr> | ||
930 | 176 | </table> | ||
931 | 177 | </br> | ||
932 | 178 | <table> | ||
933 | 179 | <tr> | ||
934 | 180 | <td> | ||
935 | 181 | |||
936 | 182 | ${ (o.notes or '') } | ||
937 | 183 | </td> | ||
938 | 184 | </tr> | ||
939 | 185 | </table> | ||
940 | 186 | <p style="page-break-after:always"> | ||
941 | 187 | </p> | ||
942 | 188 | %endfor | ||
943 | 189 | </body> | ||
944 | 190 | </html> | ||
945 | 0 | \ No newline at end of file | 191 | \ No newline at end of file |
946 | 1 | 192 | ||
947 | === added file 'purchase_webkit/report/order.py' | |||
948 | --- purchase_webkit/report/order.py 1970-01-01 00:00:00 +0000 | |||
949 | +++ purchase_webkit/report/order.py 2013-10-10 09:53:37 +0000 | |||
950 | @@ -0,0 +1,35 @@ | |||
951 | 1 | # -*- coding: utf-8 -*- | ||
952 | 2 | ############################################################################## | ||
953 | 3 | # | ||
954 | 4 | # OpenERP, Open Source Management Solution | ||
955 | 5 | # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). | ||
956 | 6 | # | ||
957 | 7 | # This program is free software: you can redistribute it and/or modify | ||
958 | 8 | # it under the terms of the GNU Affero General Public License as | ||
959 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
960 | 10 | # License, or (at your option) any later version. | ||
961 | 11 | # | ||
962 | 12 | # This program is distributed in the hope that it will be useful, | ||
963 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
964 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
965 | 15 | # GNU Affero General Public License for more details. | ||
966 | 16 | # | ||
967 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
968 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
969 | 19 | # | ||
970 | 20 | ############################################################################## | ||
971 | 21 | |||
972 | 22 | import time | ||
973 | 23 | from openerp.report import report_sxw | ||
974 | 24 | from openerp.osv import osv | ||
975 | 25 | from openerp import pooler | ||
976 | 26 | |||
977 | 27 | class order(report_sxw.rml_parse): | ||
978 | 28 | def __init__(self, cr, uid, name, context): | ||
979 | 29 | super(order, self).__init__(cr, uid, name, context=context) | ||
980 | 30 | self.localcontext.update({'time': time}) | ||
981 | 31 | |||
982 | 32 | report_sxw.report_sxw('report.purchase.order.webkit','purchase.order','purchase_webkit/report/order.mako',parser=order) | ||
983 | 33 | |||
984 | 34 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
985 | 35 | |||
986 | 0 | 36 | ||
987 | === added file 'purchase_webkit/report/request_quotation.mako' | |||
988 | --- purchase_webkit/report/request_quotation.mako 1970-01-01 00:00:00 +0000 | |||
989 | +++ purchase_webkit/report/request_quotation.mako 2013-10-10 09:53:37 +0000 | |||
990 | @@ -0,0 +1,94 @@ | |||
991 | 1 | <html> | ||
992 | 2 | <head> | ||
993 | 3 | <style type="text/css"> | ||
994 | 4 | ${css} | ||
995 | 5 | </style> | ||
996 | 6 | <title>requestforquotation.pdf</title> | ||
997 | 7 | </head> | ||
998 | 8 | <body> | ||
999 | 9 | %for order in objects: | ||
1000 | 10 | </br> | ||
1001 | 11 | </br> | ||
1002 | 12 | </br> | ||
1003 | 13 | </br> | ||
1004 | 14 | <table class="td_f12" width="40%" > | ||
1005 | 15 | <tr> | ||
1006 | 16 | <td width="25%">Phone</td> | ||
1007 | 17 | <td>: ${ company.phone or ''}</td> | ||
1008 | 18 | </tr> | ||
1009 | 19 | <tr> | ||
1010 | 20 | <td>Mail</td> | ||
1011 | 21 | <td>: ${ company.email or '' }</td> | ||
1012 | 22 | </tr> | ||
1013 | 23 | </table> | ||
1014 | 24 | </br> | ||
1015 | 25 | </br> | ||
1016 | 26 | <table width="100%"> | ||
1017 | 27 | <tr> | ||
1018 | 28 | <td width="70%"> | ||
1019 | 29 | <table width="100%" class="td_f12"> | ||
1020 | 30 | <tr> | ||
1021 | 31 | <td> | ||
1022 | 32 | <b>Expected Delivery address:</b></br> | ||
1023 | 33 | ${ (order.dest_address_id and order.dest_address_id.name) or (order.warehouse_id and order.warehouse_id.name) or ''}</br> | ||
1024 | 34 | ${ order.dest_address_id and display_address(order.dest_address_id) }</br></br> | ||
1025 | 35 | </td> | ||
1026 | 36 | </tr> | ||
1027 | 37 | </table> | ||
1028 | 38 | </td> | ||
1029 | 39 | <td> | ||
1030 | 40 | </td> | ||
1031 | 41 | <td width="70%" class="td_f12"> | ||
1032 | 42 | ${ (order .partner_id and order.partner_id.title and order.partner_id.title.name) or '' } ${ (order .partner_id and order.partner_id.name) or '' }</br> | ||
1033 | 43 | ${ order.partner_id and display_address(order .partner_id) }</br> | ||
1034 | 44 | Tel.: ${ (order.partner_id and order.partner_id.phone) or '' }</br> | ||
1035 | 45 | Fax: ${ (order.partner_id and order.partner_id.fax) or ''}</br> | ||
1036 | 46 | TVA: ${ (order.partner_id and order.partner_id.vat) or '' }</br> | ||
1037 | 47 | </td> | ||
1038 | 48 | </tr> | ||
1039 | 49 | </table> | ||
1040 | 50 | </br> | ||
1041 | 51 | <b>Request for Quotation : ${ order.name }</b> | ||
1042 | 52 | <table class="tr_bottom_line"> | ||
1043 | 53 | <tr> | ||
1044 | 54 | <td width="65%"> | ||
1045 | 55 | <b>${_('Description')}</b> | ||
1046 | 56 | </td> | ||
1047 | 57 | <td width="20%"> | ||
1048 | 58 | <b>${_('Expected Date')}</b> | ||
1049 | 59 | </td> | ||
1050 | 60 | <td width="15%"> | ||
1051 | 61 | <b>${_('Qty')}</b> | ||
1052 | 62 | </td> | ||
1053 | 63 | </tr> | ||
1054 | 64 | </table> | ||
1055 | 65 | %for order_line in order.order_line: | ||
1056 | 66 | <table class="tr_bottom_line_dark_grey"> | ||
1057 | 67 | <tr> | ||
1058 | 68 | <td width="65%"> | ||
1059 | 69 | ${ order_line.name } | ||
1060 | 70 | </td> | ||
1061 | 71 | <td width="20%"> | ||
1062 | 72 | ${ formatLang(order_line.date_planned, date = True) } | ||
1063 | 73 | </td> | ||
1064 | 74 | <td width="15%" align="right"> | ||
1065 | 75 | ${ formatLang(order_line.product_qty )} | ||
1066 | 76 | <i>${ (order_line.product_uom and order_line.product_uom.name) or '' }</i> | ||
1067 | 77 | </td> | ||
1068 | 78 | </tr> | ||
1069 | 79 | </table> | ||
1070 | 80 | %endfor | ||
1071 | 81 | </br> | ||
1072 | 82 | <p class="td_f12"> | ||
1073 | 83 | ${ order.notes or '' }</br> | ||
1074 | 84 | ${_('Regards,')} | ||
1075 | 85 | </br> | ||
1076 | 86 | ${ user.signature or ''}</br> | ||
1077 | 87 | </p> | ||
1078 | 88 | |||
1079 | 89 | <p style="page-break-after:always"> | ||
1080 | 90 | </p> | ||
1081 | 91 | |||
1082 | 92 | %endfor | ||
1083 | 93 | </body> | ||
1084 | 94 | </html> | ||
1085 | 0 | \ No newline at end of file | 95 | \ No newline at end of file |
1086 | 1 | 96 | ||
1087 | === added file 'purchase_webkit/report/request_quotation.py' | |||
1088 | --- purchase_webkit/report/request_quotation.py 1970-01-01 00:00:00 +0000 | |||
1089 | +++ purchase_webkit/report/request_quotation.py 2013-10-10 09:53:37 +0000 | |||
1090 | @@ -0,0 +1,37 @@ | |||
1091 | 1 | # -*- coding: utf-8 -*- | ||
1092 | 2 | ############################################################################## | ||
1093 | 3 | # | ||
1094 | 4 | # OpenERP, Open Source Management Solution | ||
1095 | 5 | # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). | ||
1096 | 6 | # | ||
1097 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1098 | 8 | # it under the terms of the GNU Affero General Public License as | ||
1099 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
1100 | 10 | # License, or (at your option) any later version. | ||
1101 | 11 | # | ||
1102 | 12 | # This program is distributed in the hope that it will be useful, | ||
1103 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1104 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1105 | 15 | # GNU Affero General Public License for more details. | ||
1106 | 16 | # | ||
1107 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1108 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1109 | 19 | # | ||
1110 | 20 | ############################################################################## | ||
1111 | 21 | |||
1112 | 22 | import time | ||
1113 | 23 | from openerp.report import report_sxw | ||
1114 | 24 | from openerp.osv import osv | ||
1115 | 25 | from openerp import pooler | ||
1116 | 26 | |||
1117 | 27 | class request_quotation(report_sxw.rml_parse): | ||
1118 | 28 | def __init__(self, cr, uid, name, context): | ||
1119 | 29 | super(request_quotation, self).__init__(cr, uid, name, context=context) | ||
1120 | 30 | self.localcontext.update({ | ||
1121 | 31 | 'time': time, | ||
1122 | 32 | 'user': self.pool.get('res.users').browse(cr, uid, uid, context) | ||
1123 | 33 | }) | ||
1124 | 34 | report_sxw.report_sxw('report.purchase.quotation.webkit','purchase.order','addons/purchase_webkit/report/request_quotation.mako',parser=request_quotation) | ||
1125 | 35 | |||
1126 | 36 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1127 | 37 |
Hello Nishant, order_webkit bazaar. launchpad. net/~purchase- core-editors/ purchase- report/ 7.0/files/ 10/purchase_ order_webkit
I think the purchase_webkit module overlaps the purchase_
http://
Is it wanted?