[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>
This commit is contained in:
Pierre Masereel
2019-10-03 14:20:17 +00:00
parent 4cc4c9dac4
commit 47b42e7f28
+1 -1
View File
@@ -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();
});
});
},