Reference field domain on a target model

Hi, I’ve created a custom domain for a reference field on a target model, and I’m not really sure if its working as it should, after applying the domain, I can only select records following the domain, but if there’s a wrong record already selected before the domain was applied, it is not raising any domain error no matter what I try, which in my case is not really a problem but I want to make sure that I won’t have to manually fix data in future versions.
Thanks.

Domain is enforced only on modification. So if you add a new domain over existing data, it is only when the data is modified that it will raise an error.

That is the point of the post, in my case, the domain is not being enforced even on modification, I’ve literally tested this:
cls.origin.domain['sale.line'] = [('sale.number', '=', 'wrong_number')] (account.invoice.line model) then on an existing Invoice line I can modify whatever, there is no domain error (tested on a 7.2 clean env)

We have a test for domain on reference field so I suspect that your domain is not actually set.

Well, I’ve tried to write a workflow test with my domain set, and it is actually raising the domain error, but not when I try from the web client, also, if I try to modify the origin field (the one where the domain is applied) the domain is actually filtering records correctly.