Browse Source

Sep 10: [FIX] Bug Fixed 'pos_receipt_invoice_send_whatsapp'

pull/331/head
Cybrosys Technologies 8 months ago
parent
commit
dcc2c1281b
  1. 15
      pos_receipt_invoice_send_whatsapp/doc/RELEASE_NOTES.md
  2. 2
      pos_receipt_invoice_send_whatsapp/static/src/js/ReceiptScreen.js
  3. 2
      pos_receipt_invoice_send_whatsapp/static/src/xml/payment_screen_templates.xml
  4. 2
      pos_receipt_invoice_send_whatsapp/static/src/xml/receipt_screen_templates.xml

15
pos_receipt_invoice_send_whatsapp/doc/RELEASE_NOTES.md

@ -1,5 +1,20 @@
## Module <pos_receipt_invoice_send_whatsapp> ## Module <pos_receipt_invoice_send_whatsapp>
#### 12.06.2024 #### 12.06.2024
#### Version 17.0.1.0.0 #### Version 17.0.1.0.0
##### ADD ##### ADD
- Initial commit for Send POS Receipt and Invoice via WhatsApp - Initial commit for Send POS Receipt and Invoice via WhatsApp
## Module <pos_receipt_invoice_send_whatsapp>
#### 05.09.2024
#### Version 17.0.1.0.0
##### ADD
- Updated the module: Encountered a null case when no customer is selected. Fixed the error by checking null case in
receipt and payment screen.

2
pos_receipt_invoice_send_whatsapp/static/src/js/ReceiptScreen.js

@ -22,7 +22,7 @@ patch(ReceiptScreen.prototype, {
method: 'action_send_invoice', method: 'action_send_invoice',
args: [0], args: [0],
kwargs: { kwargs: {
order_id: order_id, // Pass order_id as a keyword argument order_id: order_id,
number: this.currentOrder.get_partner().whatsapp_number, number: this.currentOrder.get_partner().whatsapp_number,
config_id: this.pos.config.id config_id: this.pos.config.id
} }

2
pos_receipt_invoice_send_whatsapp/static/src/xml/payment_screen_templates.xml

@ -6,11 +6,13 @@
<!--Inherit point_of_sale.PaymentScreenButtons to incorporate the partner's <!--Inherit point_of_sale.PaymentScreenButtons to incorporate the partner's
WhatsApp number into the Payment Screen.--> WhatsApp number into the Payment Screen.-->
<xpath expr="//span[hasclass('partner-name')]" position="after"> <xpath expr="//span[hasclass('partner-name')]" position="after">
<t t-if="currentOrder.get_partner()">
<t t-if="currentOrder.get_partner().whatsapp_number"> <t t-if="currentOrder.get_partner().whatsapp_number">
<div> </div> <div> </div>
<i class="fa fa-whatsapp me-2"/> <i class="fa fa-whatsapp me-2"/>
<t t-esc="currentOrder.get_partner().whatsapp_number"/> <t t-esc="currentOrder.get_partner().whatsapp_number"/>
</t> </t>
</t>
</xpath> </xpath>
</t> </t>
</templates> </templates>

2
pos_receipt_invoice_send_whatsapp/static/src/xml/receipt_screen_templates.xml

@ -8,6 +8,7 @@
Additionally, set conditions for displaying these buttons.--> Additionally, set conditions for displaying these buttons.-->
<xpath expr="//div[hasclass('buttons')]" position="after"> <xpath expr="//div[hasclass('buttons')]" position="after">
<t t-if="pos.user.whatsapp_groups_checks"> <t t-if="pos.user.whatsapp_groups_checks">
<t t-if="this.currentOrder.get_partner()">
<t t-if="pos.config.pos_whatsapp_enabled"> <t t-if="pos.config.pos_whatsapp_enabled">
<t t-if="pos.config.apply_send_receipt_or_invoice == 'send_invoice' or pos.config.apply_send_receipt_or_invoice == false"> <t t-if="pos.config.apply_send_receipt_or_invoice == 'send_invoice' or pos.config.apply_send_receipt_or_invoice == false">
<div class="buttons my-3"> <div class="buttons my-3">
@ -49,6 +50,7 @@
</t> </t>
</t> </t>
</t> </t>
</t>
</xpath> </xpath>
</t> </t>
</templates> </templates>

Loading…
Cancel
Save