diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-12 18:43:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-12 18:43:14 +0200 |
| commit | 945dd32eb02f91ae2e5d0ab6545704bd19e7f05a (patch) | |
| tree | 4b1a94fa6a259222996918a0995436e3225580d1 /addons/pos_cache | |
| parent | ae9ed02f38039f17bf10777b28606d778876355d (diff) | |
| parent | 91e2264b284664067d2539d8f1d838809a0d65a2 (diff) | |
[MERGE] forward port branch saas-14 up to 91e2264b284
Diffstat (limited to 'addons/pos_cache')
| -rw-r--r-- | addons/pos_cache/models/pos_cache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/pos_cache/models/pos_cache.py b/addons/pos_cache/models/pos_cache.py index fb0fb20641e..eed948b7981 100644 --- a/addons/pos_cache/models/pos_cache.py +++ b/addons/pos_cache/models/pos_cache.py @@ -23,10 +23,10 @@ class pos_cache(models.Model): @api.one def refresh_cache(self): - products = self.env['product.product'].search(self.get_product_domain()) + Product = self.env['product.product'].sudo(self.compute_user_id.id) + products = Product.search(self.get_product_domain()) prod_ctx = products.with_context(pricelist=self.config_id.pricelist_id.id, display_default_code=False, lang=self.compute_user_id.lang) - prod_ctx = prod_ctx.sudo(self.compute_user_id.id) res = prod_ctx.read(self.get_product_fields()) datas = { 'cache': base64.encodestring(cPickle.dumps(res)), |
