From 811e1be4f5789cacd7ac752c6d1b0c6ce334f387 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Wed, 6 May 2026 11:01:46 +0700 Subject: [PATCH] refactor: move is_quotation_line registration to export_as_JSON patch instead of static array push --- static/src/overrides/models.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/src/overrides/models.js b/static/src/overrides/models.js index ae9f53e..e7ccecd 100644 --- a/static/src/overrides/models.js +++ b/static/src/overrides/models.js @@ -8,7 +8,16 @@ import { _t } from "@web/core/l10n/translation"; import { OrderReceipt } from "@point_of_sale/app/screens/receipt_screen/receipt/order_receipt"; import { onError } from "@odoo/owl"; -PosOrderline.extraFields.push("is_quotation_line"); +// Field is now loaded via _load_pos_data_fields in Python + +patch(PosOrderline.prototype, { + export_as_JSON() { + const json = super.export_as_JSON(...arguments); + json.is_quotation_line = this.is_quotation_line; + return json; + } +}); + patch(PosStore.prototype, { async pay() {