Merge lp:~agilebg/openobject-addons/rem_mrp_webkit into lp:~serpentcs/openobject-addons/7.0-webkit-reports
- rem_mrp_webkit
- Merge into 7.0-webkit-reports
Proposed by
Nicola Malcontenti - Agile BG
Status: | Needs review |
---|---|
Proposed branch: | lp:~agilebg/openobject-addons/rem_mrp_webkit |
Merge into: | lp:~serpentcs/openobject-addons/7.0-webkit-reports |
Diff against target: |
853 lines (+0/-810) 8 files modified
mrp_webkit/__init__.py (+0/-24) mrp_webkit/__openerp__.py (+0/-46) mrp_webkit/mrp_report.xml (+0/-330) mrp_webkit/report/__init__.py (+0/-26) mrp_webkit/report/bom_structure.mako (+0/-66) mrp_webkit/report/bom_structure.py (+0/-64) mrp_webkit/report/order.mako (+0/-220) mrp_webkit/report/order.py (+0/-34) |
To merge this branch: | bzr merge lp:~agilebg/openobject-addons/rem_mrp_webkit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini (community) | code review | Approve | |
Serpent Consulting Services | Pending | ||
Review via email: mp+207472@code.launchpad.net |
Commit message
Description of the change
Hi,
With this MP and https:/
To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote : | # |
review:
Approve
(code review)
Revision history for this message
Lorenzo Battistini (elbati) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory 'mrp_webkit' |
2 | === removed file 'mrp_webkit/__init__.py' |
3 | --- mrp_webkit/__init__.py 2013-09-16 11:46:47 +0000 |
4 | +++ mrp_webkit/__init__.py 1970-01-01 00:00:00 +0000 |
5 | @@ -1,24 +0,0 @@ |
6 | -# -*- coding: utf-8 -*- |
7 | -############################################################################## |
8 | -# |
9 | -# OpenERP, Open Source Management Solution |
10 | -# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) |
11 | -# |
12 | -# This program is free software: you can redistribute it and/or modify |
13 | -# it under the terms of the GNU Affero General Public License as |
14 | -# published by the Free Software Foundation, either version 3 of the |
15 | -# License, or (at your option) any later version. |
16 | -# |
17 | -# This program is distributed in the hope that it will be useful, |
18 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | -# GNU Affero General Public License for more details. |
21 | -# |
22 | -# You should have received a copy of the GNU Affero General Public License |
23 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
24 | -# |
25 | -############################################################################ |
26 | - |
27 | -import report |
28 | - |
29 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
30 | |
31 | === removed file 'mrp_webkit/__openerp__.py' |
32 | --- mrp_webkit/__openerp__.py 2013-11-14 08:41:27 +0000 |
33 | +++ mrp_webkit/__openerp__.py 1970-01-01 00:00:00 +0000 |
34 | @@ -1,46 +0,0 @@ |
35 | -# -*- coding: utf-8 -*- |
36 | -############################################################################## |
37 | -# |
38 | -# OpenERP, Open Source Management Solution |
39 | -# Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>) |
40 | -# |
41 | -# This program is free software: you can redistribute it and/or modify |
42 | -# it under the terms of the GNU Affero General Public License as |
43 | -# published by the Free Software Foundation, either version 3 of the |
44 | -# License, or (at your option) any later version. |
45 | -# |
46 | -# This program is distributed in the hope that it will be useful, |
47 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
48 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
49 | -# GNU Affero General Public License for more details. |
50 | -# |
51 | -# You should have received a copy of the GNU Affero General Public License |
52 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
53 | -# |
54 | -############################################################################ |
55 | - |
56 | - |
57 | -{ |
58 | - 'name': 'MRP', |
59 | - 'version': '1.0', |
60 | - 'author': 'Serpent Consulting Services Pvt. Ltd.', |
61 | - 'website': 'http://www.serpentcs.com', |
62 | - 'category': 'Manufacturing', |
63 | - 'sequence': 18, |
64 | - 'summary': 'Manufacturing Orders, Bill of Materials, Routing', |
65 | - 'depends': ['mrp','report_webkit'], |
66 | - 'description': """ |
67 | -Manage the Manufacturing process in OpenERP |
68 | -=========================================== |
69 | - |
70 | - It is conversion of rml report to Webkit Report. |
71 | - |
72 | - """, |
73 | - 'data': [ |
74 | - 'mrp_report.xml', |
75 | - ], |
76 | - 'installable': True, |
77 | - 'application': True, |
78 | - 'auto_install': False, |
79 | -} |
80 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
81 | |
82 | === removed file 'mrp_webkit/mrp_report.xml' |
83 | --- mrp_webkit/mrp_report.xml 2013-09-16 11:46:47 +0000 |
84 | +++ mrp_webkit/mrp_report.xml 1970-01-01 00:00:00 +0000 |
85 | @@ -1,330 +0,0 @@ |
86 | -<?xml version="1.0" encoding="utf-8"?> |
87 | -<openerp> |
88 | - <data> |
89 | - <record id="bom webkit header" model="ir.header_webkit"> |
90 | - <field name="footer_html"><![CDATA[]]></field> |
91 | - <field name="orientation">Portrait</field> |
92 | - <field name="format">A4</field> |
93 | - <field name="html"><![CDATA[ |
94 | - <html> |
95 | - <head> |
96 | - |
97 | - <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> |
98 | - <script> |
99 | - function subst() { |
100 | - var vars={}; |
101 | - var x=document.location.search.substring(1).split('&'); |
102 | - for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} |
103 | - if(vars['page']!=1){ |
104 | - document.getElementById('inner_head').innerHTML=document.getElementById('actual_header').innerHTML; |
105 | - } |
106 | - var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; |
107 | - for(var i in x) { |
108 | - var y = document.getElementsByClassName(x[i]); |
109 | - for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; |
110 | - } |
111 | - } |
112 | - </script> |
113 | - <style type="text/css"> |
114 | - ${css} |
115 | - </style> |
116 | - </head> |
117 | - <body style="border:0; margin:0;" onload="subst()"> |
118 | - <table style="border:0" width="100%"> |
119 | - <tr> |
120 | - <td width="92%"> |
121 | - <td width="4%" style="text-align:right;font-size:10;width:350px;"> <span class="page"/></td> |
122 | - <td width="4%" style="text-align:left;font-size:10;width:30px"> / <span class="topage"/></td> |
123 | - </tr> |
124 | - </table> ${_debug or ''|n} |
125 | - <table id="inner_head" style="width: 100%;margin-left:1%;margin-right:1%;" > |
126 | - |
127 | - </table>${_debug or ''|n} |
128 | - <table id="actual_header" style="display:none;margin-left:5%;" class="basic_table"> |
129 | - <tr > |
130 | - <td style="text-align:left; border-color:black;border-bottom:2px solid black; font-size:14; font-family: Helvetica-Bold;" width="35%"><b>${ _('BOM Name') }</b></td> |
131 | - <td style="text-align:left;border-color:black;border-bottom:2px solid black; font-size:14; font-family: Helvetica-Bold;" width="35%"><b>${ _('Product Name') }</b></td> |
132 | - <td style="text-align:right;border-color:black;border-bottom:2px solid black; font-size:14; font-family: Helvetica-Bold;" width="15%"><b>${ _('Quantity') }<b></td> |
133 | - <td style="text-align:center;border-color:black;border-bottom:2px solid black; font-size:14; font-family: Helvetica-Bold;" width="15%"><b>${ _('BOM Ref') }</b></td> |
134 | - </tr> |
135 | - </table> |
136 | - </body> |
137 | -</html>]]> |
138 | - </field> |
139 | - <field eval="15.0" name="margin_top"/> |
140 | - <field eval="5.0" name="margin_bottom"/> |
141 | - <field name="css"><![CDATA[ |
142 | - |
143 | - |
144 | - |
145 | - |
146 | -.basic_table{ |
147 | -border-color:black; |
148 | -border-collapse: collapse; |
149 | -font-family: Helvetica-Bold; |
150 | -} |
151 | -.basic_table td { |
152 | -border-color:black; |
153 | -border-bottom:2px solid black; |
154 | -font-size:12px; |
155 | -} |
156 | - |
157 | -.list_table { |
158 | -border-color:black; |
159 | -border-collapse: collapse; |
160 | -font-family: Helvetica; |
161 | -} |
162 | -.list_table td { |
163 | -border-bottom:1px solid #ccc; |
164 | -font-size:12px; |
165 | -padding-left:3px |
166 | -padding-right:3px |
167 | -padding-top:3px |
168 | -padding-bottom:3px |
169 | -} |
170 | -.list_table1 { |
171 | -border-color:black; |
172 | -border-collapse: collapse; |
173 | -font-family: Helvetica; |
174 | -} |
175 | -.list_table1 td { |
176 | -border-color:gray; |
177 | -border-bottom:2px solid gray; |
178 | -font-size:12px; |
179 | - |
180 | -} |
181 | -.list_table2 { |
182 | -border-color:black; |
183 | -border-collapse: collapse; |
184 | - |
185 | -} |
186 | -.list_table2 td { |
187 | -border-color:black; |
188 | -border-top:2px solid black; |
189 | -border-bottom:2px solid black; |
190 | -font-size:12; |
191 | -padding-left:3px |
192 | -padding-right:3px |
193 | -padding-top:3px |
194 | -padding-bottom:3px |
195 | -} |
196 | -.list_table th { |
197 | -border-bottom:2px solid black; |
198 | -text-align:left; |
199 | -font-size:12px; |
200 | -font-weight:bold; |
201 | -padding-left:3px |
202 | -padding-right:3px |
203 | -} |
204 | - |
205 | -.list_tabe thead { |
206 | - display:table-header-group; |
207 | -} |
208 | - |
209 | - |
210 | -.total { |
211 | -width:100%; |
212 | -} |
213 | -.lib { |
214 | -width:10.3%; |
215 | -} |
216 | -.tot { |
217 | -text-align:left; |
218 | -width:15%; |
219 | -} |
220 | -.righttot { |
221 | -width:74%; |
222 | -} |
223 | -.tax { |
224 | -width:50%; |
225 | -} |
226 | -table { |
227 | - display: table; |
228 | - width: 100%; |
229 | - } |
230 | - |
231 | - table thead { |
232 | - display: table-header-group; |
233 | - } |
234 | - |
235 | - table tbody { |
236 | - display: table-row-group; |
237 | - } |
238 | - |
239 | - table tfoot { |
240 | - display: table-footer-group; |
241 | - } |
242 | - |
243 | - table tr { |
244 | - display: table-row; |
245 | - height: auto; |
246 | - } |
247 | - |
248 | - table th, |
249 | - table td { |
250 | - display: table-cell; |
251 | - overflow: visible; |
252 | - } |
253 | - |
254 | - table th, |
255 | - table td { |
256 | - height: 1px; /* Do the trick to make div.nobrk fill td height */ |
257 | - } |
258 | - |
259 | - table tr.singlecell td, |
260 | - table tr.singlecell th { |
261 | - height: auto; /* Reset trick for a full row td */ |
262 | - } |
263 | - |
264 | - .nobrk { |
265 | - page-break-inside: avoid; |
266 | - orphans: 10; |
267 | - widows: 10; |
268 | - position: relative; |
269 | - margin: -1px 0 0 -1px; |
270 | - min-height: 14px; |
271 | - line-height: 14px; |
272 | - height: 100%; |
273 | - } |
274 | - |
275 | - table tbody td .nobrk { |
276 | - min-height: 5px; |
277 | - } |
278 | - ]]> |
279 | - </field> |
280 | - <field name="name">bom webkit header</field> |
281 | - </record> |
282 | - |
283 | -<record id="production webkit header" model="ir.header_webkit"> |
284 | - <field name="footer_html"><![CDATA[]]></field> |
285 | - <field name="orientation">Portrait</field> |
286 | - <field name="format">A4</field> |
287 | - <field name="html"><![CDATA[ |
288 | - <html> |
289 | - <head> |
290 | - |
291 | - <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> |
292 | - <script> |
293 | - function subst() { |
294 | - var vars={}; |
295 | - var x=document.location.search.substring(1).split('&'); |
296 | - for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} |
297 | - if(vars['page']!=1){ |
298 | - document.getElementById('inner_head').innerHTML=document.getElementById('actual_header').innerHTML; |
299 | - } |
300 | - var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; |
301 | - for(var i in x) { |
302 | - var y = document.getElementsByClassName(x[i]); |
303 | - for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; |
304 | - } |
305 | - } |
306 | - </script> |
307 | - <style type="text/css"> |
308 | - ${css} |
309 | - </style> |
310 | - </head> |
311 | - <body style="border:0; margin:0;" onload="subst()"> |
312 | - <table class="header" style="border-bottom: 1px solid black; width: 100%"> |
313 | - <tr > |
314 | - <td style="text-align:right;font-size:10;font-family: Helvetica-Bold;" width="15%">${ formatLang(time.strftime('%Y-%m-%d'),date=True)} ${time.strftime('%I:%M')}</td> |
315 | - <td style="text-align:center;font-size:14; font-family: Helvetica-Bold;" width="75%"><b>${company.partner_id.name |entity}</b></td> |
316 | - <td width="5%" style="text-align:right;font-size:10;width:350px; font-family: Helvetica-Bold;" > <span class="page"/></td> |
317 | - <td width="5%" style="text-align:left;font-size:10;width:30px font-family: Helvetica-Bold;"> / <span class="topage"/></td> |
318 | - </tr> |
319 | - </table> ${_debug or ''|n} |
320 | - <table id="inner_head" style="width: 100%;margin-left:1%;margin-right:1%;" > |
321 | - |
322 | - </table>${_debug or ''|n} |
323 | - <table id="actual_header" style="display:none;margin-left:5%;" class="basic_table"> |
324 | - <tr > |
325 | - |
326 | - </tr> |
327 | - </table> |
328 | - </body> |
329 | -</html>]]> |
330 | - </field> |
331 | - <field eval="15.0" name="margin_top"/> |
332 | - <field eval="5.0" name="margin_bottom"/> |
333 | - <field name="css"><![CDATA[ |
334 | - |
335 | -.basic_table{ |
336 | -border-collapse: collapse; |
337 | -font-family: Helvetica-Bold; |
338 | -} |
339 | -.basic_table td { |
340 | -border-color:black; |
341 | -border-bottom:2px solid black; |
342 | - |
343 | -} |
344 | - |
345 | - .title{ |
346 | - text-align:left |
347 | - font-family: Helvetica-Bold; |
348 | - font-size:12px; |
349 | -} |
350 | - |
351 | -.list_table { |
352 | -border-color:black; |
353 | -border-collapse: collapse; |
354 | -font-family: Helvetica; |
355 | -} |
356 | -.list_table td { |
357 | -border-color:gray; |
358 | -border-bottom:1px solid gray; |
359 | -font-size:12px; |
360 | - |
361 | -} |
362 | -.list_table1 { |
363 | -border-color:black; |
364 | -border-collapse: collapse; |
365 | -font-family: Helvetica; |
366 | -font-size:12px; |
367 | -} |
368 | -.list_table1 td { |
369 | -border-color:gray; |
370 | -border-bottom:1px solid gray; |
371 | - |
372 | - |
373 | -} |
374 | -.list_table2 { |
375 | -text-align:center; |
376 | -border-collapse: collapse; |
377 | -} |
378 | -.list_table2 td { |
379 | - border:1px solid lightGrey; |
380 | - border-collapse: collapse; |
381 | - font-family: Helvetica; |
382 | - font-size:11px; |
383 | - } |
384 | - |
385 | -} |
386 | - |
387 | - ]]> |
388 | - </field> |
389 | - <field name="name">production webkit header</field> |
390 | - </record> |
391 | - |
392 | - <report |
393 | - auto="True" |
394 | - header="False" |
395 | - id="report_bom_structure" |
396 | - model="mrp.bom" |
397 | - name="bom.structure.webkit" |
398 | - file="mrp_webkit/report/bom_structure.mako" |
399 | - string="BOM Structure" |
400 | - report_type="webkit" |
401 | - webkit_header="bom webkit header"/> |
402 | - |
403 | - <report |
404 | - id="report_mrp_production_report" |
405 | - string="Production Order" |
406 | - model="mrp.production" |
407 | - name="mrp.production.order.webkit" |
408 | - file="mrp_webkit/report/order.mako" |
409 | - auto="False" |
410 | - report_type="webkit" |
411 | - webkit_header="production webkit header" |
412 | - /> |
413 | - |
414 | - </data> |
415 | -</openerp> |
416 | |
417 | === removed directory 'mrp_webkit/report' |
418 | === removed file 'mrp_webkit/report/__init__.py' |
419 | --- mrp_webkit/report/__init__.py 2013-09-16 11:46:47 +0000 |
420 | +++ mrp_webkit/report/__init__.py 1970-01-01 00:00:00 +0000 |
421 | @@ -1,26 +0,0 @@ |
422 | -# -*- coding: utf-8 -*- |
423 | -############################################################################## |
424 | -# |
425 | -# OpenERP, Open Source Management Solution |
426 | -# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) |
427 | -# |
428 | -# This program is free software: you can redistribute it and/or modify |
429 | -# it under the terms of the GNU Affero General Public License as |
430 | -# published by the Free Software Foundation, either version 3 of the |
431 | -# License, or (at your option) any later version. |
432 | -# |
433 | -# This program is distributed in the hope that it will be useful, |
434 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
435 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
436 | -# GNU Affero General Public License for more details. |
437 | -# |
438 | -# You should have received a copy of the GNU Affero General Public License |
439 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
440 | -# |
441 | -############################################################################ |
442 | - |
443 | -import order |
444 | -import bom_structure |
445 | - |
446 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
447 | - |
448 | |
449 | === removed file 'mrp_webkit/report/bom_structure.mako' |
450 | --- mrp_webkit/report/bom_structure.mako 2013-09-16 11:46:47 +0000 |
451 | +++ mrp_webkit/report/bom_structure.mako 1970-01-01 00:00:00 +0000 |
452 | @@ -1,66 +0,0 @@ |
453 | -<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
454 | - |
455 | -<html xmlns="http://www.w3.org/1999/xhtml"> |
456 | - <head> |
457 | - <style type="text/css"> |
458 | - ${css} |
459 | - </style> |
460 | - <title>BOM Structure.pdf</title> |
461 | - </head> |
462 | - <body> |
463 | - <table width="100%"> |
464 | - <tr> |
465 | - <td style="text-align:center;"> |
466 | - <h2><b>${ _('BOM Structure') } </b></h2> |
467 | - </td> |
468 | - </tr> |
469 | - </table> |
470 | - |
471 | - <table width="100%" class="basic_table"> |
472 | - <tr > |
473 | - <td style="text-align:left;" width="35%"><b>${ _('BOM Name') }</b></td> |
474 | - <td style="text-align:left;" width="35%"><b>${ _('Product Name') }</b></td> |
475 | - <td style="text-align:right;" width="15%"><b>${ _('Quantity') }<b></td> |
476 | - <td style="text-align:center;" width="15%"><b>${ _('BOM Ref') }</b></td> |
477 | - </tr> |
478 | - </table> |
479 | - %for o in objects: |
480 | - <table width="100%" class="list_table1"> |
481 | - <tr > |
482 | - <td style="text-align:left;" width="35%"><b> |
483 | - ${o.name}</b> |
484 | - </td> |
485 | - <td style="text-align:left;" width="35%"><b> |
486 | - [ ${(o.product_id.default_code) or removeParentNode('font')}] ${o.product_id.name}</b> |
487 | - </td> |
488 | - <td style="text-align:right;" width="15%"><b> |
489 | - ${o.product_qty} ${o.product_uom.name}</b> |
490 | - </td> |
491 | - <td style="text-align:center;" width="15%"><b> |
492 | - ${o.code or ''}</b> |
493 | - </td><br/> |
494 | - </tr> |
495 | - </table> |
496 | - |
497 | - %for l in get_children(o.bom_lines): |
498 | - <table width="100%" class="list_table"> |
499 | - <tr> |
500 | - <td style="text-align:left ; padding-left:10px" width="35%" class="cell_extended_gray"> |
501 | - <font color="white" >${'... '*(l['level'])}</font> - ${l['name']} |
502 | - </td> |
503 | - <td style="text-align:left;" width="35%" class="cell_extended_gray"> |
504 | - ${ (l['pcode']) or '' } ${l['pname']} |
505 | - </td> |
506 | - <td style="text-align:right;" width="15%" class="cell_extended_gray"> |
507 | - ${l['pqty']} ${l['uname']} |
508 | - </td> |
509 | - <td style="text-align:center;" width="15%" class="cell_extended_gray"> |
510 | - ${l['code'] or ''} |
511 | - </td> |
512 | - </tr> |
513 | - </table> |
514 | - %endfor |
515 | - </br> |
516 | - %endfor |
517 | -</body> |
518 | -</html> |
519 | \ No newline at end of file |
520 | |
521 | === removed file 'mrp_webkit/report/bom_structure.py' |
522 | --- mrp_webkit/report/bom_structure.py 2013-09-16 11:46:47 +0000 |
523 | +++ mrp_webkit/report/bom_structure.py 1970-01-01 00:00:00 +0000 |
524 | @@ -1,64 +0,0 @@ |
525 | -# -*- coding: utf-8 -*- |
526 | -############################################################################## |
527 | -# |
528 | -# OpenERP, Open Source Management Solution |
529 | -# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) |
530 | -# |
531 | -# This program is free software: you can redistribute it and/or modify |
532 | -# it under the terms of the GNU Affero General Public License as |
533 | -# published by the Free Software Foundation, either version 3 of the |
534 | -# License, or (at your option) any later version. |
535 | -# |
536 | -# This program is distributed in the hope that it will be useful, |
537 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
538 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
539 | -# GNU Affero General Public License for more details. |
540 | -# |
541 | -# You should have received a copy of the GNU Affero General Public License |
542 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
543 | -# |
544 | -############################################################################ |
545 | - |
546 | -import time |
547 | -from openerp.report import report_sxw |
548 | -from openerp.osv import osv |
549 | -from openerp import pooler |
550 | - |
551 | -class bom_structure(report_sxw.rml_parse): |
552 | - def __init__(self, cr, uid, name, context): |
553 | - super(bom_structure, self).__init__(cr, uid, name, context=context) |
554 | - self.localcontext.update({ |
555 | - 'time': time, |
556 | - 'get_children':self.get_children, |
557 | - }) |
558 | - |
559 | - def get_children(self, object, level=0): |
560 | - result = [] |
561 | - |
562 | - def _get_rec(object, level): |
563 | - for l in object: |
564 | - res = {} |
565 | - res['name'] = l.name |
566 | - res['pname'] = l.product_id.name |
567 | - res['pcode'] = l.product_id.default_code |
568 | - res['pqty'] = l.product_qty |
569 | - res['uname'] = l.product_uom.name |
570 | - res['code'] = l.code |
571 | - res['level'] = level |
572 | - result.append(res) |
573 | - if l.child_complete_ids: |
574 | - if level<6: |
575 | - level += 1 |
576 | - _get_rec(l.child_complete_ids,level) |
577 | - if level>0 and level<6: |
578 | - level -= 1 |
579 | - return result |
580 | - |
581 | - children = _get_rec(object,level) |
582 | - |
583 | - return children |
584 | - |
585 | -report_sxw.report_sxw('report.bom.structure.webkit','mrp.bom','mrp_webkit/report/bom_structure.mako',parser=bom_structure,header='internal') |
586 | - |
587 | - |
588 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
589 | |
590 | === removed file 'mrp_webkit/report/order.mako' |
591 | --- mrp_webkit/report/order.mako 2013-09-16 11:46:47 +0000 |
592 | +++ mrp_webkit/report/order.mako 1970-01-01 00:00:00 +0000 |
593 | @@ -1,220 +0,0 @@ |
594 | -<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
595 | - |
596 | -<html xmlns="http://www.w3.org/1999/xhtml"> |
597 | - <head> |
598 | - <style type="text/css"> |
599 | - ${css} |
600 | - </style> |
601 | - <title>Production Order.pdf</title> |
602 | - </head> |
603 | - <body> |
604 | - %for o in objects: |
605 | - <table class="title" width="100%"> |
606 | - <tr> |
607 | - <td width="100%"> |
608 | - <h3><b>${ _('Production Order N°') } : ${o.name}</b></h3> |
609 | - </td> |
610 | - </tr> |
611 | - </table> |
612 | - |
613 | - <table width="100%" class="list_table2"> |
614 | - <tr> |
615 | - <td width="35%"> |
616 | - <b>${ _('Source Document') }</b> |
617 | - </td> |
618 | - <td width="40%"> |
619 | - <b>${ _('Product') }</b> |
620 | - </td> |
621 | - <td width="25%"> |
622 | - <b>${ _('Quantity') }</b> |
623 | - </td> |
624 | - </tr> |
625 | - </table> |
626 | - <table width="100%" class="list_table2"> |
627 | - <tr> |
628 | - <td width="35%"> |
629 | - ${o.origin or ''} |
630 | - </td> |
631 | - <td width="40%"> |
632 | - ${o.product_id and o.product_id.code or ''} ${o.product_id and o.product_id.name or ''} |
633 | - </td> |
634 | - <td width="25%"> |
635 | - ${formatLang(o.product_qty)} ${o.product_id and o.product_uom and o.product_uom.name or ''} |
636 | - </td> |
637 | - </tr> |
638 | - </table> |
639 | - <br/> |
640 | - |
641 | - <table width="100%" class="list_table2"> |
642 | - <tr> |
643 | - <td width="35%"> |
644 | - <b>${ _('Scheduled Date') }</b> |
645 | - </td> |
646 | - <td width="18%"> |
647 | - <b>${ _('Printing date') }</b> |
648 | - </td> |
649 | - <td width="22%"> |
650 | - <b>${ _('Partner Ref') }</b> |
651 | - </td> |
652 | - <td width="25%"> |
653 | - <b>${ _('SO Number') }</b> |
654 | - </td> |
655 | - </tr> |
656 | - </table> |
657 | - <table width="100%" class="list_table2"> |
658 | - <tr> |
659 | - <td width="35%"> |
660 | - ${formatLang(o.date_planned, date_time = True)} |
661 | - </td> |
662 | - <td width="18%"> |
663 | - ${formatLang(time.strftime('%Y-%m-%d'),date = True)} |
664 | - </td> |
665 | - <td width="22%"> |
666 | - ${'sale_ref' in o._columns.keys() and o.sale_ref or ''} |
667 | - </td> |
668 | - <td width="25%"> |
669 | - ${'sale_name' in o._columns.keys() and o.sale_name or ''} |
670 | - </td> |
671 | - </tr> |
672 | - </table> |
673 | - <br/> |
674 | - |
675 | - %if o.workcenter_lines ==[]: |
676 | - |
677 | - %else: |
678 | - <table width="100%"> |
679 | - <tr> |
680 | - <td style="text-align:left;" width="100%"> |
681 | - <h4><b>${ _('Work Orders') }</b></h4> |
682 | - </td> |
683 | - </tr> |
684 | - </table> |
685 | - <table width="100%" class="list_table2"> |
686 | - <tr> |
687 | - <td width="15%"> |
688 | - <b>${ _('Sequence') }</b> |
689 | - </td> |
690 | - <td width="30%"> |
691 | - <b>${ _('Name') }</b> |
692 | - </td> |
693 | - <td width="30%"> |
694 | - <b>${ _('WorkCenter') }</b> |
695 | - </td> |
696 | - <td width="12%"> |
697 | - <b>${ _('No. Of Cycles') }</b> |
698 | - </td> |
699 | - <td width="13%"> |
700 | - <b>${ _('No. Of Hours') }</b> |
701 | - </td> |
702 | - </tr> |
703 | - </table> |
704 | - %for line2 in o.workcenter_lines: |
705 | - <table width="100%" class="list_table2"> |
706 | - <tr> |
707 | - <td width="15%"> |
708 | - ${str(line2.sequence)} |
709 | - </td> |
710 | - <td width="30%"> |
711 | - ${line2.name} |
712 | - </td> |
713 | - <td width="30%"> |
714 | - ${line2.workcenter_id and line2.workcenter_id.name or ''} |
715 | - </td> |
716 | - <td width="12%"> |
717 | - ${formatLang(line2.cycle)} |
718 | - </td> |
719 | - <td width="13%"> |
720 | - ${formatLang(line2.hour)} |
721 | - </td> |
722 | - </tr> |
723 | - </table><br/> |
724 | - %endfor |
725 | - %endif |
726 | - |
727 | - <table class="title" width="100%"> |
728 | - <tr> |
729 | - <td width="100%"> |
730 | - <h3>${ _('Bill Of Material') }</h3> |
731 | - </td> |
732 | - </tr> |
733 | - </table> |
734 | - <table style="border-bottom:2px solid black;font-family: Helvetica; font-size:11px;" width="100%" > |
735 | - <tr> |
736 | - <td style="text-align:left; " width="55%"> |
737 | - <b>${ _('Product') }</b> |
738 | - </td> |
739 | - <td style="text-align:right;" width="10%"> |
740 | - <b>${ _('Quantity') }</b> |
741 | - </td> |
742 | - <td style="text-align:center;" width="20%"> |
743 | - <b>${ _('Source Location') }</b> |
744 | - </td> |
745 | - <td style="text-align:center;" width="15%"> |
746 | - <b>${ _('Destination Location') }</b> |
747 | - </td> |
748 | - </tr> |
749 | - </table> |
750 | - |
751 | - %if o.move_lines ==[]: |
752 | - |
753 | - %else: |
754 | - <table style="font-family: Helvetica; font-size:11px;" width="100%"> |
755 | - <tr> |
756 | - <td width="100%"> |
757 | - <b>${ _('Products to Consume') }</b> |
758 | - </td> |
759 | - </tr> |
760 | - </table> |
761 | - %for line in o.move_lines: |
762 | - <table width="100%" class="list_table"> |
763 | - <tr> |
764 | - <td style="text-align:left;" width="55%"> |
765 | - ${line.product_id and line.product_id.code or ''} ${line.product_id and line.product_id.name or ''} |
766 | - </td> |
767 | - <td style="text-align:right;" width="10%"> |
768 | - ${formatLang( line.product_qty)} ${line.product_uom and line.product_uom.name or ''} |
769 | - </td> |
770 | - <td style="text-align:center;"width="20%"> |
771 | - ${line.location_id and line.location_id.name or ''} |
772 | - </td> |
773 | - <td style="text-align:center;"width="15%"> |
774 | - ${line.location_dest_id and line.location_dest_id.name or ''} |
775 | - </td> |
776 | - </tr> |
777 | - </table> |
778 | - %endfor |
779 | - %endif |
780 | - |
781 | - %if o.move_lines2 ==[]: |
782 | - |
783 | - %else: |
784 | - <table class="title" width="100%"> |
785 | - <tr> |
786 | - <td width="100%"> |
787 | - <h5><b>${ _('Consumed Products') }</b></h5> |
788 | - </td> |
789 | - </tr> |
790 | - </table> |
791 | - %for line2 in o.move_lines2: |
792 | - <table width="100%" class="list_table1"> |
793 | - <tr> |
794 | - <td style="text-align:left;"width="55%"> |
795 | - ${line2.product_id and line2.product_id.code or ''} ${line2.product_id and line2.product_id.name or ''} |
796 | - </td> |
797 | - <td style="text-align:right;"width="10%"> |
798 | - ${formatLang( line2.product_qty)} ${line2.product_uom and line2.product_uom.name or ''} |
799 | - </td> |
800 | - <td style="text-align:center;"width="20%"> |
801 | - ${line2.location_id and line2.location_id.name or ''} |
802 | - </td> |
803 | - <td style="text-align:center;"width="15%"> |
804 | - ${line2.location_dest_id and line2.location_dest_id.name or ''} |
805 | - </td> |
806 | - </tr> |
807 | - </table> |
808 | - %endfor |
809 | - %endif |
810 | - <p style="page-break-after:always"></p> |
811 | - %endfor |
812 | - </body> |
813 | -</html> |
814 | \ No newline at end of file |
815 | |
816 | === removed file 'mrp_webkit/report/order.py' |
817 | --- mrp_webkit/report/order.py 2013-09-16 11:46:47 +0000 |
818 | +++ mrp_webkit/report/order.py 1970-01-01 00:00:00 +0000 |
819 | @@ -1,34 +0,0 @@ |
820 | -# -*- coding: utf-8 -*- |
821 | -############################################################################## |
822 | -# |
823 | -# OpenERP, Open Source Management Solution |
824 | -# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>) |
825 | -# |
826 | -# This program is free software: you can redistribute it and/or modify |
827 | -# it under the terms of the GNU Affero General Public License as |
828 | -# published by the Free Software Foundation, either version 3 of the |
829 | -# License, or (at your option) any later version. |
830 | -# |
831 | -# This program is distributed in the hope that it will be useful, |
832 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
833 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
834 | -# GNU Affero General Public License for more details. |
835 | -# |
836 | -# You should have received a copy of the GNU Affero General Public License |
837 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
838 | -# |
839 | -############################################################################ |
840 | - |
841 | -import time |
842 | -from openerp.report import report_sxw |
843 | - |
844 | -class order(report_sxw.rml_parse): |
845 | - def __init__(self, cr, uid, name, context): |
846 | - super(order, self).__init__(cr, uid, name, context=context) |
847 | - self.localcontext.update({ |
848 | - 'time': time, |
849 | - }) |
850 | - |
851 | -report_sxw.report_sxw('report.mrp.production.order.webkit','mrp.production','addons/mrp_webkit/report/order.mako',parser=order,header='internal') |
852 | - |
853 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
to be merged as soon as this /code.launchpad .net/~agilebg/ openerp- mrp-reports/ adding_ mrp_webkit/ +merge/ 207471
https:/
is merged