12 lines
350 B
Python
12 lines
350 B
Python
from odoo import models, fields
|
|
|
|
class PosConfig(models.Model):
|
|
_inherit = 'pos.config'
|
|
|
|
is_pos_user_restricted = fields.Boolean(compute='_compute_is_pos_user_restricted')
|
|
|
|
def _compute_is_pos_user_restricted(self):
|
|
is_pos = self.env.user.is_pos_user
|
|
for config in self:
|
|
config.is_pos_user_restricted = is_pos
|