summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-12-15 14:41:37 +0100
committerMartin Trigaux <mat@odoo.com>2016-12-15 14:41:37 +0100
commite0c9b9c2cd4f0a2d965d27b4f241d941e5bcd8a7 (patch)
tree8e7685b79d056eda6dd45f9b30c11736d5892458 /addons
parent8d43fc46f29c343bf3d1f8c6c5a09ff1a0de58e9 (diff)
[IMP] point_of_sale: more informative error
The pos loading crashes in the following scenario. 1. start selling a product (order line the localstorage) 2. archive or delete the product in backend 3. reload the pos session The POS is interrupted with not much information. Give an error a bit more meaningful.
Diffstat (limited to 'addons')
-rw-r--r--addons/point_of_sale/static/src/js/models.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 219f6c75cfa..3880049e6d3 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1081,7 +1081,8 @@ exports.Orderline = Backbone.Model.extend({
init_from_JSON: function(json) {
this.product = this.pos.db.get_product_by_id(json.product_id);
if (!this.product) {
- console.error('ERROR: attempting to recover product not available in the point of sale');
+ console.error('ERROR: attempting to recover product ID', json.product_id,
+ 'not available in the point of sale. Correct the product or clean the browser cache.');
}
this.price = json.price_unit;
this.set_discount(json.discount);