so i have a field named "delay_id" in purchase order line and the field is editable and the value cannot surpass field value "delay" in product supplier info, i tried this code
@api.constrains('delay_id')
def_check_delay(self):
forrecordinself:
dly = self.env['product.supplierinfo'].search([('delay', ',record.delay_id),('id', '=',record.id)])
ifdly:
raise ValidationError("")
but the value can still surpass the value in product supplier info .
the "delay" field is from another module