Debian Codegraph @

addons/stock_picking_batch/report/report_picking_batch.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <data>
4 <template id="stock_picking_batch.report_picking_batch">
5 <t t-call="web.html_container">
6 <div class="oe_structure"></div>
7 <t t-foreach="docs" t-as="o">
8 <t t-set="move_line_ids" t-value="o.picking_ids.mapped('move_line_ids')"/>
9 <t t-set="has_package" t-value="move_line_ids.filtered('result_package_id')" groups="stock.group_tracking_lot"/>
10 <t t-set="has_serial_number" t-value="move_line_ids.filtered('lot_id')" groups="stock.group_production_lot"/>
11 <t t-set="has_barcode" t-value="move_line_ids.mapped('product_id').filtered('barcode')"/>
12 <t t-set="locations" t-value="move_line_ids.mapped('location_id').sorted(lambda location: location.complete_name)"/>
13 <t t-call="web.external_layout">
14 <div class="page">
15 <div class="d-flex">
16 <div><h3>Summary: <span t-field="o.name">Batch Name</span></h3></div>
17 <div class="me-auto">
18 <span t-field="o.name" t-options="{'widget': 'barcode', 'width': 600, 'height': 150, 'img_style': 'width:300px;height:50px;'}">Batch</span>
19 </div>
20 </div>
21 <div t-if="o.user_id">
22 <strong>Responsible:</strong>
23 <span t-field="o.user_id">John Doe</span>
24 </div><br/>
25 <div class="oe_structure"></div>
26 <table class="table table-borderless">
27 <thead>
28 <tr>
29 <th>Transfer</th>
30 <th>Barcode</th>
31 <th>Status</th>
32 <th>Scheduled Date</th>
33 </tr>
34 </thead>
35 <tbody>
36 <tr t-foreach="o.picking_ids.sorted(lambda p: p.batch_sequence)" t-as="pick">
37 <td>
38 <span t-field="pick.name">Transfer Name</span>
39 </td>
40 <td>
41 <span t-field="pick.name" t-options="{'widget': 'barcode', 'quiet': 0, 'width': 400, 'height': 100, 'img_style': 'width:200px;height:50px;'}">Transfer</span>
42 </td>
43 <td>
44 <span t-field="pick.state">Gujarat</span>
45 </td>
46 <td >
47 <span t-field="pick.scheduled_date">2023-08-20</span>
48 </td>
49 </tr>
50 </tbody>
51 </table>
52 <p style="page-break-after: always;"/>
53 <div class="oe_structure"></div>
54 <h3><span t-field="o.name">Batch Name</span></h3>
55 <div t-if="o.user_id">
56 <strong>Responsible:</strong>
57 <span t-field="o.user_id">John Doe</span>
58 </div><br/>
59 <div class="oe_structure"></div>
60 <table class="table table-borderless">
61 <thead>
62 <tr>
63 <th>Product</th>
64 <th>Quantity</th>
65 <th width="20%">Transfer</th>
66 <th t-if="has_serial_number" width="15%">
67 <strong>Lot/Serial Number</strong>
68 </th>
69 <th t-if="has_barcode" width="15%" class="text-center">
70 <strong>Product Barcode</strong>
71 </th>
72 <th t-if="has_package" width="15%">
73 <strong>Package</strong>
74 </th>
75 </tr>
76 </thead>
77 <t t-foreach="locations" t-as="location_from">
78 <t t-set="loc_move_line" t-value="move_line_ids.filtered(lambda x: x.location_id==location_from)"/>
79 <t t-foreach="loc_move_line.location_dest_id" t-as="location_dest">
80 <t t-set="move_lines" t-value="loc_move_line.filtered(lambda x: x.location_dest_id==location_dest).sorted(lambda ml: ml.picking_id.batch_sequence)"/>
81 <t t-set="products" t-value="move_lines.product_id"/>
82 <tbody>
83 <tr>
84 <td style="background-color:lightgrey" colspan="6" >
85 <p style="margin:0px"><strong>FROM</strong>
86 <span t-out="move_lines.location_id.display_name">Location From Name</span></p>
87 <p style="margin:0px"><strong>TO</strong>
88 <span t-out="move_lines.location_dest_id.display_name">Location To Name</span></p>
89 </td>
90 </tr>
91 <tr t-foreach="move_lines" t-as="move_operation">
92 <td>
93 <span t-field="move_operation.display_name">Product Name</span>
94 </td>
95 <td>
96 <span t-esc="sum(move_operation.mapped('quantity'))">Quantity Done</span>
97 <span t-field="move_operation.product_uom_id" groups="uom.group_uom"/>
98 </td>
99 <td>
100 <span t-out="move_operation.picking_id.display_name">Transfer Display Name</span>
101 </td>
102 <td t-if="has_serial_number" class="text-center h6" width="15%">
103 <span t-if="move_operation.lot_id or move_operation.lot_name" t-field="move_operation.lot_id.name" t-options="{'widget': 'barcode', 'humanreadable': 1, 'width': 600, 'height': 100, 'img_style': 'width:100%;height:35px;'}">Lot Number</span>
104 </td>
105 <td width="15%" class="text-center" t-if="has_barcode">
106 <span t-field="move_operation.product_id.barcode" t-options="{'widget': 'barcode', 'symbology': 'auto', 'width': 600, 'height': 100, 'img_style': 'width:100%;height:35px;'}">Product Barcode</span>
107 </td>
108 <td t-if="has_package" width="15%">
109 <span t-field="move_operation.package_id">Package ID</span>
110 <t t-if="move_operation.result_package_id">
111 <strong>→</strong> <span t-field="move_operation.result_package_id">Result Package ID</span>
112 </t>
113 </td>
114 </tr>
115 </tbody>
116 </t>
117 </t>
118 </table>
119 </div>
120 </t>
121 </t>
122 </t>
123 </template>
124 </data>
125 </odoo>