From 1826782e5172962a183c1633f93b9479e7cefd6f Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Fri, 25 Sep 2020 13:21:30 +0200 Subject: [PATCH] [FIX] pos_order_to_sale_order : make the module working if get_order() is null, that occures if pos_restaurant is installed --- pos_order_to_sale_order/static/src/js/screens.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pos_order_to_sale_order/static/src/js/screens.js b/pos_order_to_sale_order/static/src/js/screens.js index 4d4c6c68..08d18deb 100644 --- a/pos_order_to_sale_order/static/src/js/screens.js +++ b/pos_order_to_sale_order/static/src/js/screens.js @@ -35,7 +35,11 @@ odoo.define('pos_order_to_sale_order.screens', function (require) { }, is_visible: function () { - return this.pos.get_order().orderlines.length > 0; + if (this.pos.get_order()){ + return this.pos.get_order().orderlines.length > 0; + } else { + return false; + } }, });