diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-13 13:13:11 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-13 13:13:11 +0200 |
| commit | 1da064a1d34b48ff23d8cdf5a1c189c8bbb4eb64 (patch) | |
| tree | d832553531790ca342cda3b03e6c44097717ff43 /addons/pos_cache/models/pos_cache.py | |
| parent | 119ae9b5dcaea577bfd91b36565b764990b9de02 (diff) | |
| parent | 8ee9024a4c888647df9e18861fe5e58b68947469 (diff) | |
[MERGE] forward port branch saas-16 up to 8ee9024a4c8
Diffstat (limited to 'addons/pos_cache/models/pos_cache.py')
| -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 bc6523c3eb5..10f617fe729 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(json.dumps(res)), |
