Tower: upload laundry_management 19.0.19.0.4 (via marketplace)
This commit is contained in:
291
addons/laundry_management/report/laundry_session_report.xml
Normal file
291
addons/laundry_management/report/laundry_session_report.xml
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
<?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 < 0 and '#f8d7da' or '#d4edda'};">
|
||||||
|
<td t-attf-style="color:#{s.cash_difference < 0 and '#721c24' or '#155724'};">
|
||||||
|
<strong>Difference</strong>
|
||||||
|
</td>
|
||||||
|
<td class="text-end fw-bold"
|
||||||
|
t-attf-style="color:#{s.cash_difference < 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 & 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 > 0 and '#f8d7da' or '#d4edda'};">
|
||||||
|
<td>Outstanding (Unpaid)</td>
|
||||||
|
<td class="text-end"
|
||||||
|
t-attf-style="color:#{s.outstanding_amount > 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> <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  | 
|
||||||
|
<t t-esc="s.company_id.name"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user