The `eval` attribute is statically evaluated when the record is loaded,
at module installation time. I'm not sure, but based on the rest of your
example it seems you want a dynamic value to be used for filtering records.
A few solutions come to mind which may perhaps better suit your needs:
- Dynamic actions: link a menuitem to a server action that executes some
python code to load the values you need from the database, then returns
a dynamic action dict (by assigning a value to an 'action' variable)
with the appropriate context/domain you need. You could see this as a
dynamic action loader.
- Dynamic search views: alternatively, override the fields_view_get()
method of purchase.order to dynamically customize the search view by
adding an appropriate `filter` element (using any DB value you like).
This is less elegant because it requires some XML-level tinkering with
the result of the super() call, but is an effective way to implement