Browse Source

Aug 07: [FIX] Bug Fixed 'custom_receipts_for_pos'

18.0
Risvana Cybro 3 days ago
parent
commit
fc1bcbea9d
  1. 2
      custom_receipts_for_pos/__manifest__.py
  2. 7
      custom_receipts_for_pos/doc/RELEASE_NOTES.md
  3. 4
      custom_receipts_for_pos/static/src/js/receipt_design.js
  4. 7
      custom_receipts_for_pos/static/src/xml/order_receipt.xml

2
custom_receipts_for_pos/__manifest__.py

@ -22,7 +22,7 @@
################################################################################ ################################################################################
{ {
'name': 'POS Receipt Design', 'name': 'POS Receipt Design',
'version': '18.0.1.0.2', 'version': '18.0.1.0.3',
'category': 'Point of Sale', 'category': 'Point of Sale',
'live_test_url': 'https://www.youtube.com/watch?v=sHQUam5F5Qs', 'live_test_url': 'https://www.youtube.com/watch?v=sHQUam5F5Qs',
'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design " 'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design "

7
custom_receipts_for_pos/doc/RELEASE_NOTES.md

@ -13,4 +13,9 @@
#### 28.05.2025 #### 28.05.2025
#### Version 18.0.1.0.2 #### Version 18.0.1.0.2
##### BUG FIX ##### BUG FIX
- Fixed the issues in the custom receipts which show error while printing the receipts. - Fixed the issues in the custom receipts which show error while printing the receipts.
#### 06.08.2025
#### Version 18.0.1.0.3
##### BUG FIX
- Fixed the issues in the custom receipts which show error while loading the POS receipts screen.

4
custom_receipts_for_pos/static/src/js/receipt_design.js

@ -6,6 +6,7 @@ import { useService } from "@web/core/utils/hooks";
patch(OrderReceipt.prototype, { patch(OrderReceipt.prototype, {
setup(){ setup(){
console.log('setupp')
super.setup(); super.setup();
this.state = useState({ this.state = useState({
template: true, template: true,
@ -14,6 +15,7 @@ patch(OrderReceipt.prototype, {
}, },
get templateProps() { get templateProps() {
console.log('templateProps')
return { return {
data: this.props.data, data: this.props.data,
order: this.pos.get_order(), order: this.pos.get_order(),
@ -23,6 +25,7 @@ patch(OrderReceipt.prototype, {
}; };
}, },
get templateComponent() { get templateComponent() {
console.log('templateComponent')
var mainRef = this; var mainRef = this;
return class extends Component { return class extends Component {
setup() {} setup() {}
@ -30,6 +33,7 @@ patch(OrderReceipt.prototype, {
}; };
}, },
get isTrue() { get isTrue() {
console.log('isTrue')
if (this.env.services.pos.config.is_custom_receipt == false) { if (this.env.services.pos.config.is_custom_receipt == false) {
return true; return true;
} }

7
custom_receipts_for_pos/static/src/xml/order_receipt.xml

@ -4,6 +4,7 @@
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension"> <t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<xpath expr="//div[hasclass('pos-receipt')]" position="replace"> <xpath expr="//div[hasclass('pos-receipt')]" position="replace">
<div class="pos-receipt"> <div class="pos-receipt">
<t t-log="'isTrue',isTrue"/>
<t t-if="isTrue"> <t t-if="isTrue">
<ReceiptHeader data="props.data.headerData"/> <ReceiptHeader data="props.data.headerData"/>
<OrderWidget t-if="props.data.orderlines?.length" <OrderWidget t-if="props.data.orderlines?.length"
@ -63,7 +64,7 @@
</div> </div>
</t> </t>
</div> </div>
<!--1-->
<div class="text-center">--------------------------------</div> <div class="text-center">--------------------------------</div>
<div class="pos-receipt-amount receipt-total"> <div class="pos-receipt-amount receipt-total">
<t t-out="props.data.label_total"/> <t t-out="props.data.label_total"/>
@ -78,7 +79,9 @@
</div> </div>
<div class="pos-receipt-amount receipt-to-pay"> <div class="pos-receipt-amount receipt-to-pay">
To Pay To Pay
<span t-esc="props.formatCurrency(taxTotals.order_to_pay)" <t t-log="'props', props"/>
<t t-log="'taxTotals.order_to_pay', taxTotals"/>
<span t-esc="props.formatCurrency(taxTotals.total_amount_currency)"
class="pos-receipt-right-align"/> class="pos-receipt-right-align"/>
</div> </div>
</t> </t>

Loading…
Cancel
Save