diff --git a/open_workshop_pos/static/src/js/ows_receipt_header_patch.js b/open_workshop_pos/static/src/js/ows_receipt_header_patch.js new file mode 100644 index 0000000..a00d169 --- /dev/null +++ b/open_workshop_pos/static/src/js/ows_receipt_header_patch.js @@ -0,0 +1,19 @@ +/** @odoo-module */ + +import { PosOrder } from "@point_of_sale/app/models/pos_order"; +import { patch } from "@web/core/utils/patch"; + +// Patch the export_for_printing method to include partner data +patch(PosOrder.prototype, { + export_for_printing(baseUrl, headerData) { + const result = super.export_for_printing(baseUrl, headerData); + + // Add partner name to headerData if partner exists + const partner = this.get_partner(); + if (partner && result.headerData) { + result.headerData.partnerName = partner.name; + } + + return result; + } +}); diff --git a/open_workshop_pos/static/src/xml/ows_receipt_header_patch.xml b/open_workshop_pos/static/src/xml/ows_receipt_header_patch.xml new file mode 100644 index 0000000..e55cd05 --- /dev/null +++ b/open_workshop_pos/static/src/xml/ows_receipt_header_patch.xml @@ -0,0 +1,14 @@ + + + + + + +
+ +
+
+
+