mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 18:29:08 +02:00
laundary mgt
This commit is contained in:
@@ -17,6 +17,8 @@ This module contains all the common features of Laundary Management.
|
|||||||
'views/sale_views.xml',
|
'views/sale_views.xml',
|
||||||
'views/project_task_view.xml',
|
'views/project_task_view.xml',
|
||||||
'views/crm_lead_view.xml',
|
'views/crm_lead_view.xml',
|
||||||
|
'report/barcode_report.xml',
|
||||||
|
'report/menu.xml'
|
||||||
],
|
],
|
||||||
'demo': [
|
'demo': [
|
||||||
],
|
],
|
||||||
|
|||||||
52
laundary_mgt/report/barcode_report.xml
Normal file
52
laundary_mgt/report/barcode_report.xml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<template id="report_simple_trackcode">
|
||||||
|
<center> <h2>
|
||||||
|
Tracking Code with Barcode</h2></center>
|
||||||
|
<div style="width: 32%; display: inline-table; height: 10rem;">
|
||||||
|
|
||||||
|
<table class="table table-bordered mb-0" style="border: 2px solid black;">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th class="table-active text-center" style="height: 4rem;">
|
||||||
|
<strong t-field="rec.name"/><br/>
|
||||||
|
<strong>Customer</strong>:<span t-field="rec.partner_id"/>
|
||||||
|
</th>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<t t-foreach="rec.order_line" t-as="line">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<!-- <td><span t-field="rec.partner_id"/></td> -->
|
||||||
|
<td class="text-center align-middle" style="height: 6rem;">
|
||||||
|
<t t-if="line.tracking_code">
|
||||||
|
<img alt="Barcode" t-if="len(line.tracking_code) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', quote_plus(product.barcode or ''), 600, 150)" style="width:100%;height:4rem;"/>
|
||||||
|
<img alt="Barcode" t-elif="len(line.tracking_code) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', quote_plus(line.tracking_code or ''), 600, 150)" style="width:100%;height:4rem;"/>
|
||||||
|
<img alt="Barcode" t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', quote_plus(line.tracking_code or ''), 600, 150)" style="width:100%;height:4rem"/>
|
||||||
|
<span t-field="line.tracking_code"/>
|
||||||
|
</t>
|
||||||
|
<t t-else=""><span class="text-muted">No barcode available</span></t>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</t>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="report_trackcode">
|
||||||
|
<t t-call="web.basic_layout">
|
||||||
|
<div class="page">
|
||||||
|
<t t-foreach="docs" t-as="rec">
|
||||||
|
<t t-call="laundary_mgt.report_simple_trackcode">
|
||||||
|
<t t-set="rec" t-value="rec"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
14
laundary_mgt/report/menu.xml
Normal file
14
laundary_mgt/report/menu.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<report
|
||||||
|
id="action_report_sale_order_trackcode"
|
||||||
|
string="Cloth Barcode Report"
|
||||||
|
model="sale.order"
|
||||||
|
report_type="qweb-pdf"
|
||||||
|
file="laundary_mgt.report_trackcode"
|
||||||
|
name="laundary_mgt.report_trackcode"
|
||||||
|
print_report_name="'Barcode - %s' % (object.name)"
|
||||||
|
/>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user