blob: 109a7804e5256e90ca1f768277bfb9cad99038e5 (
plain)
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
|
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="action_print_picking_list" model="ir.actions.report">
<field name="name">Print Picking List</field>
<field name="model">stock.picking</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">fixco_custom.report_picking_list_custom</field>
<field name="report_file">fixco_custom.report_picking_list_custom</field>
<field name="print_report_name">'Print Picking List - %s - %s' % (object.partner_id.name or '', object.name)</field>
<field name="binding_model_id" ref="model_stock_picking"/>
<field name="binding_type">report</field>
</record>
</data>
<template id="report_picking_list_custom">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page" style="font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto;">
<!-- Barcode Header -->
<div style="text-align: right; margin-bottom: -90px;">
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.invoice_mp, 100, 100)"
style="width:100px;height:100px;" alt="QR Code"/>
</div>
<!-- Main Header -->
<div style="text-align: center; margin-bottom: 15px;">
<h1 style="margin: 0; font-size: 24px; font-weight: bold;" t-field="o.name"/>
<div style="font-size: 18px; font-weight: bold; margin-top: 5px;">
Web Service
</div>
</div>
<!-- Order Information -->
<div style="display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid #000; padding-bottom: 10px;">
<div>
<strong>Order:</strong>
<span t-field="o.origin"/>
</div>
<div>
<strong>Scheduled Date:</strong>
<span t-field="o.scheduled_date" t-options='{"format": "dd MMM yyyy HH:mm:ss"}'/>
</div>
<div>
<strong>Carrier:</strong>
<span t-field="o.carrier"/>
</div>
</div>
<!-- Product Table -->
<table style="width: 100%; border-collapse: collapse; margin-bottom: 30px;">
<thead>
<tr style="border-bottom: 2px solid #000;">
<th style="width: 5%; text-align: left; padding: 8px 5px;">No</th>
<th style="width: 40%; text-align: left; padding: 8px 5px;">Nama Product</th>
<th style="width: 10%; text-align: center; padding: 8px 5px;">Demand</th>
<th style="width: 10%; text-align: center; padding: 8px 5px;">Reserved</th>
<th style="width: 20%; text-align: left; padding: 8px 5px;">Location</th>
<th style="width: 15%; text-align: left; padding: 8px 5px;">Uom</th>
</tr>
</thead>
<tbody>
<t t-set="counter" t-value="0"/>
<t t-foreach="o.move_ids_without_package" t-as="move">
<t t-set="counter" t-value="counter + 1"/>
<tr style="border-bottom: 1px solid #ddd;">
<td style="padding: 8px 5px; vertical-align: top;"><t t-esc="counter"/></td>
<td style="padding: 8px 5px; vertical-align: top;">
<div style="font-weight: bold;">
[<span t-field="move.product_id.default_code"/>]
</div>
<div style="margin-top: 3px;">
<span t-field="move.product_id.name"/>
</div>
</td>
<td style="text-align: center; padding: 8px 5px; vertical-align: top;">
<t t-esc="move.product_uom_qty if move.product_uom_qty else 0"/>
</td>
<td style="text-align: center; padding: 8px 5px; vertical-align: top;">
<t t-esc="move.reserved_availability if move.reserved_availability > 0 else 0"/>
</td>
<td style="padding: 8px 5px; vertical-align: top;">
<span t-field="move.location_id.name"/>
</td>
<td style="padding: 8px 5px; vertical-align: top;">
<span t-field="move.product_uom.name"/>
</td>
</tr>
</t>
</tbody>
</table>
<!-- Footer Information -->
<div style="display: flex; justify-content: space-between; border-top: 1px solid #000; padding-top: 15px;">
<div style="font-weight: bold;">
Total Qty:
<t t-set="total_qty" t-value="0"/>
<t t-foreach="o.move_ids_without_package" t-as="move">
<t t-set="total_qty" t-value="total_qty + (move.product_uom_qty or 0)"/>
</t>
<t t-esc="total_qty"/>
</div>
<div style="font-weight: bold;">
Jumlah Barang:
<t t-esc="counter"/>
</div>
</div>
<!-- Notes Section -->
<div t-if="o.note" style="margin-top: 30px; padding: 10px; border: 1px solid #ddd; background-color: #f9f9f9;">
<strong>Catatan:</strong>
<p t-field="o.note"/>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>
|