From 0acc4a3439786f916943ab8014c0dad0a03a95a7 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 14 Apr 2018 19:17:05 +0200 Subject: [PATCH] Don't block when no read access on pos.config --- product_print_zpl_barcode/wizard/product_print_zpl_barcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py b/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py index aff563c..866aa53 100644 --- a/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py +++ b/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py @@ -28,7 +28,7 @@ class ProductPrintZplBarcode(models.TransientModel): "Product '%s' doesn't have a barcode") % product.display_name) nomenclature = self.env.ref('barcodes.default_barcode_nomenclature') company = self.env.user.company_id - posconfig = self.env['pos.config'].search( + posconfig = self.env['pos.config'].sudo().search( [('company_id', '=', company.id)], limit=1) if posconfig: pricelist = posconfig.pricelist_id