mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 11:32:06 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
odoo.define("pos_timeout.models", function (require) {
|
||||
"use strict";
|
||||
|
||||
const PosModels = require("point_of_sale.models");
|
||||
const Registries = require("point_of_sale.Registries");
|
||||
|
||||
const PosGlobalState = (OriginalPosGlobalState) =>
|
||||
class extends OriginalPosGlobalState {
|
||||
_save_to_server(orders, options) {
|
||||
const configTimeout = this.env.pos.config.pos_order_timeout;
|
||||
if (configTimeout) {
|
||||
options.timeout = configTimeout * 1000 * orders.length;
|
||||
}
|
||||
|
||||
return super._save_to_server(orders, options);
|
||||
}
|
||||
};
|
||||
|
||||
Registries.Model.extend(PosModels.PosGlobalState, PosGlobalState);
|
||||
|
||||
return PosGlobalState;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue