-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][16.0][FIX] dms: fix directory actions #277
Conversation
335a5ee
to
e2f8ed8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do something similar with the "Subdirectories" smart-button of the directory form view? That way, we will get the searchpanel to have set the folder we have clicked on so we can easily create a directory.
dms/models/directory.py
Outdated
"type": "ir.actions.act_window", | ||
"name": _("Files"), | ||
"res_model": "dms.file", | ||
"view_mode": "tree,form", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"view_mode": "tree,form", | |
"view_mode": "kanban,tree,graph,pivot,form", |
So I checked the 4 cases, over (directory/files) and (child_of/direct). Currently in both file cases the domain is wrong if there are no files. In the file/direct case, the domain is always wrong, but the search panel is correct. With my proposed change, the domain is correct in all cases but the search panel is not. So it's slightly better but not a true fix. I'll try to look more in-depth at what happens to see if there's a true solution. |
e2f8ed8
to
2755873
Compare
The previous approach was flawed I think, as the problem comes from the JS function If you look at actions like So given the current code, @vancouver29 if you have any idea, let me know! |
Related to #301 |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
If the directory is empty, the action would return all files, and the panel show all directories except for the one that triggered the action.
The file count was not consistent with the action if the directory is hidden, since its files would thus also be hidden; this field is a related on the storage, so the value is consistent for the directory and all its files.