when I try to add my custom added field restrict_create_customer to pos.config and inherit _loader_params_pos_config to add field in pos.session in odoo 16 it raises this error
my python code as fo`class PosConfigInherit(models.Model):
_inherit = ‘pos.config’
restrict_create_customer = fields.Boolean(help=”Show employee login screen”)
class ConfigSettingsInherit(models.TransientModel):
_inherit = ‘res.config.settings’
pos_module_restrict_create = fields.Boolean(related=’pos_config_id.restrict_create_customer’, readonly=False)
class PosSession(models.Model):
_inherit = ‘pos.session’
def _loader_params_pos_config(self):
result = super()._loader_params_pos_config()
result['search_params']['fields'].append('restrict_create_customer')
return result
`