mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-23 17:02:00 +02:00
19.0 vanilla
This commit is contained in:
parent
6e54c1af6c
commit
3ca647e428
1087 changed files with 132065 additions and 108499 deletions
|
|
@ -0,0 +1,11 @@
|
|||
import { PosConfig } from "@point_of_sale/../tests/unit/data/pos_config.data";
|
||||
|
||||
PosConfig._records = PosConfig._records.map((record) => ({
|
||||
...record,
|
||||
module_pos_restaurant: true,
|
||||
floor_ids: [2, 3],
|
||||
iface_tipproduct: true,
|
||||
tip_product_id: 1,
|
||||
set_tip_after_payment: true,
|
||||
default_screen: "tables",
|
||||
}));
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import { PosOrderLine } from "@point_of_sale/../tests/unit/data/pos_order_line.data";
|
||||
|
||||
patch(PosOrderLine.prototype, {
|
||||
_load_pos_data_fields() {
|
||||
return [...super._load_pos_data_fields(), "course_id"];
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import { PosPreset } from "@point_of_sale/../tests/unit/data/pos_preset.data";
|
||||
|
||||
patch(PosPreset.prototype, {
|
||||
_load_pos_data_fields() {
|
||||
return [...super._load_pos_data_fields(), "use_guest"];
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import { PosSession } from "@point_of_sale/../tests/unit/data/pos_session.data";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(PosSession.prototype, {
|
||||
_load_pos_data_models() {
|
||||
return [
|
||||
...super._load_pos_data_models(),
|
||||
"restaurant.floor",
|
||||
"restaurant.table",
|
||||
"restaurant.order.course",
|
||||
];
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import { hootPosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
|
||||
import { models } from "@web/../tests/web_test_helpers";
|
||||
|
||||
export class RestaurantFloor extends models.ServerModel {
|
||||
_name = "restaurant.floor";
|
||||
|
||||
_load_pos_data_fields() {
|
||||
return [
|
||||
"name",
|
||||
"background_color",
|
||||
"table_ids",
|
||||
"sequence",
|
||||
"pos_config_ids",
|
||||
"floor_background_image",
|
||||
];
|
||||
}
|
||||
|
||||
_records = [
|
||||
{
|
||||
id: 2,
|
||||
name: "Main Floor",
|
||||
background_color: "red",
|
||||
table_ids: [2, 3, 4],
|
||||
sequence: 1,
|
||||
pos_config_ids: [1],
|
||||
floor_background_image: false,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Patio",
|
||||
background_color: "rgb(130, 233, 171)",
|
||||
table_ids: [14, 15, 16],
|
||||
sequence: 1,
|
||||
pos_config_ids: [1],
|
||||
floor_background_image: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
patch(hootPosModels, [...hootPosModels, RestaurantFloor]);
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import { hootPosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
|
||||
import { models } from "@web/../tests/web_test_helpers";
|
||||
|
||||
export class RestaurantOrderCourse extends models.ServerModel {
|
||||
_name = "restaurant.order.course";
|
||||
|
||||
_load_pos_data_fields() {
|
||||
return ["uuid", "fired", "order_id", "line_ids", "index", "write_date"];
|
||||
}
|
||||
}
|
||||
|
||||
patch(hootPosModels, [...hootPosModels, RestaurantOrderCourse]);
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import { hootPosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
|
||||
import { models } from "@web/../tests/web_test_helpers";
|
||||
|
||||
export class RestaurantTable extends models.ServerModel {
|
||||
_name = "restaurant.table";
|
||||
|
||||
_load_pos_data_fields() {
|
||||
return [
|
||||
"table_number",
|
||||
"width",
|
||||
"height",
|
||||
"position_h",
|
||||
"position_v",
|
||||
"parent_id",
|
||||
"shape",
|
||||
"floor_id",
|
||||
"color",
|
||||
"seats",
|
||||
"active",
|
||||
];
|
||||
}
|
||||
|
||||
_records = [
|
||||
{
|
||||
id: 2,
|
||||
table_number: 1,
|
||||
width: 90,
|
||||
height: 90,
|
||||
position_h: 407,
|
||||
position_v: 88,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 2,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 4,
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
table_number: 2,
|
||||
width: 90,
|
||||
height: 90,
|
||||
position_h: 732,
|
||||
position_v: 221,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 2,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 4,
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
table_number: 4,
|
||||
width: 165,
|
||||
height: 100,
|
||||
position_h: 762,
|
||||
position_v: 83,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 2,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 4,
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
table_number: 101,
|
||||
width: 130,
|
||||
height: 85,
|
||||
position_h: 100,
|
||||
position_v: 50,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 3,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 2,
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
table_number: 102,
|
||||
width: 130,
|
||||
height: 85,
|
||||
position_h: 100,
|
||||
position_v: 166,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 3,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 2,
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
table_number: 103,
|
||||
width: 130,
|
||||
height: 85,
|
||||
position_h: 100,
|
||||
position_v: 283,
|
||||
parent_id: false,
|
||||
shape: "square",
|
||||
floor_id: 3,
|
||||
color: "rgb(53,211,116)",
|
||||
seats: 2,
|
||||
active: true,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
patch(hootPosModels, [...hootPosModels, RestaurantTable]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue