From cf8f798a59aaec2a5cc0b82e718647000b08fb45 Mon Sep 17 00:00:00 2001 From: micheledic Date: Wed, 19 Feb 2025 10:06:16 +0100 Subject: [PATCH] [FIX] fiscal_epos_print: new order lines not saved when changing table on Point of sale when restaurant tables are enabled --- fiscal_epos_print/static/src/js/models.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fiscal_epos_print/static/src/js/models.js b/fiscal_epos_print/static/src/js/models.js index fe22148d2f70..2e9778b3e46e 100644 --- a/fiscal_epos_print/static/src/js/models.js +++ b/fiscal_epos_print/static/src/js/models.js @@ -87,10 +87,9 @@ odoo.define("fiscal_epos_print.models", function (require) { var order = this.pos.get_order(); if (order) { var lines = order.orderlines; - order.has_refund = - lines.find(function (line) { - return line.quantity < 0.0; - }) !== undefined; + order.has_refund = lines.some(function (line) { + return line.quantity < 0.0; + }); if (order.has_refund) { order.refund_report = this.name.substr(-4); order.refund_doc_num = this.name.substr(-4);