From 2224b0c26f332454ddda2fbc08bdcc1c66042774 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 2 Jun 2026 20:15:38 +0700 Subject: [PATCH] refactor: remove unused Orderline patch for receipt internal note parsing --- static/src/js/orderline.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/static/src/js/orderline.js b/static/src/js/orderline.js index e1680fb..0478a93 100644 --- a/static/src/js/orderline.js +++ b/static/src/js/orderline.js @@ -1,25 +1,8 @@ /** @odoo-module */ import { patch } from "@web/core/utils/patch"; -import { Orderline } from "@point_of_sale/app/components/orderline/orderline"; import { PosOrder } from "@point_of_sale/app/models/pos_order"; -patch(Orderline.prototype, { - get lineScreenValues() { - const res = super.lineScreenValues; - // In POS, the internal note (line.note) is typically shown only in display mode. - // We override this to also include the parsed internalNote when printing receipts. - if (this.props.mode === "receipt" && this.line.note) { - try { - res.internalNote = JSON.parse(this.line.note); - } catch (e) { - res.internalNote = [{ text: this.line.note }]; // Fallback if not valid JSON - } - } - return res; - } -}); - patch(PosOrder.prototype, { getCashierName() { const pos = this.pos || this.models?.env?.services?.pos;