[FIX] l10n_gcc_pos: include is_gcc_country in ReceiptHeader

There was an inconsistency due to the separation of ReceiptHeader from
OrderReceipt. The 'is_gcc_country', which is utilized in both
l10n_gcc_pos and l10n_sa_pos modules within the ReceiptHeader, was not
being appropriately passed due to this separation.

This commit resolves the issue by overriding the 'getReceiptHeaderData'
method to include the 'is_gcc_country' in the ReceiptHeader data. This
ensures that the ReceiptHeader correctly reflects the necessary
information.

opw-3610862

closes odoo/odoo#144223

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Pedram (PEBR)
2023-12-04 11:58:20 +00:00
parent c34518283f
commit 8037bec6d8
@@ -0,0 +1,15 @@
/** @odoo-module */
import { patch } from "@web/core/utils/patch";
import { PosStore } from "@point_of_sale/app/store/pos_store";
patch(PosStore.prototype, {
getReceiptHeaderData() {
return {
...super.getReceiptHeaderData(),
is_gcc_country: ["SA", "AE", "BH", "OM", "QA", "KW"].includes(
this.company.country?.code
),
};
},
});