summaryrefslogtreecommitdiff
path: root/addons/pos_cache/static/src/js/pos_cache.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/pos_cache/static/src/js/pos_cache.js')
-rw-r--r--addons/pos_cache/static/src/js/pos_cache.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/pos_cache/static/src/js/pos_cache.js b/addons/pos_cache/static/src/js/pos_cache.js
index 705bd1e66fb..6a26143cc6e 100644
--- a/addons/pos_cache/static/src/js/pos_cache.js
+++ b/addons/pos_cache/static/src/js/pos_cache.js
@@ -37,8 +37,11 @@ models.PosModel = models.PosModel.extend({
args: [self.pos_session.config_id[0], product_fields, product_domain],
});
self.chrome.loading_message(_t('Loading') + ' product.product', 1);
- return records.then(function (product) {
- self.db.add_products(product);
+ return records.then(function (products) {
+ self.db.add_products(_.map(products, function (product) {
+ product.categ = _.findWhere(self.product_categories, {'id': product.categ_id[0]});
+ return new models.Product({}, product);
+ }));
});
});
},