When I change '_' for '.' an error appears.
model name in pgAdmin: irco_festivos_res_partner_rel
@api.onchange('delegacion')
def onchange_delegacion(self):
_logger.info(self.env['irco.festivos.res.partner.rel'].search([]))
Error:
KeyError: 'irco.festivos.res.partner.rel'
See this: https://www.youtube.com/watch?v=L6MxDR71_1k&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=4