File: report_picking_batch.xml

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