Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
228
addons/laundry_management/report/laundry_work_order_report.xml
Normal file
228
addons/laundry_management/report/laundry_work_order_report.xml
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- ═══════════════════════════════════════════════════════════════
|
||||||
|
REPORT ACTION — Laundry Work Order (laundry.order, A4)
|
||||||
|
Bound to laundry.order so users see it under the Print menu of
|
||||||
|
the form view AND it can be triggered from a header button.
|
||||||
|
═══════════════════════════════════════════════════════════════ -->
|
||||||
|
<record id="action_report_laundry_work_order" model="ir.actions.report">
|
||||||
|
<field name="name">Laundry Work Order</field>
|
||||||
|
<field name="model">laundry.order</field>
|
||||||
|
<field name="report_type">qweb-pdf</field>
|
||||||
|
<field name="report_name">laundry_management.report_laundry_work_order</field>
|
||||||
|
<field name="report_file">laundry_management.report_laundry_work_order</field>
|
||||||
|
<field name="print_report_name">'WO-%s' % (object.name or '').replace('/', '-')</field>
|
||||||
|
<field name="binding_model_id" ref="model_laundry_order"/>
|
||||||
|
<field name="binding_type">report</field>
|
||||||
|
<field name="paperformat_id" ref="base.paperformat_euro"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<template id="report_laundry_work_order">
|
||||||
|
<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; color:#1f2937;">
|
||||||
|
|
||||||
|
<!-- ── Header ───────────────────────────────────── -->
|
||||||
|
<div class="row mb-3 border-bottom pb-2">
|
||||||
|
<div class="col-7">
|
||||||
|
<h2 class="mb-0" style="color:#1d4ed8; letter-spacing:0.02em;">
|
||||||
|
Laundry Work Order
|
||||||
|
</h2>
|
||||||
|
<div class="text-muted" style="font-size:0.85em;">
|
||||||
|
Operational copy — staff use only
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-5 text-end" dir="rtl">
|
||||||
|
<h2 class="mb-0" style="color:#1d4ed8;">أمر عمل المغسلة</h2>
|
||||||
|
<div class="text-muted" style="font-size:0.85em;">
|
||||||
|
نسخة العمليات — لاستخدام الموظفين
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ── Order Meta + Status badges ───────────────── -->
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-7">
|
||||||
|
<table class="table table-sm table-borderless mb-0">
|
||||||
|
<tr>
|
||||||
|
<td style="width:35%;color:#6b7280;">Order No.</td>
|
||||||
|
<td><strong style="font-size:1.05em;"><t t-esc="o.name"/></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#6b7280;">Intake</td>
|
||||||
|
<td>
|
||||||
|
<t t-esc="o.create_date"
|
||||||
|
t-options='{"widget":"datetime"}'/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<t t-if="o.delivery_scheduled_at">
|
||||||
|
<tr>
|
||||||
|
<td style="color:#6b7280;">Scheduled</td>
|
||||||
|
<td>
|
||||||
|
<strong>
|
||||||
|
<t t-esc="o.delivery_scheduled_at"
|
||||||
|
t-options='{"widget":"datetime"}'/>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</t>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#6b7280;">POS Ref</td>
|
||||||
|
<td><t t-esc="o.pos_reference or ''"/></td>
|
||||||
|
</tr>
|
||||||
|
<t t-if="o.order_type_id">
|
||||||
|
<tr>
|
||||||
|
<td style="color:#6b7280;">Type</td>
|
||||||
|
<td><t t-esc="o.order_type_id.name"/></td>
|
||||||
|
</tr>
|
||||||
|
</t>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="col-5 text-end">
|
||||||
|
<div style="display:inline-block; text-align:left;">
|
||||||
|
<span t-attf-style="display:inline-block;padding:6px 14px;border-radius:999px;
|
||||||
|
background:#{o.priority_level == 'urgent' and '#fee2e2' or '#e5e7eb'};
|
||||||
|
color:#{o.priority_level == 'urgent' and '#b91c1c' or '#374151'};
|
||||||
|
font-weight:700;letter-spacing:0.04em;">
|
||||||
|
<t t-if="o.priority_level == 'urgent'">⚡ URGENT</t>
|
||||||
|
<t t-else="">NORMAL</t>
|
||||||
|
</span>
|
||||||
|
<t t-if="o.is_delivery">
|
||||||
|
<span style="display:inline-block;margin-top:6px;padding:6px 14px;
|
||||||
|
border-radius:999px;background:#ede9fe;color:#5b21b6;
|
||||||
|
font-weight:700;">
|
||||||
|
🚚 DELIVERY
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
|
<span t-attf-style="display:block;margin-top:6px;padding:4px 10px;
|
||||||
|
border-radius:6px;background:#dbeafe;color:#1e3a8a;
|
||||||
|
font-weight:600;font-size:0.85em;text-align:center;">
|
||||||
|
Status: <t t-esc="dict(o._fields['state'].selection).get(o.state)"/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ── Customer Block ───────────────────────────── -->
|
||||||
|
<div class="row mb-3" style="background:#f9fafb;border-left:3px solid #1d4ed8;
|
||||||
|
border-radius:4px;padding:10px;">
|
||||||
|
<div class="col-7">
|
||||||
|
<div style="color:#6b7280;font-size:0.78em;text-transform:uppercase;
|
||||||
|
letter-spacing:0.06em;">Customer</div>
|
||||||
|
<strong style="font-size:1.15em;"><t t-esc="o.partner_id.name"/></strong>
|
||||||
|
<t t-if="o.partner_phone">
|
||||||
|
<div><i class="fa fa-phone me-1"/><t t-esc="o.partner_phone"/></div>
|
||||||
|
</t>
|
||||||
|
<t t-if="o.is_delivery and o.delivery_address">
|
||||||
|
<div style="margin-top:6px;font-size:0.9em;">
|
||||||
|
<i class="fa fa-map-marker me-1"/>
|
||||||
|
<t t-esc="o.delivery_address"/>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
<div class="col-5 text-end" dir="rtl">
|
||||||
|
<div style="color:#6b7280;font-size:0.78em;">العميل</div>
|
||||||
|
<strong style="font-size:1.1em;"><t t-esc="o.partner_id.name"/></strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ── Attributes (chips) ───────────────────────── -->
|
||||||
|
<t t-if="o.attribute_ids">
|
||||||
|
<div class="mb-3">
|
||||||
|
<span style="color:#6b7280;font-size:0.78em;text-transform:uppercase;
|
||||||
|
letter-spacing:0.06em;margin-right:8px;">Attributes:</span>
|
||||||
|
<t t-foreach="o.attribute_ids" t-as="attr">
|
||||||
|
<span style="display:inline-block;padding:3px 9px;border-radius:999px;
|
||||||
|
background:#eef2ff;color:#3730a3;font-size:0.85em;
|
||||||
|
margin-right:4px;font-weight:600;">
|
||||||
|
<t t-esc="attr.name"/>
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<!-- ── Items Table (with tracking codes) ────────── -->
|
||||||
|
<h6 style="color:#1d4ed8;border-bottom:2px solid #1d4ed8;
|
||||||
|
padding-bottom:4px;letter-spacing:0.02em;">
|
||||||
|
ITEMS / العناصر
|
||||||
|
</h6>
|
||||||
|
<table class="table table-sm table-bordered" style="font-size:0.9em;">
|
||||||
|
<thead style="background:#1d4ed8;color:#fff;">
|
||||||
|
<tr>
|
||||||
|
<th style="width:6%;">#</th>
|
||||||
|
<th style="width:22%;">Tracking</th>
|
||||||
|
<th>Service / الخدمة</th>
|
||||||
|
<th class="text-end" style="width:7%;">Qty</th>
|
||||||
|
<th>Note</th>
|
||||||
|
<th style="width:14%;">Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<t t-if="o.line_ids">
|
||||||
|
<t t-foreach="o.line_ids" t-as="line">
|
||||||
|
<tr>
|
||||||
|
<td><t t-esc="line_index + 1"/></td>
|
||||||
|
<td style="font-family:monospace;font-weight:bold;">
|
||||||
|
<t t-esc="line.tracking_code or ''"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<t t-esc="line.product_id.display_name if line.product_id else (line.description or '')"/>
|
||||||
|
</td>
|
||||||
|
<td class="text-end"><t t-esc="int(line.qty)"/></td>
|
||||||
|
<td><t t-esc="line.customer_note or ''"/></td>
|
||||||
|
<td>
|
||||||
|
<span t-attf-style="padding:2px 8px;border-radius:4px;
|
||||||
|
background:#{line.state == 'delivered' and '#d1fae5' or
|
||||||
|
line.state == 'ready' and '#dbeafe' or
|
||||||
|
line.state == 'processing' and '#fef3c7' or '#e5e7eb'};
|
||||||
|
color:#{line.state == 'delivered' and '#065f46' or
|
||||||
|
line.state == 'ready' and '#1e40af' or
|
||||||
|
line.state == 'processing' and '#92400e' or '#374151'};
|
||||||
|
font-weight:600;font-size:0.82em;">
|
||||||
|
<t t-esc="dict(line._fields['state'].selection).get(line.state)"/>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" class="text-center text-muted">No items.</td>
|
||||||
|
</tr>
|
||||||
|
</t>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- ── Notes ────────────────────────────────────── -->
|
||||||
|
<t t-if="o.notes">
|
||||||
|
<div class="mt-2 p-2"
|
||||||
|
style="border-left:3px solid #f59e0b;background:#fffbeb;font-size:0.9em;">
|
||||||
|
<strong>Notes:</strong> <t t-esc="o.notes"/>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
<!-- ── Footer signatures ────────────────────────── -->
|
||||||
|
<div class="row mt-4 pt-3" style="border-top:1px dashed #d1d5db;">
|
||||||
|
<div class="col-6">
|
||||||
|
<div style="color:#6b7280;font-size:0.78em;text-transform:uppercase;">
|
||||||
|
Received by
|
||||||
|
</div>
|
||||||
|
<div style="border-bottom:1px solid #9ca3af;height:32px;"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div style="color:#6b7280;font-size:0.78em;text-transform:uppercase;">
|
||||||
|
Customer signature
|
||||||
|
</div>
|
||||||
|
<div style="border-bottom:1px solid #9ca3af;height:32px;"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user