I have a many2many that shows invoice records and a many2one where I select the invoices that are established within that many2many so that they are transferred to a second many2many
the records are translated correctly but I need to show a message when the selected record in the many2one is not set to the first many2many.
'''This is what I did in an automated action:'''
for facturas in record.x_studio_many2one_field_GPKc7:
for rec in record.x_studio_factura_cliente_2:
if record.x_studio_factura_cliente_2 and facturas.name in rec.name:
record['x_studio_procesado_factura_3'] = [(4,facturas.id, 0)]
record['x_studio_factura_cliente_2'] = [(2,facturas.id)]
else:
raise UserError('Error')