c94189769bc2bc896f2ad37f8b7bff67a398ca20
[odoo/odoo.git] / addons / mrp / views / report_mrporder.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4 <template id="report_mrporder">
5     <t t-call="report.html_container">
6         <t t-foreach="docs" t-as="o">
7             <t t-call="report.internal_layout">
8                 <div class="page">
9                     <div class="oe_structure"/>
10                     <h2>Production Order N° : <span t-field="o.name"/></h2>
11
12                     <div class="row mt32 mb32">
13                         <div class="col-xs-3">
14                             <strong>Source Document:</strong><br/>
15                             <span t-field="o.origin"/>
16                         </div>
17                         <div class="col-xs-3">
18                             <strong>Product:</strong><br/>
19                             <span t-field="o.product_id.code"/>
20                             <span t-field="o.product_id.name"/>
21                         </div>
22                         <div class="col-xs-3">
23                             <strong>Quantity:</strong><br/>
24                             <span t-field="o.product_qty"/>
25                             <span t-field="o.product_uom.name" groups="product.group_uom"/>
26                         </div>
27                     </div>
28
29                     <div class="row mt32 mb32">
30                         <div class="col-xs-3">
31                             <strong>Scheduled Date:</strong><br/>
32                             <span t-field="o.date_planned"/>
33                         </div>
34                         <div class="col-xs-3">
35                             <strong>Printing date:</strong><br/>
36                             <span t-esc="time.strftime('%Y-%m-%d')"/>
37                         </div>
38                         <div class="col-xs-3" t-if="'sale_ref' in o._columns.keys()">
39                             <strong>Partner Ref:</strong><br/>
40                             <span t-esc="'sale_ref' in o._columns.keys() and o.sale_ref"/>
41                         </div>
42                         <div class="col-xs-3" t-if="'sale_name' in o._columns.keys()">
43                             <strong>SO Number:</strong><br/>
44                             <span t-esc="'sale_name' in o._columns.keys() and o.sale_name"/>
45                         </div>
46                     </div>
47
48                     <div t-if="o.workcenter_lines">
49                         <strong>Work Orders</strong>
50                         <table class="table table-condensed">
51                             <tr>
52                                 <td class="text-center"><strong>Sequence</strong></td>
53                                 <td class="text-center"><strong>Name</strong></td>
54                                 <td class="text-center"><strong>WorkCenter</strong></td>
55                                 <td class="text-center"><strong>No. Of Cycles</strong></td>
56                                 <td class="text-center"><strong>No. Of Hours</strong></td>
57                             </tr>
58                             <tr t-foreach="o.workcenter_lines" t-as="line2">
59                                 <td class="text-center"><span t-field="line2.sequence"/></td>
60                                 <td class="text-center"><span t-field="line2.name"/></td>
61                                 <td class="text-center"><span t-field="line2.workcenter_id.name"/></td>
62                                 <td class="text-center"><span t-field="line2.cycle"/></td>
63                                 <td class="text-center"><span t-field="line2.hour"/></td>
64                             </tr>
65                         </table>
66                     </div>
67
68                     <h3 t-if="o.move_lines">Bill Of Material</h3>
69
70                     <table class="table table-condensed" t-if="o.move_lines or o.move_lines2">
71                         <thead>
72                             <tr>
73                                 <th><strong>Product</strong></th>
74                                 <th class="text-right"><strong>Quantity</strong></th>
75                                 <th class="text-center" groups="stock.group_locations">
76                                     <strong>Source Location</strong>
77                                 </th>
78                                 <th class="text-center" groups="stock.group_locations">
79                                     <strong>Destination Location</strong>
80                                 </th>
81                             </tr>
82                         </thead>
83                         <tbody>
84                             <t t-if="o.move_lines">
85                                 <tr>
86                                     <td colspan="4"><strong>Products to Consume</strong></td>
87                                 </tr>
88                                 <tr t-foreach="o.move_lines" t-as="line">
89                                     <td>
90                                         <span t-field="line.product_id.code"/>
91                                         <span t-field="line.product_id.name"/>
92                                     </td>
93                                     <td class="text-right">
94                                         <span t-field="line.product_uom_qty"/>
95                                         <span t-field="line.product_uom.name" groups="product.group_uom"/>
96                                     </td>
97                                     <td class="text-center" groups="stock.group_locations">
98                                         <span t-field="line.location_id.name"/>
99                                     </td>
100                                     <td class="text-center" groups="stock.group_locations">
101                                         <span t-field="line.location_dest_id.name"/>
102                                     </td>
103                                 </tr>
104                             </t>
105                             <t t-if="o.move_lines2">
106                                 <tr>
107                                     <td colspan="4"><strong>Consumed Products</strong></td>
108                                 </tr>
109                                 <tr t-foreach="o.move_lines2" t-as="line2">>
110                                     <td>
111                                         <span t-field="line2.product_id.code"/>
112                                         <span t-field="line2.product_id.name"/>
113                                     </td>
114                                     <td class="text-right">
115                                         <span t-field="line2.product_uom_qty"/>
116                                         <span t-field="line2.product_uom.name"/>
117                                     </td>
118                                     <td class="text-center" groups="stock.group_locations">
119                                         <span t-field="line2.location_id.name"/>
120                                     </td>
121                                     <td class="text-center" groups="stock.group_locations">
122                                         <span t-field="line2.location_dest_id.name"/>
123                                     </td>
124                                 </tr>
125                             </t>
126                         </tbody>
127                     </table>
128                     <div class="oe_structure"/>
129                 </div>
130             </t>
131         </t>
132     </t>
133 </template>
134 </data>
135 </openerp>