Tower: unpublish laundry_management — remove source from 19.0 branch

This commit is contained in:
2026-05-02 11:15:37 +00:00
parent 22162f9d47
commit 26ae0e14df
230 changed files with 0 additions and 17001 deletions

View File

@@ -1,333 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ═══════════════════════════════════════════════════════════════
REPORT ACTION — Order Receipt
model: sale.order (extended with is_laundry_order = True)
═══════════════════════════════════════════════════════════════ -->
<record id="action_report_laundry_order_receipt" model="ir.actions.report">
<field name="name">Laundry Receipt / إيصال المغسلة</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">laundry_management.report_laundry_order_receipt</field>
<field name="report_file">laundry_management.report_laundry_order_receipt</field>
<field name="print_report_name">'Receipt-%s' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order"/>
<field name="binding_type">report</field>
<field name="paperformat_id" ref="base.paperformat_euro"/>
</record>
<!-- ═══════════════════════════════════════════════════════════════
QWEB TEMPLATE — Bilingual Customer Receipt
Field mapping (laundry.order → sale.order):
customer_id → partner_id
order_date → date_order / intake_date
delivery_date → laundry_ready_date
order_line_ids → order_line
total_amount → amount_total
amount_paid → amount_total - amount_due (computed inline)
payment_status → laundry_payment_status
priority → laundry_priority
notes → laundry_notes
line.quantity → line.product_uom_qty
line.unit_price → line.price_unit
line.subtotal → line.price_subtotal
line.is_urgent → line.is_laundry_urgent
═══════════════════════════════════════════════════════════════ -->
<template id="report_laundry_order_receipt">
<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;">
<!-- ── Bilingual Header ── -->
<div class="row mb-3 border-bottom pb-3">
<div class="col-6">
<h3 class="mb-0" style="color:#1a73e8;">
Laundry Order Receipt
</h3>
<p class="text-muted mb-0" style="font-size:0.85em;">
Customer Copy — Please retain for collection
</p>
</div>
<div class="col-6 text-end" dir="rtl">
<h3 class="mb-0" style="color:#1a73e8;">
إيصال طلب المغسلة
</h3>
<p class="text-muted mb-0" style="font-size:0.85em;">
نسخة العميل — يرجى الاحتفاظ به للاستلام
</p>
</div>
</div>
<!-- ── Order Meta (bilingual columns) ── -->
<div class="row mb-3">
<div class="col-6">
<table class="table table-sm table-borderless mb-0">
<tr>
<td style="width:45%;color:#666;">Order No.</td>
<td><strong><t t-esc="o.name"/></strong></td>
</tr>
<tr>
<td style="color:#666;">Date</td>
<td>
<t t-esc="o.intake_date or o.date_order"
t-options='{"widget":"date"}'/>
</td>
</tr>
<t t-if="o.laundry_ready_date">
<tr>
<td style="color:#666;">Expected Ready</td>
<td>
<strong>
<t t-esc="o.laundry_ready_date"
t-options='{"widget":"date"}'/>
</strong>
</td>
</tr>
</t>
<tr>
<td style="color:#666;">Order Type</td>
<td>
<t t-esc="dict(o._fields['delivery_type'].selection).get(o.delivery_type, o.delivery_type)"/>
</td>
</tr>
<t t-if="o.laundry_priority and o.laundry_priority != 'normal'">
<tr>
<td style="color:#666;">Priority</td>
<td>
<span style="color:#d93025;font-weight:bold;">
<t t-esc="dict(o._fields['laundry_priority'].selection).get(o.laundry_priority)"/>
</span>
</td>
</tr>
</t>
<t t-if="o.session_id">
<tr>
<td style="color:#666;">Session</td>
<td><t t-esc="o.session_id.name"/></td>
</tr>
</t>
</table>
</div>
<div class="col-6" dir="rtl">
<table class="table table-sm table-borderless mb-0">
<tr>
<td style="width:45%;color:#666;">رقم الطلب</td>
<td><strong><t t-esc="o.name"/></strong></td>
</tr>
<tr>
<td style="color:#666;">تاريخ الطلب</td>
<td>
<t t-esc="o.intake_date or o.date_order"
t-options='{"widget":"date"}'/>
</td>
</tr>
<t t-if="o.laundry_ready_date">
<tr>
<td style="color:#666;">موعد الجاهزية</td>
<td>
<strong>
<t t-esc="o.laundry_ready_date"
t-options='{"widget":"date"}'/>
</strong>
</td>
</tr>
</t>
<tr>
<td style="color:#666;">نوع الطلب</td>
<td>
<t t-if="o.delivery_type == 'dropoff'">مراجعة مباشرة</t>
<t t-if="o.delivery_type == 'pickup'">استلام من المنزل</t>
<t t-if="o.delivery_type == 'delivery'">توصيل للمنزل</t>
</td>
</tr>
</table>
</div>
</div>
<!-- ── Customer Block ── -->
<div class="row mb-3"
style="background:#f8f9fa;border-radius:6px;padding:10px;">
<div class="col-6">
<div style="color:#666;font-size:0.8em;text-transform:uppercase;">Customer</div>
<strong style="font-size:1.1em;">
<t t-esc="o.partner_id.name"/>
</strong>
<t t-if="o.mobile">
<div><t t-esc="o.mobile"/></div>
</t>
<t t-elif="o.partner_id.phone">
<div><t t-esc="o.partner_id.phone"/></div>
</t>
</div>
<div class="col-6 text-end" dir="rtl">
<div style="color:#666;font-size:0.8em;">العميل</div>
<strong style="font-size:1.1em;">
<t t-esc="o.partner_id.name"/>
</strong>
<t t-if="o.mobile">
<div><t t-esc="o.mobile"/></div>
</t>
</div>
</div>
<!-- ── Items Table ── -->
<h6 style="color:#1a73e8;border-bottom:2px solid #1a73e8;padding-bottom:4px;">
Services / الخدمات
</h6>
<table class="table table-sm table-bordered"
style="font-size:0.9em;">
<thead style="background:#1a73e8;color:white;">
<tr>
<th style="width:4%">#</th>
<th>Service / الخدمة</th>
<th>Color / اللون</th>
<th>Notes / ملاحظات</th>
<th class="text-end" style="width:6%">Qty</th>
<th class="text-end" style="width:10%">Price</th>
<th class="text-end" style="width:11%">Subtotal</th>
</tr>
</thead>
<tbody>
<t t-if="o.order_line">
<t t-foreach="o.order_line" t-as="line">
<tr t-attf-style="#{line.is_laundry_urgent and 'background:#fff3cd;' or ''}">
<td><t t-esc="line_index + 1"/></td>
<td>
<t t-esc="line.product_id.name if line.product_id else ''"/>
<t t-if="line.is_laundry_urgent">
<span style="color:#d93025;font-size:0.75em;font-weight:bold;"> &#9889;URGENT</span>
</t>
</td>
<td><t t-esc="line.color or ''"/></td>
<td>
<t t-if="line.stain_note">
<span style="color:#d93025;">
<t t-esc="line.stain_note"/>
</span>
</t>
<t t-elif="line.special_instructions">
<t t-esc="line.special_instructions"/>
</t>
</td>
<td class="text-end"><t t-esc="int(line.product_uom_qty)"/></td>
<td class="text-end">
<t t-esc="line.price_unit"
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
</td>
<td class="text-end">
<t t-esc="line.price_subtotal"
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
</td>
</tr>
</t>
</t>
<t t-else="">
<tr>
<td colspan="7" class="text-center text-muted">
No items on this order.
</td>
</tr>
</t>
</tbody>
<tfoot>
<tr style="background:#f0f4ff;">
<td colspan="6" class="text-end">
<strong>Total / الإجمالي</strong>
</td>
<td class="text-end">
<strong style="font-size:1.1em;">
<t t-esc="o.amount_total"
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
</strong>
</td>
</tr>
<t t-set="amount_paid" t-value="o.amount_total - o.amount_due"/>
<t t-if="amount_paid > 0">
<tr>
<td colspan="6" class="text-end text-success">
Paid / المدفوع
</td>
<td class="text-end text-success">
<t t-esc="amount_paid"
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
</td>
</tr>
</t>
<t t-if="o.amount_due > 0">
<tr style="background:#f8d7da;">
<td colspan="6" class="text-end text-danger fw-bold">
Balance Due / المبلغ المتبقي
</td>
<td class="text-end text-danger fw-bold">
<t t-esc="o.amount_due"
t-options='{"widget":"monetary","display_currency":o.company_id.currency_id}'/>
</td>
</tr>
</t>
</tfoot>
</table>
<!-- ── Customer Notes ── -->
<t t-if="o.laundry_notes">
<div class="mt-3 p-2"
style="border-left:3px solid #1a73e8;background:#f8f9fa;">
<strong>Notes / ملاحظات:</strong>
<span>&#160;<t t-esc="o.laundry_notes"/></span>
</div>
</t>
<!-- ── Status + Payment ── -->
<div class="row mt-3">
<div class="col-6">
<strong>Processing:</strong>
<span t-attf-style="margin-left:6px;padding:2px 8px;border-radius:4px;
background:#{o.laundry_state == 'delivered' and '#d4edda' or
o.laundry_state in ('processing','ready') and '#fff3cd' or '#cfe2ff'};
color:#{o.laundry_state == 'delivered' and '#155724' or
o.laundry_state in ('processing','ready') and '#856404' or '#084298'};">
<t t-esc="dict(o._fields['laundry_state'].selection).get(o.laundry_state, o.laundry_state)"/>
</span>
</div>
<div class="col-6 text-end">
<strong>Payment / الدفع:</strong>
<span t-attf-style="margin-left:6px;padding:2px 8px;border-radius:4px;
background:#{o.laundry_payment_status == 'paid' and '#d4edda' or
o.laundry_payment_status == 'partial' and '#fff3cd' or '#f8d7da'};
color:#{o.laundry_payment_status == 'paid' and '#155724' or
o.laundry_payment_status == 'partial' and '#856404' or '#721c24'};">
<t t-esc="dict(o._fields['laundry_payment_status'].selection).get(o.laundry_payment_status)"/>
</span>
</div>
</div>
<!-- ── Staff Attribution ── -->
<t t-if="o.received_by">
<div class="text-muted mt-2" style="font-size:0.8em;">
Received by: <t t-esc="o.received_by.name"/>
<t t-if="o.delivered_by">
&#160;|&#160;
Handed over by: <t t-esc="o.delivered_by.name"/>
</t>
</div>
</t>
<!-- ── Footer ── -->
<div class="text-center mt-4 pt-3 border-top"
style="color:#666;font-size:0.8em;">
<p class="mb-1">
Thank you for choosing our laundry services.
</p>
<p class="mb-0" dir="rtl">
شكراً لاختياركم خدمات مغسلتنا — نتطلع لخدمتكم دائماً
</p>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

View File

@@ -1,291 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ═══════════════════════════════════════════════════════════════
REPORT ACTION — Session Summary
═══════════════════════════════════════════════════════════════ -->
<record id="action_report_laundry_session" model="ir.actions.report">
<field name="name">Session Summary / تقرير الجلسة</field>
<field name="model">laundry.session</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">laundry_management.report_laundry_session</field>
<field name="report_file">laundry_management.report_laundry_session</field>
<field name="print_report_name">'Session-%s' % (object.name)</field>
<field name="binding_model_id" ref="model_laundry_session"/>
<field name="binding_type">report</field>
<field name="paperformat_id" ref="base.paperformat_euro"/>
</record>
<!-- ═══════════════════════════════════════════════════════════════
QWEB TEMPLATE — Session Summary Report
═══════════════════════════════════════════════════════════════ -->
<template id="report_laundry_session">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="s">
<t t-call="web.external_layout">
<div class="page" style="font-family: Arial, sans-serif;">
<!-- ── Header ── -->
<div class="row mb-4 border-bottom pb-3">
<div class="col-7">
<h3 style="color:#1a73e8;">Session Summary Report</h3>
<h4 style="color:#444;"><t t-esc="s.name"/></h4>
</div>
<div class="col-5 text-end" dir="rtl">
<h3 style="color:#1a73e8;">تقرير ملخص الجلسة</h3>
<h4 style="color:#444;"><t t-esc="s.name"/></h4>
</div>
</div>
<!-- ── Session Info ── -->
<div class="row mb-3">
<div class="col-6">
<table class="table table-sm table-borderless">
<tr>
<td style="color:#666;width:40%">Opened By</td>
<td><strong><t t-esc="s.user_id.name"/></strong></td>
</tr>
<tr>
<td style="color:#666;">Opened At</td>
<td>
<t t-esc="s.opening_datetime"
t-options='{"widget":"datetime"}'/>
</td>
</tr>
<t t-if="s.closing_datetime">
<tr>
<td style="color:#666;">Closed At</td>
<td>
<t t-esc="s.closing_datetime"
t-options='{"widget":"datetime"}'/>
</td>
</tr>
</t>
<tr>
<td style="color:#666;">Status</td>
<td>
<span t-attf-style="padding:2px 8px;border-radius:4px;
background:#{s.state == 'closed' and '#d4edda' or '#fff3cd'};
color:#{s.state == 'closed' and '#155724' or '#856404'};">
<t t-esc="dict(s._fields['state'].selection).get(s.state)"/>
</span>
</td>
</tr>
<tr>
<td style="color:#666;">Orders Processed</td>
<td><strong><t t-esc="s.order_count"/></strong></td>
</tr>
</table>
</div>
<div class="col-6">
<!-- Cash Control Summary -->
<div style="background:#f8f9fa;border-radius:6px;padding:12px;">
<h6 style="color:#1a73e8;margin-bottom:8px;">
Cash Control / ضبط الصندوق
</h6>
<table class="table table-sm table-borderless mb-0">
<tr>
<td style="color:#666;">Opening Float</td>
<td class="text-end">
<t t-esc="s.opening_cash"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr>
<td style="color:#666;">+ Cash Received</td>
<td class="text-end">
<t t-esc="s.total_cash"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr style="border-top:1px solid #dee2e6;">
<td><strong>Expected Cash</strong></td>
<td class="text-end fw-bold">
<t t-esc="s.expected_closing_cash"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<t t-if="s.state == 'closed'">
<tr>
<td style="color:#666;">Actual Cash Count</td>
<td class="text-end">
<t t-esc="s.actual_closing_cash"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr t-attf-style="background:#{s.cash_difference &lt; 0 and '#f8d7da' or '#d4edda'};">
<td t-attf-style="color:#{s.cash_difference &lt; 0 and '#721c24' or '#155724'};">
<strong>Difference</strong>
</td>
<td class="text-end fw-bold"
t-attf-style="color:#{s.cash_difference &lt; 0 and '#721c24' or '#155724'};">
<t t-esc="s.cash_difference"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
</t>
</table>
</div>
</div>
</div>
<!-- ── Payment Breakdown ── -->
<h6 style="color:#1a73e8;border-bottom:2px solid #1a73e8;padding-bottom:4px;">
Sales &amp; Payment Summary / ملخص المبيعات والمدفوعات
</h6>
<div class="row mb-4">
<div class="col-6">
<table class="table table-bordered table-sm">
<thead style="background:#1a73e8;color:white;">
<tr>
<th>Payment Method</th>
<th class="text-end">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cash</td>
<td class="text-end">
<t t-esc="s.total_cash"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr>
<td>Bank / Card</td>
<td class="text-end">
<t t-esc="s.total_bank"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr>
<td>Credit / Deferred</td>
<td class="text-end">
<t t-esc="s.total_credit"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr style="background:#f0f4ff;font-weight:bold;">
<td>Total Collected</td>
<td class="text-end">
<t t-esc="s.total_paid"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-6">
<table class="table table-bordered table-sm">
<thead style="background:#1a73e8;color:white;">
<tr>
<th>Summary</th>
<th class="text-end">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total Sales (Invoiced)</td>
<td class="text-end fw-bold">
<t t-esc="s.total_sales"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr>
<td>Total Collected</td>
<td class="text-end text-success">
<t t-esc="s.total_paid"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
<tr t-attf-style="background:#{s.outstanding_amount &gt; 0 and '#f8d7da' or '#d4edda'};">
<td>Outstanding (Unpaid)</td>
<td class="text-end"
t-attf-style="color:#{s.outstanding_amount &gt; 0 and '#721c24' or '#155724'};">
<t t-esc="s.outstanding_amount"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- ── Order Listing ── -->
<h6 style="color:#1a73e8;border-bottom:2px solid #1a73e8;padding-bottom:4px;">
Orders / الطلبات
</h6>
<table class="table table-sm table-bordered" style="font-size:0.85em;">
<thead style="background:#e8f0fe;">
<tr>
<th>Order No.</th>
<th>Customer</th>
<th>Items</th>
<th>Status</th>
<th class="text-end">Total</th>
<th class="text-end">Paid</th>
<th>Payment</th>
</tr>
</thead>
<tbody>
<t t-foreach="s.order_ids.filtered(lambda o: o.state != 'cancel')" t-as="order">
<tr>
<td><strong><t t-esc="order.name"/></strong></td>
<td><t t-esc="order.partner_id.name"/></td>
<td class="text-center"><t t-esc="order.item_count"/></td>
<td>
<t t-esc="dict(order._fields['laundry_state'].selection).get(order.laundry_state, order.laundry_state)"/>
</td>
<td class="text-end">
<t t-esc="order.amount_total"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
<td class="text-end">
<t t-set="ord_paid" t-value="order.amount_total - order.amount_due"/>
<t t-esc="ord_paid"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
<td>
<t t-esc="dict(order._fields['laundry_payment_status'].selection).get(order.laundry_payment_status)"/>
</td>
</tr>
</t>
</tbody>
<tfoot style="background:#f0f4ff;font-weight:bold;">
<tr>
<td colspan="4">TOTAL / الإجمالي</td>
<td class="text-end">
<t t-esc="s.total_sales"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
<td class="text-end">
<t t-esc="s.total_paid"
t-options='{"widget":"monetary","display_currency":s.company_id.currency_id}'/>
</td>
<td></td>
</tr>
</tfoot>
</table>
<!-- ── Notes ── -->
<t t-if="s.notes">
<div class="mt-3 p-2"
style="border-left:3px solid #1a73e8;background:#f8f9fa;">
<strong>Notes / ملاحظات:</strong>
<span>&#160;<t t-esc="s.notes"/></span>
</div>
</t>
<!-- ── Footer ── -->
<div class="text-center mt-4 pt-3 border-top"
style="color:#888;font-size:0.75em;">
Generated by Laundry Management System &#160;|&#160;
<t t-esc="s.company_id.name"/>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

View File

@@ -1,296 +0,0 @@
<?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">
&#160;|&#160; 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;">
&#9888; <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>

View File

@@ -1,228 +0,0 @@
<?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>