summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2019-10-03 14:20:17 +0000
committerPierre Masereel <pim@odoo.com>2019-10-03 14:20:17 +0000
commit47b42e7f28790cbb7d574a0c9d00704d4cf7ffff (patch)
tree4ffefc4de9c80946ca4f75cf884e7d894fbf54a0
parent4cc4c9dac46f486414007ac3d8b5694e547d05b1 (diff)
[FIX] point_of_sale: load pos without tax
It was impossible to load the POS when no tax were existing because the promise is resolved in the each loop instead of after. So we've moved it after the loop which is its correct place. closes odoo/odoo#37898 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
-rw-r--r--addons/point_of_sale/static/src/js/models.js2
1 files changed, 1 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 cc00ad884ee..63f7a12816f 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -248,8 +248,8 @@ exports.PosModel = Backbone.Model.extend({
}).then(function (taxes) {
_.each(taxes, function (tax) {
self.taxes_by_id[tax.id].amount = tax.amount;
- resolve();
});
+ resolve();
});
});
},