Debian Codegraph @

addons/l10n_in_ewaybill/report/ewaybill_report.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <data>
4 <template id="report_ewaybill">
5 <t t-call="web.html_container">
6 <t t-foreach="docs" t-as="doc">
7 <t t-call="web.internal_layout">
8 <div class="page">
9 <style>
10 table {
11 width: 100%;
12 }
13 th, td {
14 padding: 5px;
15 font-size: 14px;
16 }
17 </style>
18 <t t-set="ewaybill_states" t-value="('generated', 'cancel')"/>
19 <div class="container-fluid border-bottom py-3">
20 <div class="row align-items-center">
21 <!-- Left: Logo -->
22 <div class="col">
23 <img t-if="doc.company_id.logo"
24 t-att-src="image_data_uri(doc.company_id.logo)"
25 style="max-width: 8rem; height: auto;"
26 alt="Company Logo"/>
27 </div>
28 <!-- Center: Title -->
29 <div class="col text-center">
30 <h4 id="ewaybill_header">e-Way Bill</h4>
31 </div>
32 <!-- Right: QR Code -->
33 <div class="col text-end">
34 <img t-if="doc.name and doc.state in ewaybill_states"
35 style="width: 6.25rem; height: 6.25rem;"
36 t-att-src="'/report/barcode/QR/' + str(doc.name) + '/' + str(doc.company_id.vat) + '/' + str(doc.ewaybill_date)"
37 alt="QR Code"/>
38 </div>
39 </div>
40 </div>
41
42 <br/>
43
44 <t t-set="generate_json" t-value="doc._ewaybill_generate_direct_json()"/>
45 <t t-if="doc.state in ewaybill_states">
46 <h5>E-WAY BILL Details</h5>
47 <table class="text-nowrap">
48 <tr>
49 <td>eway Bill No: <t t-out="doc.name"/></td>
50 <td>Generated Date: <t t-if="doc.ewaybill_date" t-out="doc.ewaybill_date.strftime('%d/%m/%Y')"/></td>
51 <td>Generated By: <t t-out="doc.company_id.vat"/></td>
52 <td><t t-if="doc.name != False"></t>
53 Valid Upto: <t t-if="doc.ewaybill_expiry_date" t-out="doc.ewaybill_expiry_date.strftime('%d/%m/%Y')"/>
54 <t t-if="doc.mode == '1'">
55 (Vehicle Type is <t t-out="dict(doc._fields['vehicle_type'].selection).get(doc.vehicle_type)"/>)
56 </t>
57 </td>
58 </tr>
59 <tr>
60 <td>
61 Mode:<t t-out="dict(doc._fields['mode']._description_selection(doc.env)).get(doc.mode, '')"/>
62 </td>
63 <td colspan="3">
64 Approx Distance: <t t-out="doc.distance"/> km
65 </td>
66 </tr>
67 <tr>
68 <td style="white-space: normal; word-break: break-all;">
69 Type: <t t-out="doc.supply_type"/> - <t t-out="doc.type_id.sub_type"/>
70 </td>
71 <td colspan="2">
72 Document Details:<t t-out="doc.type_id.name"/> - <t t-out="doc.document_number"/> - <t t-if="doc.document_date" t-out="doc.document_date.strftime('%d/%m/%Y')"/>
73 </td>
74 <td>Transaction Type:
75 <t t-if="generate_json['transactionType'] == 2">
76 Bill To - Ship To
77 </t>
78 <t t-elif="generate_json['transactionType'] == 3">
79 Bill From - Dispatch From
80 </t>
81 <t t-elif="generate_json['transactionType'] == 4">
82 Combination of 2 and 3
83 </t>
84 <t t-else="">
85 Regular
86 </t>
87 </td>
88 </tr>
89 </table>
90 <div class="border-bottom border-dark mt-3"/>
91 <br/>
92 </t>
93 <t t-else="">
94 <h5>Document Details</h5>
95 <table>
96 <tr>
97 <td>Document No.: <b><t t-out="doc.document_number"/></b></td>
98 <td>Generated Date: <t t-if="doc.document_date" t-out="doc.document_date.strftime('%d/%m/%Y')"/></td>
99 </tr>
100 </table>
101 <div class="border-bottom border-dark mt-3"/>
102 <br/>
103 </t>
104
105 <h5>Address Details</h5>
106 <div>
107 <table>
108 <tr>
109 <td>From</td>
110 <td/>
111 <td>To</td>
112 </tr>
113 <tr>
114 <td class="border border-dark">
115 GSTIN: <t t-out="generate_json['fromGstin']"/><br/>
116 <t t-out="doc.partner_bill_from_id.name"/><br/>
117 <t t-out="doc.partner_bill_from_id.state_id.name"/><br/>
118 <br/>
119 Dispatch From <br/><br/>
120 <span t-field="doc.partner_ship_from_id"
121 t-options='{"widget": "contact", "fields": ["address"], "no_marker": True}'
122 />
123 </td>
124 <td/>
125 <td class="border border-dark">
126 GSTIN: <t t-out="generate_json['toGstin']"/><br/>
127 <t t-out="doc.partner_bill_to_id.name"/><br/>
128 <t t-out="doc.partner_bill_to_id.state_id.name"/><br/>
129 <br/>
130 Ship To <br/><br/>
131 <span t-field="doc.partner_ship_to_id"
132 t-options='{"widget": "contact", "fields": ["address"], "no_marker": True}'/>
133 </td>
134 </tr>
135 </table>
136 </div>
137 <div class="border-bottom border-dark mt-3"/>
138 <br/>
139 <h5>Goods Details</h5>
140 <table class="border border-dark">
141 <thead>
142 <tr class="border-bottom border-dark">
143 <th>HSN Code</th>
144 <th>Product Description</th>
145 <th>Quantity</th>
146 <th>Taxable Amount Rs.</th>
147 <th>Tax Rate (C+S+I+Cess+Cess Non Advol)</th>
148 </tr>
149 </thead>
150 <tbody>
151 <t t-set="items" t-value="generate_json['itemList']"/>
152 <tr t-foreach="items" t-as="item" class="border-bottom border-dark text-center">
153 <td>
154 <t t-out="item['hsnCode']"/>
155 </td>
156 <td>
157 <t t-out="item['productDesc']"/>
158 </td>
159 <td>
160 <t t-out="item['quantity']"/> <t t-out="item['qtyUnit']"/>
161 </td>
162 <td>
163 <t t-out="item['taxableAmount']"/>
164 </td>
165 <td>
166 <t t-out="
167 ('%.2f' % item['cgstRate'] if 'cgstRate' in item else 'NE') + ' + ' +
168 ('%.2f' % item['sgstRate'] if 'sgstRate' in item else 'NE') + ' + ' +
169 ('%.2f' % item['igstRate'] if 'igstRate' in item else 'NE') + ' + ' +
170 ('%.2f' % item['cessRate'] if 'cessRate' in item else 'NE') + ' + ' +
171 (str(round(item['cessNonadvol'], 2)) if 'cessNonadvol' in item else 'NE')"/>
172 </td>
173 </tr>
174 </tbody>
175 </table>
176 <br/>
177
178 <div class="border-bottom border-dark">
179 <table>
180 <tr>
181 <td>
182 Total Taxable Amount <strong><t t-out="generate_json['totalValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
183 </td>
184 <td>
185 CGST Amount <strong><t t-out="generate_json['cgstValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
186 </td>
187 <td>
188 SGST Amount <strong><t t-out="generate_json['sgstValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
189 </td>
190 <td>
191 IGST Amount <strong><t t-out="generate_json['igstValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
192 </td>
193 <td>
194 CESS Amount <strong><t t-out="generate_json['cessValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
195 </td>
196 </tr>
197 <tr>
198 <td>
199 CESS Non.Advol Amt <strong><t t-out="generate_json['cessNonAdvolValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
200 </td>
201 <td>
202 Other Amt <strong><t t-out="generate_json['otherValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
203 </td>
204 <td>
205 Total Inv. Amt <strong><t t-out="generate_json['totInvValue']" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/></strong>
206 </td>
207 </tr>
208 </table>
209 </div>
210 <br/>
211
212 <h5>Transportation Details</h5>
213 <table class="border-bottom border-dark">
214 <tr>
215 <td>Transporter ID and Name: <t t-out="doc.transporter_id.vat"/> &amp;
216 <t t-out="doc.transporter_id.name"/>
217 </td>
218 <td>Transporter Doc and Date: <t t-out="doc.transportation_doc_no"/> &amp;
219 <t t-out="doc.transportation_doc_date"/>
220 </td>
221 </tr>
222 </table>
223 <br/>
224
225 <h5>Vehicle Details</h5>
226 <div class="border border-dark">
227 <table>
228 <thead>
229 <tr class="border-bottom border-dark">
230 <th>Mode</th>
231 <th>Vehicle / Trans <br/>Doc No &amp; Dt.</th>
232 <th>From</th>
233 <t t-if="doc.state in ewaybill_states">
234 <th>Entered Date</th>
235 <th>Entered By</th>
236 </t>
237 <t t-else=""><th>Approx Distance</th></t>
238 </tr>
239 </thead>
240 <tbody>
241 <tr class="text-center">
242 <td>
243 <t t-out="dict(doc._fields['mode']._description_selection
244 (doc.env)).get(doc.mode, '')"/>
245 </td>
246 <td>
247 <t t-if="doc.vehicle_no" t-out="doc.vehicle_no"/>
248 <t t-else="" t-out="doc.transportation_doc_no"/>
249 &amp; <t t-out="doc.transportation_doc_date"/>
250 </td>
251 <td>
252 <t t-out="generate_json['fromPlace']"/>
253 </td>
254 <t t-if="doc.state in ewaybill_states">
255 <td>
256 <t t-if="doc.ewaybill_date" t-out="doc.ewaybill_date.strftime('%d/%m/%Y')"/>
257 </td>
258 <td>
259 <t t-out="doc.company_id.vat"/>
260 </td>
261 </t>
262 <t t-else="">
263 <td>
264 <t t-out="doc.distance"/>Km
265 </td>
266 </t>
267 </tr>
268 </tbody>
269 </table>
270 </div>
271 <br/>
272
273 <div class="border-bottom border-dark text-center">
274 <t t-if="doc.state in ewaybill_states" >
275 <img t-if="doc.name != False" t-att-src="'/report/barcode/Code128/' + doc.name" style="width:250px;height:35px;" alt="Barcode"/>
276 <br/>
277 <t t-out="doc.name"/>
278 </t>
279 </div>
280 </div>
281 </t>
282 </t>
283 </t>
284 </template>
285 </data>
286 </odoo>