bug fixes for auto reload kitchen display when self order transfered to a table

This commit is contained in:
suherdy.yacob@mapan.co.id 2025-04-08 09:38:27 +07:00
parent eb10846480
commit 8f94a48948
10 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class CustomPosOrder(models.Model):
for display in displays: for display in displays:
#self.env['pos_preparation_display.display']._send_load_orders_message() #self.env['pos_preparation_display.display']._send_load_orders_message()
self.env['bus.bus']._sendone(f'preparation_display-{self.access_token}', 'load_orders', { self.env['bus.bus']._sendone(f'preparation_display-{display.access_token}', 'load_orders', {
'preparation_display_id': display.id, 'preparation_display_id': display.id,
'sound': True 'sound': True
}) })

View File

@ -37,8 +37,11 @@ patch(PreparationDisplay.prototype, {
this.posHasProducts = await this.loadPosHasProducts(); this.posHasProducts = await this.loadPosHasProducts();
this.loadingProducts = false; this.loadingProducts = false;
setTimeout(function(){ // force refresh every 5 seconds
window.location.reload();
}, 5000);
// setTimeout(function(){
// window.location.reload();
// }, 5000);
}, },
}); });