From 5c93e371df282e9e7206ea6ab59c1244c2d73bca Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Thu, 2 Dec 2021 14:55:45 +0000 Subject: [PATCH] [FIX] pos_cache: error when loading missing products As part of loading orders, we need to make sure we load the missing products. This process relies on the existence of the `product.product` model declaration in the PosModel. However, since we are loading products differently here in pos_cache, the `product.product` model is removed from the list of models. We are now return the `product.product` model to the list of models after loading. closes odoo/odoo#80844 X-original-commit: ccac36b353fb1f1ffc1905808765464c0cbba3e1 Signed-off-by: Trinh Jacky (trj) Signed-off-by: Joseph Caburnay (jcb) --- addons/pos_cache/static/src/js/pos_cache.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/pos_cache/static/src/js/pos_cache.js b/addons/pos_cache/static/src/js/pos_cache.js index 48dfbd4a745..a0186e177b0 100644 --- a/addons/pos_cache/static/src/js/pos_cache.js +++ b/addons/pos_cache/static/src/js/pos_cache.js @@ -82,6 +82,8 @@ models.PosModel = models.PosModel.extend({ return new Promise((resolve, reject) => { next(resolve, reject); }); + }).then(() => { + self.models.push(self.product_model); }); }, });