summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/views
diff options
context:
space:
mode:
authorPaul Morelle <pmo@odoo.com>2020-10-14 13:57:54 +0000
committerJoseph Caburnay <jcb@odoo.com>2020-10-15 06:10:47 +0000
commit063e617a832d582d460dee0fcb54d837f3cafb1c (patch)
tree3c83a375171603adde6f9bfb2273de30264c6cb6 /addons/point_of_sale/views
parentf7ca48e9d1ff56ae53ab156114f9dc29534ac3f6 (diff)
[FIX] point_of_sale: avoid Gui undefined when connection failed
Since odoo/odoo@c6397ab3b3654da336a4269a81d5d91016baf520, the printer.js file has been refactored, and if the connection to the IoTBox failed, the error popup could not be displayed because Gui was undefined. Steps to reproduce on the runbot: - Configure your POS session with an IoTBox with receipt printer and cashdrawer - Open your POS session - Skip the connection to the IoTBox - Proceed to payment - Open the cashbox - Error: Gui is not defined This commit fixes the behavior by displaying the error properly. In line with this fix, we are also putting the printing assets back in the point_of_sale.assets because pos printing in the backend is no longer needed. closes odoo/odoo#60006 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/point_of_sale/views')
-rw-r--r--addons/point_of_sale/views/pos_assets_common.xml5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/point_of_sale/views/pos_assets_common.xml b/addons/point_of_sale/views/pos_assets_common.xml
index 7b9683c0505..c648299b246 100644
--- a/addons/point_of_sale/views/pos_assets_common.xml
+++ b/addons/point_of_sale/views/pos_assets_common.xml
@@ -9,6 +9,7 @@
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos_receipts.css"/>
<link rel="stylesheet" type="text/less" href="/web/static/src/scss/fontawesome_overridden.scss"/>
+ <script type="text/javascript" src="/point_of_sale/static/lib/html2canvas.js"></script>
<script type="text/javascript" src="/point_of_sale/static/lib/backbone/backbone.js"></script>
<script type="text/javascript" src="/point_of_sale/static/lib/waitfont.js"></script>
<script type="text/javascript" src="/point_of_sale/static/lib/sha1.js"></script>
@@ -22,6 +23,7 @@
<script type="text/javascript" src="/point_of_sale/static/src/js/models.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/keyboard.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/barcode_reader.js"></script>
+ <script type="text/javascript" src="/point_of_sale/static/src/js/printers.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/Gui.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/PopupControllerMixin.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/ControlButtonsMixin.js"></script>
@@ -107,10 +109,7 @@
<template id="point_of_sale.assets_backend" name="hr assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/scss" href="/point_of_sale/static/src/scss/pos_dashboard.scss"/>
- <link rel="stylesheet" href="/point_of_sale/static/src/css/pos_receipts.css"/>
<script type="text/javascript" src="/point_of_sale/static/src/js/tours/point_of_sale.js"></script>
- <script type="text/javascript" src="/point_of_sale/static/src/js/printers.js"></script>
- <script type="text/javascript" src="/point_of_sale/static/lib/html2canvas.js"></script>
<script type="text/javascript" src="/point_of_sale/static/src/js/debug_manager.js"></script>
</xpath>
</template>