Hi everyone,
I’m looking for a solution related to customizing the POS KOT (Kitchen Order Ticket) in Odoo.
I need to customize the POS so that when the user clicks the “Order” button, the KOT order data is sent to an external WebSocket URL.
Right now I’m stuck because I can’t figure out which method or function I need to override to capture the KOT data at the moment the order is submitted to the kitchen printer.
Any help or direction would be greatly appreciated. Thanks!
Hello,
Can you elaborate more what you want to customize?
This is the method which is used to sent the order to kitchen display in odoo 19 PoS
async sendOrderInPreparation(order, opts = {}) {
let categoryCount = [];
if (!opts.cancelled) {
categoryCount = this.categoryCount;
}
const result = await super.sendOrderInPreparation(order, opts);
if (this.config.module_pos_restaurant && categoryCount.length) {
const categorySummary = categoryCount
.map((cat) => `${cat.count} ${cat.name}`)
.join(_t(", "))
.replace(/, ([^,]*)$/, _t(" and $1"));
this.notification.add(_t("%s, sent to the kitchen", categorySummary), {
type: "success",
});
}
return result;
},
Hope it helps.
Hello, thanks for the response.
I want to customize the POS KOT (Kitchen Order Ticket) workflow.
When the cashier clicks the “Order” button in the POS, Odoo normally sends the KOT to the kitchen printer.
What I need is:
At the moment the Order button is clicked,
I want to capture the KOT order data (products, qty, table, notes, etc.),
And then send that data to my external WebSocket URL.
So I need to know which Odoo POS JavaScript method handles this KOT send action, so I can override it and add my WebSocket request.
Thanks again for your help.