I would like to check if the id of a model exists in another attribute of another table.
E.g.: I have inserted a new entry in '1st_model', which id is '1'. When I go and see the form view of this entry, a function must be able to check if there is a value '1' in the field 'example' of the table '2nd_model' (example=1 is True)..
Is it possible to write such a function?
yes quite easy. just make your second field as computed and on method of computed field use search on another table or any logic what you need.
Could you explain better, please? Thank you!