[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) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Joseph Caburnay
2021-12-03 14:19:06 +00:00
parent dc93dbefe0
commit 5c93e371df
@@ -82,6 +82,8 @@ models.PosModel = models.PosModel.extend({
return new Promise((resolve, reject) => {
next(resolve, reject);
});
}).then(() => {
self.models.push(self.product_model);
});
},
});