Merge lp:~agilebg/openerp-mrp-reports/adding_mrp_webkit into lp:~openerp-community-reviewer/openerp-mrp-reports/7.0

Proposed by Nicola Malcontenti - Agile BG on 2014-02-20
Status: Rejected
Rejected by: Yannick Vaucher @ Camptocamp on 2014-03-25
Proposed branch: lp:~agilebg/openerp-mrp-reports/adding_mrp_webkit
Merge into: lp:~openerp-community-reviewer/openerp-mrp-reports/7.0
Diff against target: 638 lines (+597/-0)
7 files modified
mrp_webkit/__init__.py (+23/-0)
mrp_webkit/__openerp__.py (+47/-0)
mrp_webkit/mrp_report.xml (+330/-0)
mrp_webkit/report/__init__.py (+24/-0)
mrp_webkit/report/bom_structure.mako (+66/-0)
mrp_webkit/report/bom_structure.py (+68/-0)
mrp_webkit/report/order.py (+39/-0)
To merge this branch: bzr merge lp:~agilebg/openerp-mrp-reports/adding_mrp_webkit
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp 2014-02-20 Disapprove on 2014-03-03
Lorenzo Battistini (community) Needs Fixing on 2014-02-26
Review via email: mp+207471@code.launchpad.net

Description of the change

Hi,
I've made this Merge Proposal to add mrp_webkit in this branch such as is written here https://twitter.com/eLBaddi/status/433245831563448321

To post a comment you must log in.
Lorenzo Battistini (elbati) wrote :

Ciao Nico

you should remove mrp_webkit/.DS_Store
and run a PEP8 validator

When importing Python modules from the same addon, use explicit relative import rather than absolute import, example in __init__.py, do not use:
    import sale
  But
    from . import sale

line 552: osv is not used

review: Needs Fixing
2. By Hurrinico on 2014-02-26

[FIX] Community fix

> Ciao Nico
>
> you should remove mrp_webkit/.DS_Store
> and run a PEP8 validator
>
> When importing Python modules from the same addon, use explicit relative
> import rather than absolute import, example in __init__.py, do not use:
> import sale
> But
> from . import sale
>
> line 552: osv is not used
fixed

Lorenzo Battistini (elbati) wrote :

line 418: added file 'mrp_webkit/report/.DS_Store'
line 594: there's something wrong with symlink

review: Needs Fixing

I did the MP again, using bazaar extractor to preserve the original authors.

review: Disapprove
Lorenzo Battistini (elbati) wrote :

On 03/03/2014 11:58 AM, Alexandre Fayolle - camptocamp wrote:
> Review: Disapprove
>
> I did the MP again, using bazaar extractor to preserve the original authors.

Thanks Alexandre.

Here is the link
https://code.launchpad.net/~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe/+merge/209039
<https://code.launchpad.net/%7Ecamptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe/+merge/209039>

Unmerged revisions

2. By Hurrinico on 2014-02-26

[FIX] Community fix

1. By Hurrinico on 2014-02-20

[FIX] Add mrp_webkit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'mrp_webkit'
2=== added file 'mrp_webkit/__init__.py'
3--- mrp_webkit/__init__.py 1970-01-01 00:00:00 +0000
4+++ mrp_webkit/__init__.py 2014-02-26 09:55:33 +0000
5@@ -0,0 +1,23 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2011-2013 Serpent Consulting Services
11+# (<http://www.serpentcs.com>)
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+############################################################################
27+
28+from . import report
29
30=== added file 'mrp_webkit/__openerp__.py'
31--- mrp_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ mrp_webkit/__openerp__.py 2014-02-26 09:55:33 +0000
33@@ -0,0 +1,47 @@
34+# -*- coding: utf-8 -*-
35+##############################################################################
36+#
37+# OpenERP, Open Source Management Solution
38+# Copyright (C) 2011-2013 Serpent Consulting Services Pvt.
39+# 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=== added file 'mrp_webkit/mrp_report.xml'
83--- mrp_webkit/mrp_report.xml 1970-01-01 00:00:00 +0000
84+++ mrp_webkit/mrp_report.xml 2014-02-26 09:55:33 +0000
85@@ -0,0 +1,330 @@
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;">&nbsp;<span class="page"/></td>
122+ <td width="4%" style="text-align:left;font-size:10;width:30px">&nbsp;/&nbsp;<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)}&nbsp;${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;" >&nbsp;<span class="page"/></td>
317+ <td width="5%" style="text-align:left;font-size:10;width:30px font-family: Helvetica-Bold;">&nbsp;/&nbsp;<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=== added directory 'mrp_webkit/report'
418=== added file 'mrp_webkit/report/.DS_Store'
419Binary files mrp_webkit/report/.DS_Store 1970-01-01 00:00:00 +0000 and mrp_webkit/report/.DS_Store 2014-02-26 09:55:33 +0000 differ
420=== added file 'mrp_webkit/report/__init__.py'
421--- mrp_webkit/report/__init__.py 1970-01-01 00:00:00 +0000
422+++ mrp_webkit/report/__init__.py 2014-02-26 09:55:33 +0000
423@@ -0,0 +1,24 @@
424+# -*- coding: utf-8 -*-
425+##############################################################################
426+#
427+# OpenERP, Open Source Management Solution
428+# Copyright (C) 2011-2013 Serpent Consulting Services
429+# (<http://www.serpentcs.com>)
430+#
431+# This program is free software: you can redistribute it and/or modify
432+# it under the terms of the GNU Affero General Public License as
433+# published by the Free Software Foundation, either version 3 of the
434+# License, or (at your option) any later version.
435+#
436+# This program is distributed in the hope that it will be useful,
437+# but WITHOUT ANY WARRANTY; without even the implied warranty of
438+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
439+# GNU Affero General Public License for more details.
440+#
441+# You should have received a copy of the GNU Affero General Public License
442+# along with this program. If not, see <http://www.gnu.org/licenses/>.
443+#
444+############################################################################
445+
446+from . import order
447+from . import bom_structure
448
449=== added file 'mrp_webkit/report/bom_structure.mako'
450--- mrp_webkit/report/bom_structure.mako 1970-01-01 00:00:00 +0000
451+++ mrp_webkit/report/bom_structure.mako 2014-02-26 09:55:33 +0000
452@@ -0,0 +1,66 @@
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=== added file 'mrp_webkit/report/bom_structure.py'
522--- mrp_webkit/report/bom_structure.py 1970-01-01 00:00:00 +0000
523+++ mrp_webkit/report/bom_structure.py 2014-02-26 09:55:33 +0000
524@@ -0,0 +1,68 @@
525+# -*- coding: utf-8 -*-
526+##############################################################################
527+#
528+# OpenERP, Open Source Management Solution
529+# Copyright (C) 2011-2013 Serpent Consulting Services
530+# (<http://www.serpentcs.com>)
531+#
532+# This program is free software: you can redistribute it and/or modify
533+# it under the terms of the GNU Affero General Public License as
534+# published by the Free Software Foundation, either version 3 of the
535+# License, or (at your option) any later version.
536+#
537+# This program is distributed in the hope that it will be useful,
538+# but WITHOUT ANY WARRANTY; without even the implied warranty of
539+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
540+# GNU Affero General Public License for more details.
541+#
542+# You should have received a copy of the GNU Affero General Public License
543+# along with this program. If not, see <http://www.gnu.org/licenses/>.
544+#
545+############################################################################
546+
547+import time
548+from openerp.report import report_sxw
549+from openerp.osv import osv
550+from openerp import pooler
551+
552+
553+class bom_structure(report_sxw.rml_parse):
554+ def __init__(self, cr, uid, name, context):
555+ super(bom_structure, self).__init__(cr, uid, name, context=context)
556+ self.localcontext.update({
557+ 'time': time,
558+ 'get_children': self.get_children,
559+ })
560+
561+ def get_children(self, object, level=0):
562+ result = []
563+
564+ def _get_rec(object, level):
565+ for l in object:
566+ res = {}
567+ res['name'] = l.name
568+ res['pname'] = l.product_id.name
569+ res['pcode'] = l.product_id.default_code
570+ res['pqty'] = l.product_qty
571+ res['uname'] = l.product_uom.name
572+ res['code'] = l.code
573+ res['level'] = level
574+ result.append(res)
575+ if l.child_complete_ids:
576+ if level < 6:
577+ level += 1
578+ _get_rec(l.child_complete_ids, level)
579+ if level > 0 and level < 6:
580+ level -= 1
581+ return result
582+
583+ children = _get_rec(object, level)
584+
585+ return children
586+
587+report_sxw.report_sxw(
588+ 'report.bom.structure.webkit',
589+ 'mrp.bom',
590+ 'mrp_webkit/report/bom_structure.mako',
591+ parser=bom_structure,
592+ header='internal')
593
594=== added symlink 'mrp_webkit/report/order.mako'
595=== target is u'../../../../src/mako/mrp_order.mako'
596=== added file 'mrp_webkit/report/order.py'
597--- mrp_webkit/report/order.py 1970-01-01 00:00:00 +0000
598+++ mrp_webkit/report/order.py 2014-02-26 09:55:33 +0000
599@@ -0,0 +1,39 @@
600+# -*- coding: utf-8 -*-
601+##############################################################################
602+#
603+# OpenERP, Open Source Management Solution
604+# Copyright (C) 2011-2013 Serpent Consulting Services
605+# (<http://www.serpentcs.com>)
606+#
607+# This program is free software: you can redistribute it and/or modify
608+# it under the terms of the GNU Affero General Public License as
609+# published by the Free Software Foundation, either version 3 of the
610+# License, or (at your option) any later version.
611+#
612+# This program is distributed in the hope that it will be useful,
613+# but WITHOUT ANY WARRANTY; without even the implied warranty of
614+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
615+# GNU Affero General Public License for more details.
616+#
617+# You should have received a copy of the GNU Affero General Public License
618+# along with this program. If not, see <http://www.gnu.org/licenses/>.
619+#
620+############################################################################
621+
622+import time
623+from openerp.report import report_sxw
624+
625+
626+class order(report_sxw.rml_parse):
627+ def __init__(self, cr, uid, name, context):
628+ super(order, self).__init__(cr, uid, name, context=context)
629+ self.localcontext.update({
630+ 'time': time,
631+ })
632+
633+report_sxw.report_sxw(
634+ 'report.mrp.production.order.webkit',
635+ 'mrp.production',
636+ 'addons/mrp_webkit/report/order.mako',
637+ parser=order,
638+ header='internal')

Subscribers

People subscribed via source and target branches