Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
296
addons/laundry_management/report/laundry_thermal_report.xml
Normal file
296
addons/laundry_management/report/laundry_thermal_report.xml
Normal file
@@ -0,0 +1,296 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════
|
||||
PAPER FORMAT — Thermal 80mm
|
||||
═══════════════════════════════════════════════════════════════ -->
|
||||
<record id="paperformat_thermal_80mm" model="report.paperformat">
|
||||
<field name="name">Thermal 80mm Receipt</field>
|
||||
<field name="default">False</field>
|
||||
<field name="format">custom</field>
|
||||
<field name="page_height">0</field>
|
||||
<field name="page_width">80</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">3</field>
|
||||
<field name="margin_bottom">3</field>
|
||||
<field name="margin_left">3</field>
|
||||
<field name="margin_right">3</field>
|
||||
<field name="header_line">False</field>
|
||||
<field name="header_spacing">3</field>
|
||||
<field name="dpi">96</field>
|
||||
</record>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════
|
||||
REPORT ACTION — Thermal Receipt
|
||||
model: sale.order (extended with is_laundry_order = True)
|
||||
═══════════════════════════════════════════════════════════════ -->
|
||||
<record id="action_report_laundry_thermal_receipt" model="ir.actions.report">
|
||||
<field name="name">Thermal Receipt (80mm)</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">laundry_management.report_laundry_thermal_receipt</field>
|
||||
<field name="report_file">laundry_management.report_laundry_thermal_receipt</field>
|
||||
<field name="print_report_name">'Thermal-%s' % (object.name)</field>
|
||||
<field name="paperformat_id" ref="paperformat_thermal_80mm"/>
|
||||
</record>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════
|
||||
REPORT ACTION — Item Tracking Slip
|
||||
model: sale.order (extended with is_laundry_order = True)
|
||||
═══════════════════════════════════════════════════════════════ -->
|
||||
<record id="action_report_laundry_tracking_slip" model="ir.actions.report">
|
||||
<field name="name">Item Tracking Slips</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">laundry_management.report_laundry_tracking_slip</field>
|
||||
<field name="report_file">laundry_management.report_laundry_tracking_slip</field>
|
||||
<field name="print_report_name">'Tracking-%s' % (object.name)</field>
|
||||
<field name="paperformat_id" ref="base.paperformat_euro"/>
|
||||
</record>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════
|
||||
QWEB — Thermal 80mm Receipt Template
|
||||
═══════════════════════════════════════════════════════════════ -->
|
||||
<template id="report_laundry_thermal_receipt">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div style="font-family:monospace;font-size:11px;width:72mm;
|
||||
margin:0 auto;padding:4px;">
|
||||
|
||||
<!-- Header -->
|
||||
<div style="text-align:center;border-bottom:1px dashed #000;
|
||||
padding-bottom:6px;margin-bottom:6px;">
|
||||
<div style="font-size:14px;font-weight:bold;">
|
||||
<t t-esc="o.company_id.name"/>
|
||||
</div>
|
||||
<t t-if="o.company_id.phone">
|
||||
<div><t t-esc="o.company_id.phone"/></div>
|
||||
</t>
|
||||
<t t-if="o.company_id.street">
|
||||
<div><t t-esc="o.company_id.street"/></div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Order Info -->
|
||||
<div style="border-bottom:1px dashed #000;padding-bottom:6px;margin-bottom:6px;">
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Order:</span>
|
||||
<strong><t t-esc="o.name"/></strong>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Date:</span>
|
||||
<span>
|
||||
<t t-esc="o.intake_date or o.date_order"
|
||||
t-options='{"widget":"date"}'/>
|
||||
</span>
|
||||
</div>
|
||||
<t t-if="o.laundry_ready_date">
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Pickup by:</span>
|
||||
<strong>
|
||||
<t t-esc="o.laundry_ready_date"
|
||||
t-options='{"widget":"date"}'/>
|
||||
</strong>
|
||||
</div>
|
||||
</t>
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Customer:</span>
|
||||
<span><t t-esc="o.partner_id.name"/></span>
|
||||
</div>
|
||||
<t t-if="o.mobile">
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Tel:</span>
|
||||
<span><t t-esc="o.mobile"/></span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="o.laundry_priority and o.laundry_priority != 'normal'">
|
||||
<div style="text-align:center;font-weight:bold;
|
||||
border:1px solid #000;margin-top:4px;padding:2px;">
|
||||
*** <t t-esc="o.laundry_priority.upper()"/> ***
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Items -->
|
||||
<div style="border-bottom:1px dashed #000;padding-bottom:6px;margin-bottom:6px;">
|
||||
<t t-foreach="o.order_line" t-as="line">
|
||||
<div style="display:flex;justify-content:space-between;margin-bottom:2px;">
|
||||
<span style="flex:1;">
|
||||
<t t-esc="line_index + 1"/>.
|
||||
<t t-esc="line.product_id.name"/>
|
||||
<t t-if="line.color">
|
||||
(<t t-esc="line.color"/>)
|
||||
</t>
|
||||
<t t-if="line.is_laundry_urgent">
|
||||
[URG]
|
||||
</t>
|
||||
</span>
|
||||
<span>x<t t-esc="int(line.product_uom_qty)"/></span>
|
||||
<span style="text-align:right;min-width:30px;">
|
||||
<t t-esc="line.price_subtotal"
|
||||
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
|
||||
</span>
|
||||
</div>
|
||||
<t t-if="line.stain_note">
|
||||
<div style="color:#666;font-size:10px;padding-left:12px;">
|
||||
Note: <t t-esc="line.stain_note"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Totals -->
|
||||
<t t-set="amount_paid" t-value="o.amount_total - o.amount_due"/>
|
||||
<div style="border-bottom:1px dashed #000;padding-bottom:6px;margin-bottom:6px;">
|
||||
<div style="display:flex;justify-content:space-between;font-weight:bold;font-size:13px;">
|
||||
<span>TOTAL:</span>
|
||||
<span>
|
||||
<t t-esc="o.amount_total"
|
||||
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
|
||||
</span>
|
||||
</div>
|
||||
<t t-if="amount_paid > 0">
|
||||
<div style="display:flex;justify-content:space-between;">
|
||||
<span>Paid:</span>
|
||||
<span>
|
||||
<t t-esc="amount_paid"
|
||||
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="o.amount_due > 0">
|
||||
<div style="display:flex;justify-content:space-between;font-weight:bold;">
|
||||
<span>BALANCE:</span>
|
||||
<span>
|
||||
<t t-esc="o.amount_due"
|
||||
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div style="text-align:center;font-size:10px;">
|
||||
<t t-if="o.laundry_notes">
|
||||
<div style="margin-bottom:4px;"><t t-esc="o.laundry_notes"/></div>
|
||||
</t>
|
||||
<div>Thank you / شكراً</div>
|
||||
<t t-if="o.received_by">
|
||||
<div style="margin-top:4px;color:#666;">
|
||||
Staff: <t t-esc="o.received_by.name"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════
|
||||
QWEB — Item Tracking Slip Template
|
||||
One slip per order line — suitable for tagging items
|
||||
═══════════════════════════════════════════════════════════════ -->
|
||||
<template id="report_laundry_tracking_slip">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-foreach="o.order_line" t-as="line">
|
||||
<div style="font-family:Arial,sans-serif;
|
||||
border:2px solid #1a73e8;border-radius:6px;
|
||||
padding:12px;margin:8px;width:140mm;
|
||||
page-break-inside:avoid;">
|
||||
|
||||
<!-- Header row -->
|
||||
<div style="display:flex;justify-content:space-between;
|
||||
align-items:center;margin-bottom:8px;
|
||||
border-bottom:1px solid #1a73e8;padding-bottom:6px;">
|
||||
<div>
|
||||
<div style="font-size:18px;font-weight:bold;
|
||||
color:#1a73e8;">
|
||||
<t t-esc="o.name"/>
|
||||
</div>
|
||||
<div style="font-size:11px;color:#666;">
|
||||
Item <t t-esc="line_index + 1"/>
|
||||
of <t t-esc="len(o.order_line)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:right;">
|
||||
<t t-if="line.is_laundry_urgent">
|
||||
<div style="background:#d93025;color:white;
|
||||
padding:3px 8px;border-radius:4px;
|
||||
font-weight:bold;font-size:12px;">
|
||||
URGENT
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="o.laundry_priority and o.laundry_priority != 'normal'">
|
||||
<div style="font-size:11px;color:#666;margin-top:2px;">
|
||||
<t t-esc="o.laundry_priority.title()"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Customer + Service -->
|
||||
<div style="margin-bottom:6px;">
|
||||
<div style="font-size:13px;font-weight:bold;">
|
||||
<t t-esc="o.partner_id.name"/>
|
||||
</div>
|
||||
<t t-if="o.mobile">
|
||||
<div style="font-size:11px;color:#444;">
|
||||
<t t-esc="o.mobile"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Service details -->
|
||||
<div style="background:#f0f4ff;padding:8px;
|
||||
border-radius:4px;margin-bottom:6px;">
|
||||
<div style="font-size:15px;font-weight:bold;">
|
||||
<t t-esc="line.product_id.name"/>
|
||||
</div>
|
||||
<div style="font-size:12px;color:#555;">
|
||||
Qty: <strong><t t-esc="int(line.product_uom_qty)"/></strong>
|
||||
<t t-if="line.color">
|
||||
 |  Color: <strong><t t-esc="line.color"/></strong>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Damage / Instructions -->
|
||||
<t t-if="line.stain_note">
|
||||
<div style="color:#d93025;font-size:11px;margin-bottom:4px;">
|
||||
⚠ <t t-esc="line.stain_note"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="line.special_instructions">
|
||||
<div style="color:#444;font-size:11px;margin-bottom:4px;">
|
||||
Note: <t t-esc="line.special_instructions"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- Footer -->
|
||||
<div style="display:flex;justify-content:space-between;
|
||||
font-size:11px;color:#888;margin-top:6px;
|
||||
border-top:1px dashed #ccc;padding-top:4px;">
|
||||
<span>
|
||||
In: <t t-esc="o.intake_date or o.date_order"
|
||||
t-options='{"widget":"date"}'/>
|
||||
</span>
|
||||
<t t-if="o.laundry_ready_date">
|
||||
<span>
|
||||
Out: <strong>
|
||||
<t t-esc="o.laundry_ready_date"
|
||||
t-options='{"widget":"date"}'/>
|
||||
</strong>
|
||||
</span>
|
||||
</t>
|
||||
<span><t t-esc="o.company_id.name"/></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user