[FIX] point_of_sale: allow opening the pos interface
The `cash_control` constraint [1] is only relevant when the field
`cash_control` is modified. Do not check it when opening the pos UI.
[1] added by 733fb360d2
This commit is contained in:
@@ -461,7 +461,7 @@ class PosConfig(models.Model):
|
||||
""" open the pos interface """
|
||||
self.ensure_one()
|
||||
# check all constraints, raises if any is not met
|
||||
self._validate_fields(self._fields)
|
||||
self._validate_fields(set(self._fields) - {"cash_control"})
|
||||
return {
|
||||
'type': 'ir.actions.act_url',
|
||||
'url': '/pos/web/',
|
||||
|
||||
Reference in New Issue
Block a user