summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static
diff options
context:
space:
mode:
authorJoseph Caburnay <jcb@odoo.com>2020-08-17 14:02:34 +0000
committerJoseph Caburnay <jcb@odoo.com>2020-08-17 14:08:29 +0000
commit9cf8da90d5ba1ed4ee924659dea1bd4313dcc3c6 (patch)
treeea85bc23c283db9bb3bb4bd8ca8ae7b4cd95b98d /addons/pos_restaurant/static
parent4bd9ced6bfd833199d0380de61b1a5012b470890 (diff)
[FIX] pos_restaurant: should show product screen after tip screen
If floor screen (iface_floorplan) is not active in the pos.config, product screen should follow the tip screen and not an error. closes odoo/odoo#55998 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/Screens/TipScreen.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/addons/pos_restaurant/static/src/js/Screens/TipScreen.js b/addons/pos_restaurant/static/src/js/Screens/TipScreen.js
index efbd83ea007..64500395cd1 100644
--- a/addons/pos_restaurant/static/src/js/Screens/TipScreen.js
+++ b/addons/pos_restaurant/static/src/js/Screens/TipScreen.js
@@ -66,10 +66,16 @@ odoo.define('pos_restaurant.TipScreen', function (require) {
}
goNextScreen() {
this.env.pos.get_order().finalize();
- this.showScreen(this.nextScreen);
+ const { name, props } = this.nextScreen;
+ this.showScreen(name, props);
}
get nextScreen() {
- return 'FloorScreen';
+ if (this.env.pos.config.module_pos_restaurant && this.env.pos.config.iface_floorplan) {
+ const table = this.env.pos.table;
+ return { name: 'FloorScreen', props: { floor: table ? table.floor : null } };
+ } else {
+ return { name: 'ProductScreen' };
+ }
}
}
TipScreen.template = 'pos_restaurant.TipScreen';