From 93468530af4d3cf1dd59f76fbad43fde73174750 Mon Sep 17 00:00:00 2001 From: gitea Date: Tue, 15 Apr 2025 23:32:38 +0000 Subject: [PATCH] no error in clientscreen anymore --- static/src/js/machine_access_sidebar.js | 7 ++++--- static/src/js/partner_access_popup.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/static/src/js/machine_access_sidebar.js b/static/src/js/machine_access_sidebar.js index 620109e..761882d 100644 --- a/static/src/js/machine_access_sidebar.js +++ b/static/src/js/machine_access_sidebar.js @@ -16,6 +16,7 @@ odoo.define('machine_access_sidebar', function (require) { init: function(parent, options) { this._super(parent, options); this.partner = null; + this.pos.bind('change:selectedOrder', this.bind_order_events, this); }, show: function() { @@ -53,10 +54,10 @@ odoo.define('machine_access_sidebar', function (require) { var order = this.pos.get_order(); if (!order) return; - order.unbind('change:client', this); + /*order.unbind('change:client', this); order.bind('change:client', this, function () { this.update_machine_access(order.get_client()); - }); + });*/ this.update_machine_access(order.get_client()); } @@ -97,7 +98,7 @@ odoo.define('machine_access_sidebar', function (require) { this.sidebar_widget = sidebar; sidebar.appendTo(this.$el); - this.pos.bind('change:selectedOrder', sidebar.bind_order_events, sidebar); + //this.pos.bind('change:selectedOrder', sidebar.bind_order_events, sidebar); if (this.pos.get_order()) { sidebar.bind_order_events(); diff --git a/static/src/js/partner_access_popup.js b/static/src/js/partner_access_popup.js index 590998e..ccaf8c4 100644 --- a/static/src/js/partner_access_popup.js +++ b/static/src/js/partner_access_popup.js @@ -12,7 +12,7 @@ odoo.define('open_workshop.models', function (require) { }); -odoo.define('open_workshop.partner_access_popup', function (require) { +/* odoo.define('open_workshop.partner_access_popup', function (require) { "use strict"; var screens = require('point_of_sale.screens'); @@ -46,4 +46,4 @@ odoo.define('open_workshop.partner_access_popup', function (require) { }); }, }); -}); +});*/