Browse Source

May 30: [FIX] Bug Fixed 'custom_receipts_for_pos'

pull/346/merge
Cybrosys Technologies 1 month ago
parent
commit
12c91e6b55
  1. 2
      custom_receipts_for_pos/__init__.py
  2. 4
      custom_receipts_for_pos/__manifest__.py
  3. 2
      custom_receipts_for_pos/data/pos_receipt_design1_data.xml
  4. 4
      custom_receipts_for_pos/data/pos_receipt_design2_data.xml
  5. 5
      custom_receipts_for_pos/doc/RELEASE_NOTES.md
  6. 2
      custom_receipts_for_pos/models/__init__.py
  7. 2
      custom_receipts_for_pos/models/pos_config.py
  8. 2
      custom_receipts_for_pos/models/pos_receipt.py
  9. 2
      custom_receipts_for_pos/models/pos_session.py
  10. 8
      custom_receipts_for_pos/static/src/js/receipt_design.js
  11. 33
      custom_receipts_for_pos/static/src/xml/order_receipt.xml

2
custom_receipts_for_pos/__init__.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify

4
custom_receipts_for_pos/__manifest__.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
@ -22,7 +22,7 @@
################################################################################
{
'name': 'POS Receipt Design',
'version': '18.0.1.0.1',
'version': '18.0.1.0.2',
'category': 'Point of Sale',
'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design "
"Report, Custom Receipt, POS Report, Customise Receipt, Odoo18, "

2
custom_receipts_for_pos/data/pos_receipt_design1_data.xml

@ -82,7 +82,7 @@
</t>
<t t-else="">
<t t-if="props.orderlines and props.orderlines.length">
<tr t-foreach="props.orderlines" t-as="orderline" t-key="orderline.id">
<tr t-foreach="props.orderlines" t-as="orderline" t-key="orderline_index">
<td style="padding-top:1%; padding-bottom:1%; text-align:left;">
<t t-esc="orderline.productName"/>
<t t-if="orderline.discount > 0">

4
custom_receipts_for_pos/data/pos_receipt_design2_data.xml

@ -80,7 +80,7 @@
</t>
<t t-else="">
<t t-if="props.orderlines and props.orderlines.length">
<tr t-foreach="props.orderlines" t-as="orderline" t-key="orderline.id">
<tr t-foreach="props.orderlines" t-as="orderline" t-key="orderline_index">
<td style="padding-top:1%; padding-bottom:1%; text-align:left;">
<t t-esc="orderline.productName"/>
<t t-if="orderline.discount > 0">
@ -122,7 +122,7 @@
<br/>
<div style="font-weight:700; font-size:14px;">
<span style="margin-left:40%;">TOTAL : </span>
<span t-esc='props.data.amount_total' class="pos-receipt-right-align"/>
<span t-esc='env.utils.formatCurrency(props.data.amount_total)' class="pos-receipt-right-align"/>
</div>
<br/><br/>
</div>

5
custom_receipts_for_pos/doc/RELEASE_NOTES.md

@ -9,3 +9,8 @@
#### Version 18.0.1.0.1
##### BUG FIX
- BUG FIX
#### 28.05.2025
#### Version 18.0.1.0.2
##### BUG FIX
- Fixed the issues in the custom receipts which show error while printing the receipts.

2
custom_receipts_for_pos/models/__init__.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify

2
custom_receipts_for_pos/models/pos_config.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify

2
custom_receipts_for_pos/models/pos_receipt.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify

2
custom_receipts_for_pos/models/pos_session.py

@ -3,7 +3,7 @@
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Sreerag PM (<https://www.cybrosys.com>)
#
# This program is free software: you can modify

8
custom_receipts_for_pos/static/src/js/receipt_design.js

@ -11,13 +11,7 @@ patch(OrderReceipt.prototype, {
template: true,
})
this.pos = useState(useService("pos"));
// const templateProps = {
// data: this.props.data,
// order: this.pos.get_order(),
// receipt: this.pos.get_order().export_for_printing(),
// orderlines: this.pos.get_order().get_orderlines(),
// paymentlines: this.pos.get_order().export_for_printing().paymentlines
// };
},
get templateProps() {
return {

33
custom_receipts_for_pos/static/src/xml/order_receipt.xml

@ -31,18 +31,18 @@
class="pos-receipt-taxes">
<div class="text-center">--------------------------------</div>
<t t-foreach="taxTotals.subtotals" t-as="subtotal"
t-key="subtotal.name">
t-key="subtotal_index">
<div class="d-flex">
<span t-if="showTaxGroupLabels" class="me-2"
style="visibility: hidden;">A</span>
<span class="fw-bolder"
t-out="subtotal.name"/>
<span t-esc="props.formatCurrency(subtotal.base_amount_currency).toFixed()"
class="ms-auto"/>
<span t-esc="props.formatCurrency(subtotal.base_amount_currency)" class="ms-auto"/>
</div>
<div t-foreach="subtotal.tax_groups"
t-as="tax_group" t-key="tax_group.id"
t-as="tax_group" t-key="tax_group_index"
class="d-flex">
<t t-if="showTaxGroupLabels">
<span t-if="tax_group.group_label"
@ -55,10 +55,10 @@
<span t-esc="tax_group.group_name"/>
<t t-if="!taxTotals.same_tax_base">
on
<span t-esc="props.formatCurrency(tax_group.base_amount_currency).toFixed()"/>
<span t-esc="props.formatCurrency(tax_group.base_amount_currency)"/>
</t>
</span>
<span t-esc="props.formatCurrency(tax_group.tax_amount_currency).toFixed()"
<span t-esc="props.formatCurrency(tax_group.tax_amount_currency)"
class="ms-auto"/>
</div>
</t>
@ -67,18 +67,18 @@
<div class="text-center">--------------------------------</div>
<div class="pos-receipt-amount receipt-total">
<t t-out="props.data.label_total"/>
<span t-esc="props.formatCurrency(taxTotals.order_total).toFixed()"
<span t-esc="props.formatCurrency(taxTotals.order_total)"
class="pos-receipt-right-align"/>
</div>
<t t-if="'order_rounding' in taxTotals">
<div class="pos-receipt-amount receipt-rounding">
<t t-out="props.data.label_rounding"/>
<span t-esc="props.formatCurrency(taxTotals.order_rounding).toFixed()"
<span t-esc="props.formatCurrency(taxTotals.order_rounding)"
class="pos-receipt-right-align"/>
</div>
<div class="pos-receipt-amount receipt-to-pay">
To Pay
<span t-esc="props.formatCurrency(taxTotals.order_to_pay).toFixed()"
<span t-esc="props.formatCurrency(taxTotals.order_to_pay)"
class="pos-receipt-right-align"/>
</div>
</t>
@ -87,23 +87,22 @@
t-foreach="props.data.paymentlines" t-as="line"
t-key="line_index">
<t t-esc="line.name"/>
<span t-esc="props.formatCurrency(line.amount).toFixed()"
<span t-esc="props.formatCurrency(line.amount)"
class="pos-receipt-right-align"/>
</div>
<div t-if="'order_change' in taxTotals"
class="pos-receipt-amount receipt-change">
<t t-out="props.data.label_change"/>
<span t-esc="props.formatCurrency(taxTotals.order_change).toFixed()"
<span t-esc="props.formatCurrency(taxTotals.order_change)"
class="pos-receipt-right-align"/>
</div>
<!-- Extra Payment Info -->
<t t-if="props.data.total_discount">
<div class="text-center">
<t t-out="props.data.label_discounts"/>
<span t-esc="props.formatCurrency(props.data.total_discount).toFixed()"
<span t-esc="props.formatCurrency(props.data.total_discount)"
class="pos-receipt-right-align"/>
</div>
</t>
<div class="before-footer"/>
@ -142,12 +141,12 @@
<br/>
</div>
<div class="after-footer">
<t t-foreach="props.data.paymentlines" t-as="line"
t-key="line_index">
<t t-if="line.ticket">
<t t-foreach="props.data.paymentlines" t-as="lines"
t-key="lines_index">
<t t-if="lines.ticket">
<br/>
<div class="pos-payment-terminal-receipt">
<pre t-esc="line.ticket"/>
<pre t-esc="lines.ticket"/>
</div>
</t>
</t>

Loading…
Cancel
Save