From bc1c54dd7a9c8ff80144b3878a575dd22bfcddb7 Mon Sep 17 00:00:00 2001 From: Gert Pellin Date: Fri, 16 Nov 2018 10:14:08 +0000 Subject: [PATCH] [FIX] point_of_sale: barcode nomiclature required set barcode_nomenclature_id as required field barcode nomenclature must be required because the pos session needs it to be able to work properly. Without this scanning barcodes will always give an error. closes odoo/odoo#28750 --- addons/point_of_sale/models/pos_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py index 9e130cb5dca..65b43171f43 100644 --- a/addons/point_of_sale/models/pos_config.py +++ b/addons/point_of_sale/models/pos_config.py @@ -138,7 +138,7 @@ class PosConfig(models.Model): company_id = fields.Many2one('res.company', string='Company', required=True, default=lambda self: self.env.user.company_id) barcode_nomenclature_id = fields.Many2one('barcode.nomenclature', string='Barcode Nomenclature', help='Defines what kind of barcodes are available and how they are assigned to products, customers and cashiers.', - default=lambda self: self.env.user.company_id.nomenclature_id) + default=lambda self: self.env.user.company_id.nomenclature_id, required=True) group_pos_manager_id = fields.Many2one('res.groups', string='Point of Sale Manager Group', default=_get_group_pos_manager, help='This field is there to pass the id of the pos manager group to the point of sale client.') group_pos_user_id = fields.Many2one('res.groups', string='Point of Sale User Group', default=_get_group_pos_user,