In a model I have a Reference field to link different records from different models. This works as expected. But now I want to filter down the list of records for a specific model.
So when a user select as Model ‘project.work’ (Work Effort) I want to filter out all the ‘project.work’ records which has state ‘done’. Because I don’t need them. But for other models this should not happen because some of them don’t have a field state and will fail.
Is this possible? And if so, any example available?
Hi, I know this post is quite old, but I would like to know if it’s possible to build a constraint depending on the target model of a reference field, but on a search_context instead of a domain as the post says,
Thanks.