summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static
diff options
context:
space:
mode:
authorJoseph Caburnay <jcb@odoo.com>2020-06-15 09:59:37 +0000
committerJoseph Caburnay <jcb@odoo.com>2020-07-17 10:00:04 +0000
commitb2f8170d88239b5eaf04f1e3c0dcef613b78fedc (patch)
treeae1a178dab9afd382cd9e45e8db5b28d6a6424e5 /addons/pos_restaurant/static
parent39ff9d95c2c2b09e7d6ec47051ca0bb3c9f6165a (diff)
[IMP] point_of_sale,pos_*: allow users to manage orders in the pos frontend
We now allow invoicing of finalized orders in an open session in this first iteration of order management in the pos frontend. Additionally, receipt reprinting is also introduced. With this feature, we can now reprint the receipt of old orders. closes odoo/odoo#51141 Task-id: 1981354 Related: odoo/enterprise#11690 Related: odoo/upgrade#1472 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/pos_restaurant/static')
-rw-r--r--addons/pos_restaurant/static/src/js/Chrome.js5
-rw-r--r--addons/pos_restaurant/static/src/js/Screens/FloorScreen/FloorScreen.js1
-rw-r--r--addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderManagementScreen.js29
-rw-r--r--addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderRow.js17
-rw-r--r--addons/pos_restaurant/static/src/js/floors.js21
-rw-r--r--addons/pos_restaurant/static/src/xml/Chrome.xml13
-rw-r--r--addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderList.xml12
-rw-r--r--addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderRow.xml12
-rw-r--r--addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js4
-rw-r--r--addons/pos_restaurant/static/tests/tours/OrderManagementScreen.tour.js121
-rw-r--r--addons/pos_restaurant/static/tests/tours/SplitBillScreen.tour.js6
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/BillScreenTourMethods.js2
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js5
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/FloorScreenTourMethods.js7
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/ProductScreenTourMethods.js7
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/SplitBillScreenTourMethods.js7
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js2
-rw-r--r--addons/pos_restaurant/static/tests/tours/helpers/TextInputPopupTourMethods.js2
18 files changed, 220 insertions, 53 deletions
diff --git a/addons/pos_restaurant/static/src/js/Chrome.js b/addons/pos_restaurant/static/src/js/Chrome.js
index 399a3887125..949082f1d8e 100644
--- a/addons/pos_restaurant/static/src/js/Chrome.js
+++ b/addons/pos_restaurant/static/src/js/Chrome.js
@@ -45,7 +45,7 @@ odoo.define('pos_restaurant.chrome', function (require) {
*/
_showSavedScreen(pos, newSelectedOrder) {
if (!newSelectedOrder) {
- this.showScreen('FloorScreen', { floor: pos.table.floor });
+ this.showScreen('FloorScreen', { floor: pos.table ? pos.table.floor : null });
} else {
super._showSavedScreen(pos, newSelectedOrder);
}
@@ -68,7 +68,8 @@ odoo.define('pos_restaurant.chrome', function (require) {
if (this.tempScreen.isShown) {
this.trigger('close-temp-screen');
}
- this.showScreen('FloorScreen', { floor: this.env.pos.table.floor });
+ const table = this.env.pos.table;
+ this.showScreen('FloorScreen', { floor: table ? table.floor : null });
}
_shouldResetIdleTimer() {
return this.env.pos.config.iface_floorplan && this.mainScreen.name !== 'FloorScreen';
diff --git a/addons/pos_restaurant/static/src/js/Screens/FloorScreen/FloorScreen.js b/addons/pos_restaurant/static/src/js/Screens/FloorScreen/FloorScreen.js
index aaf929ed0fe..276663cf57c 100644
--- a/addons/pos_restaurant/static/src/js/Screens/FloorScreen/FloorScreen.js
+++ b/addons/pos_restaurant/static/src/js/Screens/FloorScreen/FloorScreen.js
@@ -289,6 +289,7 @@ odoo.define('pos_restaurant.FloorScreen', function (require) {
}
}
FloorScreen.template = 'FloorScreen';
+ FloorScreen.hideOrderSelector = true;
Registries.Component.add(FloorScreen);
diff --git a/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderManagementScreen.js b/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderManagementScreen.js
new file mode 100644
index 00000000000..e2a1ce65dce
--- /dev/null
+++ b/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderManagementScreen.js
@@ -0,0 +1,29 @@
+odoo.define('pos_restaurant.OrderManagementScreen', function (require) {
+ 'use strict';
+
+ const OrderManagementScreen = require('point_of_sale.OrderManagementScreen');
+ const Registries = require('point_of_sale.Registries');
+
+ const PosResOrderManagementScreen = (OrderManagementScreen) =>
+ class extends OrderManagementScreen {
+ /**
+ * @override
+ */
+ _setOrder(order) {
+ if (this.env.pos.config.module_pos_restaurant) {
+ const currentOrder = this.env.pos.get_order();
+ if (currentOrder && currentOrder.uid === order.uid) {
+ this.close();
+ } else {
+ this.env.pos.set_table(order.table, order);
+ }
+ } else {
+ super._setOrder(order);
+ }
+ }
+ };
+
+ Registries.Component.extend(OrderManagementScreen, PosResOrderManagementScreen);
+
+ return OrderManagementScreen;
+});
diff --git a/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderRow.js b/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderRow.js
new file mode 100644
index 00000000000..f5a32114553
--- /dev/null
+++ b/addons/pos_restaurant/static/src/js/Screens/OrderManagementScreen/OrderRow.js
@@ -0,0 +1,17 @@
+odoo.define('pos_restaurant.OrderRow', function (require) {
+ 'use strict';
+
+ const OrderRow = require('point_of_sale.OrderRow');
+ const Registries = require('point_of_sale.Registries');
+
+ const PosResOrderRow = (OrderRow) =>
+ class extends OrderRow {
+ get table() {
+ return this.order.table ? this.order.table.name : '';
+ }
+ };
+
+ Registries.Component.extend(OrderRow, PosResOrderRow);
+
+ return OrderRow;
+});
diff --git a/addons/pos_restaurant/static/src/js/floors.js b/addons/pos_restaurant/static/src/js/floors.js
index 1276fea9f8b..b6614c07ebe 100644
--- a/addons/pos_restaurant/static/src/js/floors.js
+++ b/addons/pos_restaurant/static/src/js/floors.js
@@ -45,9 +45,9 @@ models.load_models({
// New orders are now associated with the current table, if any.
var _super_order = models.Order.prototype;
models.Order = models.Order.extend({
- initialize: function() {
+ initialize: function(attr,options) {
_super_order.initialize.apply(this,arguments);
- if (!this.table) {
+ if (!this.table && !options.json) {
this.table = this.pos.table;
}
this.customer_count = this.customer_count || 1;
@@ -192,16 +192,20 @@ models.PosModel = models.PosModel.extend({
}
},
- set_order_on_table: function() {
+ /**
+ * @param {models.Order} order order to set
+ */
+ set_order_on_table: function(order) {
var orders = this.get_order_list();
if (orders.length) {
- this.set_order(orders[0]); // and go to the first one ...
+ order = order ? orders.find((o) => o.uid === order.uid) : null;
+ this.set_order(order || orders[0]);
} else {
this.add_new_order(); // or create a new order with the current table
}
},
- sync_to_server: function(table) {
+ sync_to_server: function(table, order) {
var self = this;
var ids_to_remove = this.db.get_ids_to_remove_from_server();
@@ -229,7 +233,7 @@ models.PosModel = models.PosModel.extend({
}).catch(function(reason){
self.set_synch('error');
}).finally(function(){
- self.set_order_on_table();
+ self.set_order_on_table(order);
});
},
@@ -247,8 +251,9 @@ models.PosModel = models.PosModel.extend({
*
* Switch table and make sure all nececery syncing tasks are done.
* @param {object} table.
+ * @param {models.Order|undefined} order if provided, set to this order
*/
- set_table: function(table) {
+ set_table: function(table, order) {
if(!table){
this.sync_from_server(table, this.get_order_list(), this.get_order_with_uid());
this.set_order(null);
@@ -262,7 +267,7 @@ models.PosModel = models.PosModel.extend({
this.set_order(null);
} else {
this.table = table;
- this.sync_to_server(table);
+ this.sync_to_server(table, order);
}
},
diff --git a/addons/pos_restaurant/static/src/xml/Chrome.xml b/addons/pos_restaurant/static/src/xml/Chrome.xml
deleted file mode 100644
index ee29abe2e36..00000000000
--- a/addons/pos_restaurant/static/src/xml/Chrome.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<templates id="template" xml:space="preserve">
-
- <t t-name="Chrome" t-inherit="point_of_sale.Chrome" t-inherit-mode="extension" owl="1">
- <xpath expr="//OrderSelector" position="attributes">
- <attribute name="t-if">mainScreen.name !== 'FloorScreen'</attribute>
- </xpath>
- <xpath expr="//OrderSelector" position="after">
- <div t-else="" class="order-selector"></div>
- </xpath>
- </t>
-
-</templates>
diff --git a/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderList.xml b/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderList.xml
new file mode 100644
index 00000000000..7960710260f
--- /dev/null
+++ b/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderList.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="OrderList" t-inherit="point_of_sale.OrderList" t-inherit-mode="extension" owl="1">
+ <xpath expr="//div[hasclass('order-row')]//div[hasclass('customer')]" position="after">
+ <div t-if="env.pos.config.module_pos_restaurant" class="header table">
+ Table
+ </div>
+ </xpath>
+ </t>
+
+</templates>
diff --git a/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderRow.xml b/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderRow.xml
new file mode 100644
index 00000000000..3006e5bfb42
--- /dev/null
+++ b/addons/pos_restaurant/static/src/xml/Screens/OrderManagementScreen/OrderRow.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="OrderRow" t-inherit="point_of_sale.OrderRow" t-inherit-mode="extension" owl="1">
+ <xpath expr="//div[hasclass('order-row')]//div[hasclass('customer')]" position="after">
+ <div t-if="env.pos.config.module_pos_restaurant" class="item table">
+ <t t-esc="table" />
+ </div>
+ </xpath>
+ </t>
+
+</templates>
diff --git a/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js b/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js
index 924d34010e4..102ff280977 100644
--- a/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js
+++ b/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js
@@ -16,7 +16,7 @@ odoo.define('pos_restaurant.tour.ControlButtons', function (require) {
// Test TransferOrderButton
FloorScreen.do.clickTable('T2');
- ProductScreen.exec.order('Water', '5.0', '2.0');
+ ProductScreen.exec.addOrderline('Water', '5.0', '2.0');
ProductScreen.do.clickTransferButton();
FloorScreen.do.clickTable('T4');
ProductScreen.do.clickOrderline('Water', '5.0', '2.0');
@@ -37,7 +37,7 @@ odoo.define('pos_restaurant.tour.ControlButtons', function (require) {
TextAreaPopup.do.inputText('test note');
TextAreaPopup.do.clickConfirm();
ProductScreen.check.orderlineHasNote('Water', '5.0', 'test note');
- ProductScreen.exec.order('Water', '8', '1.1');
+ ProductScreen.exec.addOrderline('Water', '8', '1.1');
ProductScreen.check.selectedOrderlineHas('Water', '8', '8.80');
// Test PrintBillButton
diff --git a/addons/pos_restaurant/static/tests/tours/OrderManagementScreen.tour.js b/addons/pos_restaurant/static/tests/tours/OrderManagementScreen.tour.js
new file mode 100644
index 00000000000..2a198c9e7ab
--- /dev/null
+++ b/addons/pos_restaurant/static/tests/tours/OrderManagementScreen.tour.js
@@ -0,0 +1,121 @@
+odoo.define('pos_restaurant.tour.OrderManagementScreen', function (require) {
+ 'use strict';
+
+ // This tour tests the integration of OrderManagementScreen
+ // to some pos_restaurant features.
+
+ const { makeFullOrder } = require('point_of_sale.tour.CompositeTourMethods');
+ const { Chrome } = require('pos_restaurant.tour.ChromeTourMethods');
+ const {
+ OrderManagementScreen,
+ } = require('point_of_sale.tour.OrderManagementScreenTourMethods');
+ const { FloorScreen } = require('pos_restaurant.tour.FloorScreenTourMethods');
+ const { ProductScreen } = require('pos_restaurant.tour.ProductScreenTourMethods');
+ const { getSteps, startSteps } = require('point_of_sale.tour.utils');
+ var Tour = require('web_tour.tour');
+
+ // signal to start generating steps
+ // when finished, steps can be taken from getSteps
+ startSteps();
+
+ FloorScreen.do.clickTable('T2');
+
+ // make one order and check if it can be seen from the management screen.
+ makeFullOrder({ orderlist: [['Minute Maid', '5', '6']], payment: ['Cash', '30'] });
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+ OrderManagementScreen.check.orderlistHas({ orderName: '-0001', total: '30' });
+
+ // go back to create multiple unpaid orders
+ OrderManagementScreen.do.clickBack();
+
+ // create 2 unpaid orders on T2 (orders 0002 and 0003)
+ FloorScreen.do.clickTable('T2');
+ ProductScreen.exec.addMultiOrderlines(
+ ['Coca-Cola', '1', '2'],
+ ['Water', '3', '4'],
+ ['Minute Maid', '5', '6']
+ );
+ Chrome.do.newOrder();
+ ProductScreen.exec.addMultiOrderlines(['Coca-Cola', '1', '2'], ['Minute Maid', '5', '6']);
+ Chrome.do.backToFloor();
+
+ // create 2 unpaid orders on T5 (orders 0004 and 0005)
+ FloorScreen.do.clickTable('T5');
+ ProductScreen.exec.addMultiOrderlines(
+ ['Coca-Cola', '7', '8'],
+ ['Water', '9', '10'],
+ ['Minute Maid', '11', '12']
+ );
+ Chrome.do.newOrder();
+ ProductScreen.exec.addMultiOrderlines(['Coca-Cola', '13', '14'], ['Minute Maid', '15', '16']);
+ Chrome.do.backToFloor();
+
+ // check that the unpaid orders are listed in the management screen
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+ OrderManagementScreen.check.orderlistHas({ orderName: '-0002', total: '44.0' });
+ OrderManagementScreen.check.orderlistHas({ orderName: '-0003', total: '32.0' });
+ OrderManagementScreen.check.orderlistHas({ orderName: '-0004', total: '278.0' });
+ OrderManagementScreen.check.orderlistHas({ orderName: '-0005', total: '422.0' });
+
+ // select order 0003 and check if it is really in T2
+ OrderManagementScreen.do.clickOrder('-0003');
+ ProductScreen.check.isShown();
+ ProductScreen.check.totalAmountIs('32');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T2');
+
+ Chrome.do.clickOrderManagementButton();
+
+ // select order 0005 and check it it is really in T5
+ OrderManagementScreen.check.isShown();
+ OrderManagementScreen.do.clickOrder('-0005');
+ ProductScreen.check.totalAmountIs('422');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T5');
+
+ // go back to floor screen and start order management from there
+ Chrome.do.backToFloor();
+ FloorScreen.check.selectedFloorIs('Main Floor');
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+
+ // select order 0002 and check if it is really in T2
+ OrderManagementScreen.do.clickOrder('-0002');
+ ProductScreen.check.isShown();
+ ProductScreen.check.totalAmountIs('44');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T2');
+
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+
+ // select order 0004 and check if it is really in T5
+ OrderManagementScreen.do.clickOrder('-0004');
+ ProductScreen.check.isShown();
+ ProductScreen.check.totalAmountIs('278');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T5');
+
+ // transfer order 0004 to T2
+ ProductScreen.do.clickTransferButton();
+ FloorScreen.do.clickTable('T2');
+ ProductScreen.check.isShown();
+
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+
+ // select order 0004 and check if it is now in T2
+ OrderManagementScreen.do.clickOrder('-0004');
+ ProductScreen.check.isShown();
+ ProductScreen.check.totalAmountIs('278');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T2');
+
+ Chrome.do.clickOrderManagementButton();
+ OrderManagementScreen.check.isShown();
+
+ // finally, select order 0002
+ OrderManagementScreen.do.clickOrder('-0002');
+ ProductScreen.check.isShown();
+ ProductScreen.check.totalAmountIs('44');
+ Chrome.check.backToFloorTextIs('Main Floor', 'T2');
+
+ Tour.register('PosResOrderManagementScreenTour', { test: true, url: '/pos/web' }, getSteps());
+});
diff --git a/addons/pos_restaurant/static/tests/tours/SplitBillScreen.tour.js b/addons/pos_restaurant/static/tests/tours/SplitBillScreen.tour.js
index 07147a70624..82e783dbcc7 100644
--- a/addons/pos_restaurant/static/tests/tours/SplitBillScreen.tour.js
+++ b/addons/pos_restaurant/static/tests/tours/SplitBillScreen.tour.js
@@ -14,9 +14,9 @@ odoo.define('pos_restaurant.tour.SplitBillScreen', function (require) {
startSteps();
FloorScreen.do.clickTable('T2');
- ProductScreen.exec.order('Water', '5', '1.2');
- ProductScreen.exec.order('Minute Maid', '3', '1.2');
- ProductScreen.exec.order('Coca-Cola', '1', '1.2');
+ ProductScreen.exec.addOrderline('Water', '5', '1.2');
+ ProductScreen.exec.addOrderline('Minute Maid', '3', '1.2');
+ ProductScreen.exec.addOrderline('Coca-Cola', '1', '1.2');
ProductScreen.do.clickSplitBillButton();
// Check if the screen contains all the orderlines
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/BillScreenTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/BillScreenTourMethods.js
index 1bb976cd8a2..9f831367aac 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/BillScreenTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/BillScreenTourMethods.js
@@ -26,5 +26,5 @@ odoo.define('pos_restaurant.tour.BillScreenTourMethods', function (require) {
}
}
- return { Do, Check, BillScreen: createTourMethods('BillScreen', Do, Check) };
+ return createTourMethods('BillScreen', Do, Check);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js
index 696b1d793c0..d60e39864cc 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/ChromeTourMethods.js
@@ -29,8 +29,5 @@ odoo.define('pos_restaurant.tour.ChromeTourMethods', function (require) {
class Execute {}
- return {
- Do: DoExt,
- Chrome: createTourMethods('Chrome', DoExt, Check, Execute),
- };
+ return createTourMethods('Chrome', DoExt, Check, Execute);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/FloorScreenTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/FloorScreenTourMethods.js
index ce64f8cb3d3..6895dc3e257 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/FloorScreenTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/FloorScreenTourMethods.js
@@ -129,10 +129,5 @@ odoo.define('pos_restaurant.tour.FloorScreenTourMethods', function (require) {
class Execute {}
- return {
- Do,
- Check,
- Execute,
- FloorScreen: createTourMethods('FloorScreen', Do, Check, Execute),
- };
+ return createTourMethods('FloorScreen', Do, Check, Execute);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/ProductScreenTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/ProductScreenTourMethods.js
index f14434ec705..decd30c4a1b 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/ProductScreenTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/ProductScreenTourMethods.js
@@ -66,10 +66,5 @@ odoo.define('pos_restaurant.tour.ProductScreenTourMethods', function (require) {
class ExecuteExt extends Execute {}
- return {
- Do: DoExt,
- Check: CheckExt,
- Execute: ExecuteExt,
- ProductScreen: createTourMethods('ProductScreen', DoExt, CheckExt, ExecuteExt),
- };
+ return createTourMethods('ProductScreen', DoExt, CheckExt, ExecuteExt);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/SplitBillScreenTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/SplitBillScreenTourMethods.js
index d1c802bf8d4..7f58a1fc083 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/SplitBillScreenTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/SplitBillScreenTourMethods.js
@@ -61,10 +61,5 @@ odoo.define('pos_restaurant.tour.SplitBillScreenTourMethods', function (require)
class Execute {}
- return {
- Do,
- Check,
- Execute,
- SplitBillScreen: createTourMethods('SplitBillScreen', Do, Check, Execute),
- };
+ return createTourMethods('SplitBillScreen', Do, Check, Execute);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js
index e2bbb2bde47..8f833370271 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/TextAreaPopupTourMethods.js
@@ -35,5 +35,5 @@ odoo.define('pos_restaurant.tour.TextAreaPopupTourMethods', function (require) {
}
}
- return { Do, Check, TextAreaPopup: createTourMethods('TextAreaPopup', Do, Check) };
+ return createTourMethods('TextAreaPopup', Do, Check);
});
diff --git a/addons/pos_restaurant/static/tests/tours/helpers/TextInputPopupTourMethods.js b/addons/pos_restaurant/static/tests/tours/helpers/TextInputPopupTourMethods.js
index 6ce5e4ce035..b46841c60d1 100644
--- a/addons/pos_restaurant/static/tests/tours/helpers/TextInputPopupTourMethods.js
+++ b/addons/pos_restaurant/static/tests/tours/helpers/TextInputPopupTourMethods.js
@@ -35,5 +35,5 @@ odoo.define('pos_restaurant.tour.TextInputPopupTourMethods', function (require)
}
}
- return { Do, Check, TextInputPopup: createTourMethods('TextInputPopup', Do, Check) };
+ return createTourMethods('TextInputPopup', Do, Check);
});