[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
This commit is contained in:
Gert Pellin
2018-11-16 10:14:08 +00:00
parent 5a97faab5b
commit bc1c54dd7a
+1 -1
View File
@@ -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,