diff --git a/pos_partial_payment_odoo/__manifest__.py b/pos_partial_payment_odoo/__manifest__.py index 658547266..9f7ff76c8 100644 --- a/pos_partial_payment_odoo/__manifest__.py +++ b/pos_partial_payment_odoo/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': 'POS Partial Payment', - 'version': '17.0.1.0.0', + 'version': '17.0.1.0.1', 'category': 'Point of Sale', 'summary': "Simplify Payments with Partial Payment in Odoo POS", 'description': "In Odoo POS, partial payments allow customers to pay for " diff --git a/pos_partial_payment_odoo/doc/RELEASE_NOTES.md b/pos_partial_payment_odoo/doc/RELEASE_NOTES.md index ac961ad72..159c0484f 100644 --- a/pos_partial_payment_odoo/doc/RELEASE_NOTES.md +++ b/pos_partial_payment_odoo/doc/RELEASE_NOTES.md @@ -5,3 +5,11 @@ ### ADD - Initial Commit for POS Partial Payment + +## Module + +#### 23.08.2024 +#### Version 17.0.1.0.1 +#### UPDT + +- Update the xml and js file with proper useRef. \ No newline at end of file diff --git a/pos_partial_payment_odoo/static/src/js/payment_screen.js b/pos_partial_payment_odoo/static/src/js/payment_screen.js index 968353cc7..6b4e7341d 100644 --- a/pos_partial_payment_odoo/static/src/js/payment_screen.js +++ b/pos_partial_payment_odoo/static/src/js/payment_screen.js @@ -11,6 +11,7 @@ patch(PaymentScreen.prototype, { setup() { super.setup(...arguments); this.root = useRef('PartialPayment'); + this.button = useRef('PartialPaymentButton'); }, //Partial Payment Button Functionality PartialPaymentButton() { @@ -21,13 +22,15 @@ patch(PaymentScreen.prototype, { }); return false; }; + console.log(this.root.el, "this.root.el") + console.log(this.button, "this.root.el") if (this.currentOrder.partial_payment === true) { this.currentOrder.partial_payment = false; - var validate = this.root.el + var validate = this.root.el || this.button.el validate.classList.add('disabled'); } else if(this.currentOrder.get_partner()){ this.currentOrder.partial_payment = true; - var validate = this.root.el + var validate = this.root.el || this.button.el validate.classList.remove('disabled'); } }, diff --git a/pos_partial_payment_odoo/static/src/xml/payment_screen.xml b/pos_partial_payment_odoo/static/src/xml/payment_screen.xml index b937167df..766596156 100644 --- a/pos_partial_payment_odoo/static/src/xml/payment_screen.xml +++ b/pos_partial_payment_odoo/static/src/xml/payment_screen.xml @@ -6,7 +6,7 @@