diff options
| author | Paul Morelle <pmo@odoo.com> | 2020-10-14 13:57:54 +0000 |
|---|---|---|
| committer | Joseph Caburnay <jcb@odoo.com> | 2020-10-15 06:10:47 +0000 |
| commit | 063e617a832d582d460dee0fcb54d837f3cafb1c (patch) | |
| tree | 3c83a375171603adde6f9bfb2273de30264c6cb6 /addons/point_of_sale/static/src/js | |
| parent | f7ca48e9d1ff56ae53ab156114f9dc29534ac3f6 (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/static/src/js')
| -rw-r--r-- | addons/point_of_sale/static/src/js/printers.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/point_of_sale/static/src/js/printers.js b/addons/point_of_sale/static/src/js/printers.js index 4c2b465828d..1f2331abf1f 100644 --- a/addons/point_of_sale/static/src/js/printers.js +++ b/addons/point_of_sale/static/src/js/printers.js @@ -3,6 +3,7 @@ odoo.define('point_of_sale.Printer', function (require) { var Session = require('web.Session'); var core = require('web.core'); +const { Gui } = require('point_of_sale.Gui'); var _t = core._t; // IMPROVEMENT: This is too much. We can get away from this class. |
