Skip to content
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

[16.0][IMP] dms: Show all directories in searchpanel from files #280

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

victoralmau
Copy link
Member

FWP from 15.0: #274 + #276 + #278

Show all directories in searchpanel from files

In v13 the search_panel_select_range() method (https://github.com/odoo/odoo/blob/13.0/addons/web/models/models.py#L240) returned all directories, now only records that have any files in any directory are returned (this causes that directories without files are not shown).

v13:
13 0-dms

Before:
15 0-dms-antes

After:
15 0-dms-despues

Please @pedrobaeza and @chienandalu can you review it?

@Tecnativa TT46388

TT46388

[FIX] dms: Set the correct parent_id of directories in searchpanel

If the parent directory is not in all the records we should not set
parent_id because the user does not have access to parent.

TT46388

[FIX] dms: Avoid error when filtering in files

If we filter on files (for example by name) we should not apply kwargs search_domain
because we would be incorrectly filtering the directories by name, and we should
always list them all.

TT46903
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another difference I saw it's that when you're in a folder, you get all the files from the subfolders, which wasn't the original behavior, where just got the files in that folder.

Not which one I prefer though 😄

@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 5, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from David's comment.

… (similar to v15)

In the migration to 16.0 this behavior was removed by mistake and was only done in directories
OCA@05f7c67#diff-1bb531d306f9014026b38b47879cd2cc7bcb1deaebb7466327f4483a0a459fc3R25
@victoralmau
Copy link
Member Author

Another difference I saw it's that when you're in a folder, you get all the files from the subfolders, which wasn't the original behavior, where just got the files in that folder.

Not which one I prefer though 😄

Oops, thanks, that's solved (I thought this was the same as in v15).

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 👍

@pedrobaeza
Copy link
Member

/ocabot merge patch

Please check if all other changes of 15.0 are reflected in this version.

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-280-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f517fd7 into OCA:16.0 Jan 5, 2024
6 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9278094. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-imp-dms-searchpanel branch January 5, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants