openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #04349
[Merge] lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe into lp:openerp-mrp-reports
Alexandre Fayolle - camptocamp has proposed merging lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe into lp:openerp-mrp-reports.
Requested reviews:
OpenERP Community Reviewer/Maintainer (openerp-community-reviewer)
For more details, see:
https://code.launchpad.net/~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe/+merge/209039
Extraction of mrp_report from lp:~serpentcs/openobject-addons/7.0-webkit-reports for inclusion in OCA
--
https://code.launchpad.net/~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe/+merge/209039
Your team OpenERP Community Reviewer/Maintainer is requested to review the proposed merge of lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_webkit-afe into lp:openerp-mrp-reports.
=== added directory 'mrp_webkit'
=== added file 'mrp_webkit/__init__.py'
--- mrp_webkit/__init__.py 1970-01-01 00:00:00 +0000
+++ mrp_webkit/__init__.py 2014-03-03 11:00:02 +0000
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+############################################################################
+
+from . import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mrp_webkit/__openerp__.py'
--- mrp_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
+++ mrp_webkit/__openerp__.py 2014-03-03 11:00:02 +0000
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+############################################################################
+
+
+{
+ 'name': 'MRP',
+ 'version': '1.0',
+ 'author': 'Serpent Consulting Services Pvt. Ltd.',
+ 'website': 'http://www.serpentcs.com',
+ 'category': 'Manufacturing',
+ 'sequence': 18,
+ 'summary': 'Manufacturing Orders, Bill of Materials, Routing',
+ 'depends': ['mrp','report_webkit'],
+ 'description': """
+Manage the Manufacturing process in OpenERP
+===========================================
+
+ It is conversion of rml report to Webkit Report.
+
+ """,
+ 'data': [
+ 'mrp_report.xml',
+ ],
+ 'installable': True,
+ 'application': True,
+ 'auto_install': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mrp_webkit/mrp_report.xml'
--- mrp_webkit/mrp_report.xml 1970-01-01 00:00:00 +0000
+++ mrp_webkit/mrp_report.xml 2014-03-03 11:00:02 +0000
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="bom webkit header" model="ir.header_webkit">
+ <field name="footer_html"><![CDATA[]]></field>
+ <field name="orientation">Portrait</field>
+ <field name="format">A4</field>
+ <field name="html"><![CDATA[
+ <html>
+ <head>
+
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+ <script>
+ function subst() {
+ var vars={};
+ var x=document.location.search.substring(1).split('&');
+ for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+ if(vars['page']!=1){
+ document.getElementById('inner_head').innerHTML=document.getElementById('actual_header').innerHTML;
+ }
+ var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+ for(var i in x) {
+ var y = document.getElementsByClassName(x[i]);
+ for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+ }
+ }
+ </script>
+ <style type="text/css">
+ ${css}
+ </style>
+ </head>
+ <body style="border:0; margin:0;" onload="subst()">
+ <table style="border:0" width="100%">
+ <tr>
+ <td width="92%">
+ <td width="4%" style="text-align:right;font-size:10;width:350px;"> <span class="page"/></td>
+ <td width="4%" style="text-align:left;font-size:10;width:30px"> / <span class="topage"/></td>
+ </tr>
+ </table> ${_debug or ''|n}
+ <table id="inner_head" style="width: 100%;margin-left:1%;margin-right:1%;" >
+
+ </table>${_debug or ''|n}
+ <table id="actual_header" style="display:none;margin-left:5%;" class="basic_table">
+ <tr >
+ <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>
+ <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>
+ <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>
+ <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>
+ </tr>
+ </table>
+ </body>
+</html>]]>
+ </field>
+ <field eval="15.0" name="margin_top"/>
+ <field eval="5.0" name="margin_bottom"/>
+ <field name="css"><![CDATA[
+
+
+
+
+.basic_table{
+border-color:black;
+border-collapse: collapse;
+font-family: Helvetica-Bold;
+}
+.basic_table td {
+border-color:black;
+border-bottom:2px solid black;
+font-size:12px;
+}
+
+.list_table {
+border-color:black;
+border-collapse: collapse;
+font-family: Helvetica;
+}
+.list_table td {
+border-bottom:1px solid #ccc;
+font-size:12px;
+padding-left:3px
+padding-right:3px
+padding-top:3px
+padding-bottom:3px
+}
+.list_table1 {
+border-color:black;
+border-collapse: collapse;
+font-family: Helvetica;
+}
+.list_table1 td {
+border-color:gray;
+border-bottom:2px solid gray;
+font-size:12px;
+
+}
+.list_table2 {
+border-color:black;
+border-collapse: collapse;
+
+}
+.list_table2 td {
+border-color:black;
+border-top:2px solid black;
+border-bottom:2px solid black;
+font-size:12;
+padding-left:3px
+padding-right:3px
+padding-top:3px
+padding-bottom:3px
+}
+.list_table th {
+border-bottom:2px solid black;
+text-align:left;
+font-size:12px;
+font-weight:bold;
+padding-left:3px
+padding-right:3px
+}
+
+.list_tabe thead {
+ display:table-header-group;
+}
+
+
+.total {
+width:100%;
+}
+.lib {
+width:10.3%;
+}
+.tot {
+text-align:left;
+width:15%;
+}
+.righttot {
+width:74%;
+}
+.tax {
+width:50%;
+}
+table {
+ display: table;
+ width: 100%;
+ }
+
+ table thead {
+ display: table-header-group;
+ }
+
+ table tbody {
+ display: table-row-group;
+ }
+
+ table tfoot {
+ display: table-footer-group;
+ }
+
+ table tr {
+ display: table-row;
+ height: auto;
+ }
+
+ table th,
+ table td {
+ display: table-cell;
+ overflow: visible;
+ }
+
+ table th,
+ table td {
+ height: 1px; /* Do the trick to make div.nobrk fill td height */
+ }
+
+ table tr.singlecell td,
+ table tr.singlecell th {
+ height: auto; /* Reset trick for a full row td */
+ }
+
+ .nobrk {
+ page-break-inside: avoid;
+ orphans: 10;
+ widows: 10;
+ position: relative;
+ margin: -1px 0 0 -1px;
+ min-height: 14px;
+ line-height: 14px;
+ height: 100%;
+ }
+
+ table tbody td .nobrk {
+ min-height: 5px;
+ }
+ ]]>
+ </field>
+ <field name="name">bom webkit header</field>
+ </record>
+
+<record id="production webkit header" model="ir.header_webkit">
+ <field name="footer_html"><![CDATA[]]></field>
+ <field name="orientation">Portrait</field>
+ <field name="format">A4</field>
+ <field name="html"><![CDATA[
+ <html>
+ <head>
+
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+ <script>
+ function subst() {
+ var vars={};
+ var x=document.location.search.substring(1).split('&');
+ for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+ if(vars['page']!=1){
+ document.getElementById('inner_head').innerHTML=document.getElementById('actual_header').innerHTML;
+ }
+ var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+ for(var i in x) {
+ var y = document.getElementsByClassName(x[i]);
+ for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+ }
+ }
+ </script>
+ <style type="text/css">
+ ${css}
+ </style>
+ </head>
+ <body style="border:0; margin:0;" onload="subst()">
+ <table class="header" style="border-bottom: 1px solid black; width: 100%">
+ <tr >
+ <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>
+ <td style="text-align:center;font-size:14; font-family: Helvetica-Bold;" width="75%"><b>${company.partner_id.name |entity}</b></td>
+ <td width="5%" style="text-align:right;font-size:10;width:350px; font-family: Helvetica-Bold;" > <span class="page"/></td>
+ <td width="5%" style="text-align:left;font-size:10;width:30px font-family: Helvetica-Bold;"> / <span class="topage"/></td>
+ </tr>
+ </table> ${_debug or ''|n}
+ <table id="inner_head" style="width: 100%;margin-left:1%;margin-right:1%;" >
+
+ </table>${_debug or ''|n}
+ <table id="actual_header" style="display:none;margin-left:5%;" class="basic_table">
+ <tr >
+
+ </tr>
+ </table>
+ </body>
+</html>]]>
+ </field>
+ <field eval="15.0" name="margin_top"/>
+ <field eval="5.0" name="margin_bottom"/>
+ <field name="css"><![CDATA[
+
+.basic_table{
+border-collapse: collapse;
+font-family: Helvetica-Bold;
+}
+.basic_table td {
+border-color:black;
+border-bottom:2px solid black;
+
+}
+
+ .title{
+ text-align:left
+ font-family: Helvetica-Bold;
+ font-size:12px;
+}
+
+.list_table {
+border-color:black;
+border-collapse: collapse;
+font-family: Helvetica;
+}
+.list_table td {
+border-color:gray;
+border-bottom:1px solid gray;
+font-size:12px;
+
+}
+.list_table1 {
+border-color:black;
+border-collapse: collapse;
+font-family: Helvetica;
+font-size:12px;
+}
+.list_table1 td {
+border-color:gray;
+border-bottom:1px solid gray;
+
+
+}
+.list_table2 {
+text-align:center;
+border-collapse: collapse;
+}
+.list_table2 td {
+ border:1px solid lightGrey;
+ border-collapse: collapse;
+ font-family: Helvetica;
+ font-size:11px;
+ }
+
+}
+
+ ]]>
+ </field>
+ <field name="name">production webkit header</field>
+ </record>
+
+ <report
+ auto="True"
+ header="False"
+ id="report_bom_structure"
+ model="mrp.bom"
+ name="bom.structure.webkit"
+ file="mrp_webkit/report/bom_structure.mako"
+ string="BOM Structure"
+ report_type="webkit"
+ webkit_header="bom webkit header"/>
+
+ <report
+ id="report_mrp_production_report"
+ string="Production Order"
+ model="mrp.production"
+ name="mrp.production.order.webkit"
+ file="mrp_webkit/report/order.mako"
+ auto="False"
+ report_type="webkit"
+ webkit_header="production webkit header"
+ />
+
+ </data>
+</openerp>
=== added directory 'mrp_webkit/report'
=== added file 'mrp_webkit/report/__init__.py'
--- mrp_webkit/report/__init__.py 1970-01-01 00:00:00 +0000
+++ mrp_webkit/report/__init__.py 2014-03-03 11:00:02 +0000
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+############################################################################
+
+from . import order
+from . import bom_structure
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added file 'mrp_webkit/report/bom_structure.mako'
--- mrp_webkit/report/bom_structure.mako 1970-01-01 00:00:00 +0000
+++ mrp_webkit/report/bom_structure.mako 2014-03-03 11:00:02 +0000
@@ -0,0 +1,66 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style type="text/css">
+ ${css}
+ </style>
+ <title>BOM Structure.pdf</title>
+ </head>
+ <body>
+ <table width="100%">
+ <tr>
+ <td style="text-align:center;">
+ <h2><b>${ _('BOM Structure') } </b></h2>
+ </td>
+ </tr>
+ </table>
+
+ <table width="100%" class="basic_table">
+ <tr >
+ <td style="text-align:left;" width="35%"><b>${ _('BOM Name') }</b></td>
+ <td style="text-align:left;" width="35%"><b>${ _('Product Name') }</b></td>
+ <td style="text-align:right;" width="15%"><b>${ _('Quantity') }<b></td>
+ <td style="text-align:center;" width="15%"><b>${ _('BOM Ref') }</b></td>
+ </tr>
+ </table>
+ %for o in objects:
+ <table width="100%" class="list_table1">
+ <tr >
+ <td style="text-align:left;" width="35%"><b>
+ ${o.name}</b>
+ </td>
+ <td style="text-align:left;" width="35%"><b>
+ [ ${(o.product_id.default_code) or removeParentNode('font')}] ${o.product_id.name}</b>
+ </td>
+ <td style="text-align:right;" width="15%"><b>
+ ${o.product_qty} ${o.product_uom.name}</b>
+ </td>
+ <td style="text-align:center;" width="15%"><b>
+ ${o.code or ''}</b>
+ </td><br/>
+ </tr>
+ </table>
+
+ %for l in get_children(o.bom_lines):
+ <table width="100%" class="list_table">
+ <tr>
+ <td style="text-align:left ; padding-left:10px" width="35%" class="cell_extended_gray">
+ <font color="white" >${'... '*(l['level'])}</font> - ${l['name']}
+ </td>
+ <td style="text-align:left;" width="35%" class="cell_extended_gray">
+ ${ (l['pcode']) or '' } ${l['pname']}
+ </td>
+ <td style="text-align:right;" width="15%" class="cell_extended_gray">
+ ${l['pqty']} ${l['uname']}
+ </td>
+ <td style="text-align:center;" width="15%" class="cell_extended_gray">
+ ${l['code'] or ''}
+ </td>
+ </tr>
+ </table>
+ %endfor
+ </br>
+ %endfor
+</body>
+</html>
=== added file 'mrp_webkit/report/bom_structure.py'
--- mrp_webkit/report/bom_structure.py 1970-01-01 00:00:00 +0000
+++ mrp_webkit/report/bom_structure.py 2014-03-03 11:00:02 +0000
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+############################################################################
+
+import time
+
+from openerp.report import report_sxw
+
+class bom_structure(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(bom_structure, self).__init__(cr, uid, name, context=context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_children': self.get_children,
+ })
+
+ def get_children(self, object, level=0):
+ result = []
+
+ def _get_rec(object, level):
+ for l in object:
+ res = {}
+ res['name'] = l.name
+ res['pname'] = l.product_id.name
+ res['pcode'] = l.product_id.default_code
+ res['pqty'] = l.product_qty
+ res['uname'] = l.product_uom.name
+ res['code'] = l.code
+ res['level'] = level
+ result.append(res)
+ if l.child_complete_ids:
+ if level < 6:
+ level += 1
+ _get_rec(l.child_complete_ids,level)
+ if 0 < level < 6:
+ level -= 1
+ return result
+
+ children = _get_rec(object,level)
+
+ return children
+
+report_sxw.report_sxw('report.bom.structure.webkit',
+ 'mrp.bom',
+ 'mrp_webkit/report/bom_structure.mako',
+ parser=bom_structure,header='internal')
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mrp_webkit/report/order.mako'
--- mrp_webkit/report/order.mako 1970-01-01 00:00:00 +0000
+++ mrp_webkit/report/order.mako 2014-03-03 11:00:02 +0000
@@ -0,0 +1,220 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <style type="text/css">
+ ${css}
+ </style>
+ <title>Production Order.pdf</title>
+ </head>
+ <body>
+ %for o in objects:
+ <table class="title" width="100%">
+ <tr>
+ <td width="100%">
+ <h3><b>${ _('Production Order N°') } : ${o.name}</b></h3>
+ </td>
+ </tr>
+ </table>
+
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="35%">
+ <b>${ _('Source Document') }</b>
+ </td>
+ <td width="40%">
+ <b>${ _('Product') }</b>
+ </td>
+ <td width="25%">
+ <b>${ _('Quantity') }</b>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="35%">
+ ${o.origin or ''}
+ </td>
+ <td width="40%">
+ ${o.product_id and o.product_id.code or ''} ${o.product_id and o.product_id.name or ''}
+ </td>
+ <td width="25%">
+ ${formatLang(o.product_qty)} ${o.product_id and o.product_uom and o.product_uom.name or ''}
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="35%">
+ <b>${ _('Scheduled Date') }</b>
+ </td>
+ <td width="18%">
+ <b>${ _('Printing date') }</b>
+ </td>
+ <td width="22%">
+ <b>${ _('Partner Ref') }</b>
+ </td>
+ <td width="25%">
+ <b>${ _('SO Number') }</b>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="35%">
+ ${formatLang(o.date_planned, date_time = True)}
+ </td>
+ <td width="18%">
+ ${formatLang(time.strftime('%Y-%m-%d'),date = True)}
+ </td>
+ <td width="22%">
+ ${'sale_ref' in o._columns.keys() and o.sale_ref or ''}
+ </td>
+ <td width="25%">
+ ${'sale_name' in o._columns.keys() and o.sale_name or ''}
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+ %if o.workcenter_lines ==[]:
+
+ %else:
+ <table width="100%">
+ <tr>
+ <td style="text-align:left;" width="100%">
+ <h4><b>${ _('Work Orders') }</b></h4>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="15%">
+ <b>${ _('Sequence') }</b>
+ </td>
+ <td width="30%">
+ <b>${ _('Name') }</b>
+ </td>
+ <td width="30%">
+ <b>${ _('WorkCenter') }</b>
+ </td>
+ <td width="12%">
+ <b>${ _('No. Of Cycles') }</b>
+ </td>
+ <td width="13%">
+ <b>${ _('No. Of Hours') }</b>
+ </td>
+ </tr>
+ </table>
+ %for line2 in o.workcenter_lines:
+ <table width="100%" class="list_table2">
+ <tr>
+ <td width="15%">
+ ${str(line2.sequence)}
+ </td>
+ <td width="30%">
+ ${line2.name}
+ </td>
+ <td width="30%">
+ ${line2.workcenter_id and line2.workcenter_id.name or ''}
+ </td>
+ <td width="12%">
+ ${formatLang(line2.cycle)}
+ </td>
+ <td width="13%">
+ ${formatLang(line2.hour)}
+ </td>
+ </tr>
+ </table><br/>
+ %endfor
+ %endif
+
+ <table class="title" width="100%">
+ <tr>
+ <td width="100%">
+ <h3>${ _('Bill Of Material') }</h3>
+ </td>
+ </tr>
+ </table>
+ <table style="border-bottom:2px solid black;font-family: Helvetica; font-size:11px;" width="100%" >
+ <tr>
+ <td style="text-align:left; " width="55%">
+ <b>${ _('Product') }</b>
+ </td>
+ <td style="text-align:right;" width="10%">
+ <b>${ _('Quantity') }</b>
+ </td>
+ <td style="text-align:center;" width="20%">
+ <b>${ _('Source Location') }</b>
+ </td>
+ <td style="text-align:center;" width="15%">
+ <b>${ _('Destination Location') }</b>
+ </td>
+ </tr>
+ </table>
+
+ %if o.move_lines ==[]:
+
+ %else:
+ <table style="font-family: Helvetica; font-size:11px;" width="100%">
+ <tr>
+ <td width="100%">
+ <b>${ _('Products to Consume') }</b>
+ </td>
+ </tr>
+ </table>
+ %for line in o.move_lines:
+ <table width="100%" class="list_table">
+ <tr>
+ <td style="text-align:left;" width="55%">
+ ${line.product_id and line.product_id.code or ''} ${line.product_id and line.product_id.name or ''}
+ </td>
+ <td style="text-align:right;" width="10%">
+ ${formatLang( line.product_qty)} ${line.product_uom and line.product_uom.name or ''}
+ </td>
+ <td style="text-align:center;"width="20%">
+ ${line.location_id and line.location_id.name or ''}
+ </td>
+ <td style="text-align:center;"width="15%">
+ ${line.location_dest_id and line.location_dest_id.name or ''}
+ </td>
+ </tr>
+ </table>
+ %endfor
+ %endif
+
+ %if o.move_lines2 ==[]:
+
+ %else:
+ <table class="title" width="100%">
+ <tr>
+ <td width="100%">
+ <h5><b>${ _('Consumed Products') }</b></h5>
+ </td>
+ </tr>
+ </table>
+ %for line2 in o.move_lines2:
+ <table width="100%" class="list_table1">
+ <tr>
+ <td style="text-align:left;"width="55%">
+ ${line2.product_id and line2.product_id.code or ''} ${line2.product_id and line2.product_id.name or ''}
+ </td>
+ <td style="text-align:right;"width="10%">
+ ${formatLang( line2.product_qty)} ${line2.product_uom and line2.product_uom.name or ''}
+ </td>
+ <td style="text-align:center;"width="20%">
+ ${line2.location_id and line2.location_id.name or ''}
+ </td>
+ <td style="text-align:center;"width="15%">
+ ${line2.location_dest_id and line2.location_dest_id.name or ''}
+ </td>
+ </tr>
+ </table>
+ %endfor
+ %endif
+ <p style="page-break-after:always"></p>
+ %endfor
+ </body>
+</html>
=== added file 'mrp_webkit/report/order.py'
--- mrp_webkit/report/order.py 1970-01-01 00:00:00 +0000
+++ mrp_webkit/report/order.py 2014-03-03 11:00:02 +0000
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2011-2013 Serpent Consulting Services (<http://www.serpentcs.com>)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+############################################################################
+
+import time
+
+from openerp.report import report_sxw
+
+class order(report_sxw.rml_parse):
+ def __init__(self, cr, uid, name, context):
+ super(order, self).__init__(cr, uid, name, context=context)
+ self.localcontext.update({
+ 'time': time,
+ })
+
+report_sxw.report_sxw('report.mrp.production.order.webkit',
+ 'mrp.production',
+ 'addons/mrp_webkit/report/order.mako',
+ parser=order,
+ header='internal')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Follow ups