feat: filter reward and negative lines from basic receipts, update module author, and document changes
This commit is contained in:
parent
57b6040ed4
commit
33c8e73003
@ -14,7 +14,7 @@ This custom module is designed for Odoo 19 to override and customize the standar
|
||||
When using the Early Receipt or Bill printing feature (before payment is finalized), Odoo natively prints "Pro forma receipt". This module replaces that text with an attention-grabbing **"!!! INI ADALAH TAGIHAN SEMENTARA, BUKAN BUKTI PEMBAYARAN !!!"**.
|
||||
|
||||
4. **Basic Receipt Improvements:**
|
||||
When printing a Basic Receipt (e.g. gift receipt without prices), this module hides the receipt header, footer, and the "Pro Forma" text. It also ensures that both the **Customer Note** and the **Internal Note** are fully visible.
|
||||
When printing a Basic Receipt (e.g. gift receipt without prices), this module hides the receipt header, footer, and the "Pro Forma" text. It also ensures that both the **Customer Note** and the **Internal Note** are fully visible, and automatically filters out reward products, promotions, and coupons (lines with negative values or flagged as reward lines).
|
||||
|
||||
5. **Address & Email Removal:**
|
||||
Hides the detailed company/branch address and the company email from the receipt footer, keeping the receipt concise.
|
||||
|
||||
@ -30,6 +30,11 @@
|
||||
<attribute name="t-if">!props.basic_receipt</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Hide reward/coupon lines on basic receipt -->
|
||||
<xpath expr="//Orderline" position="attributes">
|
||||
<attribute name="t-if">!props.basic_receipt || (!line.is_reward_line && line.price_unit >= 0)</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Show order note on basic receipt -->
|
||||
<xpath expr="//li[@t-if='line.customerNote']" position="replace">
|
||||
<li t-if="line.customer_note || line.customerNote" class="customer-note w-100 p-2 my-1 rounded text-break">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user