I have a One2Many that are attachments of files and directories and If an attachment have parent shoudn’t display on top level, you should have to open the parent to see it.
I have the o2m field with the attribute filter=[‘parent’, ‘=’, None]. And a Many2One with the name of the parent that is the one I use in the filter. The problem that I’m getting is that the filter is doing good, but when I click on a record of the o2m and try to fill the parent field, no options are displayed.
It is normal as the filter constraint the
parent to be
And if I want to be able to fill the m2o and filtering the o2m view how can I do it?. Also both fields are pointing to the same model.
You can not because it is illogical.
So which is the way to have a o2m tree view with different levels?
You can use
filter but the tree structure has to be created from
One2Many on the nodes.
Like it is done for packages on shipment see Use filter instead of Function field for root packages (!353) · Merge requests · Tryton / Tryton · GitLab
Yess, thanks a lot for the help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.