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. 5
      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',
'version': '18.0.1.0.2',
'version': '18.0.1.0.3',
'category': 'Point of Sale',
'live_test_url': 'https://www.youtube.com/watch?v=sHQUam5F5Qs',
'summary': "POS Receipt, Receipt Design, POS Receipt Template, Design "

5
custom_receipts_for_pos/doc/RELEASE_NOTES.md

@ -14,3 +14,8 @@
#### Version 18.0.1.0.2
##### BUG FIX
- 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, {
setup(){
console.log('setupp')
super.setup();
this.state = useState({
template: true,
@ -14,6 +15,7 @@ patch(OrderReceipt.prototype, {
},
get templateProps() {
console.log('templateProps')
return {
data: this.props.data,
order: this.pos.get_order(),
@ -23,6 +25,7 @@ patch(OrderReceipt.prototype, {
};
},
get templateComponent() {
console.log('templateComponent')
var mainRef = this;
return class extends Component {
setup() {}
@ -30,6 +33,7 @@ patch(OrderReceipt.prototype, {
};
},
get isTrue() {
console.log('isTrue')
if (this.env.services.pos.config.is_custom_receipt == false) {
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">
<xpath expr="//div[hasclass('pos-receipt')]" position="replace">
<div class="pos-receipt">
<t t-log="'isTrue',isTrue"/>
<t t-if="isTrue">
<ReceiptHeader data="props.data.headerData"/>
<OrderWidget t-if="props.data.orderlines?.length"
@ -63,7 +64,7 @@
</div>
</t>
</div>
<!--1-->
<div class="text-center">--------------------------------</div>
<div class="pos-receipt-amount receipt-total">
<t t-out="props.data.label_total"/>
@ -78,7 +79,9 @@
</div>
<div class="pos-receipt-amount receipt-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"/>
</div>
</t>

Loading…
Cancel
Save