[IMP] Converted the mrp production production order to QWeb
bzr revid: openerp-sle@openerp-sle.home-20140214180052-pbluhvtg0ptl7m2c
This commit is contained in:
@@ -72,6 +72,8 @@ Dashboard / Reports for MRP will include:
|
||||
'report/mrp_production_order_view.xml',
|
||||
'board_manufacturing_view.xml',
|
||||
'res_config_view.xml',
|
||||
|
||||
'views/report_mrporder.xml',
|
||||
],
|
||||
'demo': ['mrp_demo.xml'],
|
||||
#TODO: This yml tests are needed to be completely reviewed again because the product wood panel is removed in product demo as it does not suit for new demo context of computer and consultant company
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
<report auto="True" header="False" id="report_bom_structure" model="mrp.bom" name="bom.structure" rml="mrp/report/bom_structure.rml" string="BOM Structure"/>
|
||||
|
||||
<report
|
||||
id="report_mrp_production_report"
|
||||
string="Production Order"
|
||||
model="mrp.production"
|
||||
name="mrp.production.order"
|
||||
rml="mrp/report/order.rml"
|
||||
auto="False"
|
||||
/>
|
||||
<report
|
||||
string="Production Order"
|
||||
id="action_report_production_order"
|
||||
model="mrp.production"
|
||||
name="mrp.report_mrporder"
|
||||
file="mrp.report_mrporder"
|
||||
report_type="qweb-pdf"
|
||||
/>
|
||||
|
||||
<report id="report_cost_structure"
|
||||
model="product.product"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
import price
|
||||
import workcenter_load
|
||||
import order
|
||||
import bom_structure
|
||||
import mrp_report
|
||||
import mrp_production_order
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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','mrp.production','addons/mrp/report/order.rml',parser=order,header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,373 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="Production Order.pdf">
|
||||
<template title="Production Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="42.0" width="527" height="758"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table9">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table10">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="terp_header" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<pto>
|
||||
<pto_header>
|
||||
<blockTable colWidths="256.0,61.0,107.0,104.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details"><b>Product </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Quantity</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Source Location</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Destination Location</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</pto_header>
|
||||
<para style="terp_default_8">[[repeatIn(objects,'o')]] </para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_header"><b>Production Order N° : [[ o.name ]]</b></para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="193.0,206.0,129.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Source Document</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Product </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Quantity</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="193.0,205.0,129.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.origin ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ (o.product_id and o.product_id.code) or '' ]] [[ (o.product_id and o.product_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[formatLang(o.product_qty) ]] [[ (o.product_id and o.product_uom and o.product_uom.name) or '']]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="193.0,92.0,114.0,129.0" repeatRows="1" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Scheduled Date</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Printing date</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Partner Ref</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>SO Number</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<blockTable colWidths="193.0,92.0,114.0,129.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.date_planned, date_time = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ ('sale_ref' in o._columns.keys() and o.sale_ref) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ ('sale_name' in o._columns.keys() and o.sale_name) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_8"><b>Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]]</b></para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="74.0,212.0,112.0,66.0,64.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Sequence</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>WorkCenter</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>No. Of Cycles</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>No. Of Hours</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.workcenter_lines,'line2') ]]</para>
|
||||
<blockTable colWidths="74.0,212.0,112.0,66.0,64.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ str(line2.sequence) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ line2.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ (line2.workcenter_id and line2.workcenter_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line2.cycle) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(line2.hour) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_9"><b>Bill Of Material </b></para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="256.0,61.0,107.0,104.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details"><b>Product </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Quantity</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Source Location</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre"><b>Destination Location</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_Bold_9"><b>Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]]</b></para>
|
||||
<section>
|
||||
<para style="terp_default_2">[[ repeatIn(o.move_lines,'line') ]]</para>
|
||||
<blockTable colWidths="250.0,65.0,108.0,104.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (line.product_id and line.product_id.code) or '' ]] [[ (line.product_id and line.product_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang( line.product_qty) ]] [[ (line.product_uom and line.product_uom.name) or '']] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (line.location_id and line.location_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (line.location_dest_id and line.location_dest_id.name) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_9"><b>Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]]</b></para>
|
||||
<section>
|
||||
<para style="terp_default_2">[[ repeatIn(o.move_lines2,'line2') ]]</para>
|
||||
<blockTable colWidths="251.0,66.0,106.0,104.0" style="Table10">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (line2.product_id and line2.product_id.code) or '' ]] [[ (line2.product_id and line2.product_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang( line2.product_qty) ]] [[ (line2.product_uom and line2.product_uom.name) or '']] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (line2.location_id and line2.location_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (line2.location_dest_id and line2.location_dest_id.name) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
</pto>
|
||||
</story>
|
||||
</document>
|
||||
@@ -238,16 +238,6 @@
|
||||
data, format = openerp.report.render_report(cr, uid, [order.bom_id.id], 'bom.structure', {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_structure_report.'+format), 'wb+').write(data)
|
||||
-
|
||||
I print "Production Order".
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref("mrp_production_test1")], 'mrp.production.order', {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
|
||||
-
|
||||
I print "Work Center Load Report".
|
||||
-
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_mrporder">
|
||||
<t t-call="report.html_skeleton">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
<h2>Production Order N° : <span t-field="o.name"/></h2>
|
||||
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Source Document:</strong><br/>
|
||||
<span t-field="o.origin"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Product:</strong><br/>
|
||||
<span t-field="o.product_id.code"/>
|
||||
<span t-field="o.product_id.name"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Quantity:</strong><br/>
|
||||
<span t-field="o.product_qty"/>
|
||||
<span t-field="o.product_uom.name" groups="product.group_uom"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Scheduled Date:</strong><br/>
|
||||
<span t-field="o.date_planned"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Printing date:</strong><br/>
|
||||
<span t-esc="time.strftime('%Y-%m-%d')"/>
|
||||
</div>
|
||||
<div class="col-xs-3" t-if="'sale_ref' in o._columns.keys()">
|
||||
<strong>Partner Ref:</strong><br/>
|
||||
<span t-esc="'sale_ref' in o._columns.keys() and o.sale_ref"/>
|
||||
</div>
|
||||
<div class="col-xs-3" t-if="'sale_name' in o._columns.keys()">
|
||||
<strong>SO Number:</strong><br/>
|
||||
<span t-esc="'sale_name' in o._columns.keys() and o.sale_name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div t-if="o.workcenter_lines">
|
||||
<strong>Work Orders</strong>
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td class="text-center"><strong>Sequence</strong></td>
|
||||
<td class="text-center"><strong>Name</strong></td>
|
||||
<td class="text-center"><strong>WorkCenter</strong></td>
|
||||
<td class="text-center"><strong>No. Of Cycles</strong></td>
|
||||
<td class="text-center"><strong>No. Of Hours</strong></td>
|
||||
</tr>
|
||||
<tr t-foreach="o.workcenter_lines" t-as="line2">
|
||||
<td class="text-center"><span t-field="line2.sequence"/></td>
|
||||
<td class="text-center"><span t-field="line2.name"/></td>
|
||||
<td class="text-center"><span t-field="line2.workcenter_id.name"/></td>
|
||||
<td class="text-center"><span t-field="line2.cycle"/></td>
|
||||
<td class="text-center"><span t-field="line2.hour"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3 t-if="o.move_lines">Bill Of Material</h3>
|
||||
|
||||
<table class="table table-condensed" t-if="o.move_lines or o.move_lines2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th class="text-right"><strong>Quantity</strong></th>
|
||||
<th class="text-center" groups="stock.group_locations">
|
||||
<strong>Source Location</strong>
|
||||
</th>
|
||||
<th class="text-center" groups="stock.group_locations">
|
||||
<strong>Destination Location</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-if="o.move_lines">
|
||||
<tr>
|
||||
<td colspan="4"><strong>Products to Consume</strong></td>
|
||||
</tr>
|
||||
<tr t-foreach="o.move_lines" t-as="line">
|
||||
<td>
|
||||
<span t-field="line.product_id.code"/>
|
||||
<span t-field="line.product_id.name"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.product_qty"/>
|
||||
<span t-field="line.product_uom.name" groups="product.group_uom"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<span t-field="line.location_id.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<span t-field="line.location_dest_id.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
<t t-if="o.move_lines2">
|
||||
<tr>
|
||||
<td colspan="4"><strong>Consumed Products</strong></td>
|
||||
</tr>
|
||||
<tr t-foreach="o.move_lines2" t-as="line2">>
|
||||
<td>
|
||||
<span t-field="line2.product_id.code"/>
|
||||
<span t-field="line2.product_id.name"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line2.product_qty"/>
|
||||
<span t-field="line2.product_uom.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<span t-field="line2.location_id.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<span t-field="line2.location_dest_id.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="oe_structure"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -11,20 +11,20 @@
|
||||
<h2>Purchase for Requisitions <span t-field="o.name"/></h2>
|
||||
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-3">
|
||||
<strong>Requisition Reference:</strong><br/>
|
||||
<span t-field="o.name"/>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-3">
|
||||
<strong>Requisition Date:</strong><br/>
|
||||
<span t-field="o.date_start"/>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-3">
|
||||
<strong>Type:</strong><br/>
|
||||
<span t-if="o.exclusive=='exclusive'">Purchase Requisitions (exclusive)</span>
|
||||
<span t-if="o.exclusive=='multiple'">Multiple Requisitions</span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-3">
|
||||
<strong>Source:</strong><br/>
|
||||
<span t-field="o.origin"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user