Skip to content

Conversation

@lmignon
Copy link
Contributor

@lmignon lmignon commented Jun 3, 2025

If you need to link some specific models to a specific folder into an external filesystem and be able to manage the content of this folder from the model form view, the fs_folder addon is for you.
image

With the contribution of @etobella

lmignon and others added 30 commits March 21, 2025 17:53
* Sort char and text using locale and in a case and accent incensitive way
* When soring on name, keep directory first into the list
* Allows to define a comparison method into the field definition used if specified into the sort method
@lmignon lmignon force-pushed the 18.0-add-fs-folder branch from 8220e6b to 2fc0260 Compare June 3, 2025 11:34
@lmignon lmignon mentioned this pull request Jun 3, 2025
1 task
@etobella
Copy link
Member

etobella commented Jun 4, 2025

@lmignon on the rename, all commit history will be lost on next version. There are options to rename the history or you can just squash all commits together and add coauthors in order to simplify everything (second option is probably the easier one)

@lmignon
Copy link
Contributor Author

lmignon commented Jun 4, 2025

@lmignon on the rename, all commit history will be lost on next version. There are options to rename the history or you can just squash all commits together and add coauthors in order to simplify everything (second option is probably the easier one)

No need to do it 😏; the path into the history is also renamed...
image

When creating a storage used to store fs folder content, disbale possible existing one created by others addons
@lmignon lmignon force-pushed the 18.0-add-fs-folder branch from 28ec119 to 90de015 Compare June 8, 2025 09:30
lmignon added 3 commits June 10, 2025 14:23
…fied

This action is usefull when an action from within odoo update the content and the widget need to be refreshed
Uses the TransactionCase class in place of BaseCommon as base class for tests to avoid error when tests are run on an database where the account module is installed but not loaded into the registry. The account addon adds a required column on the res.partner model with a default value but if the module is not loaded into the registry when a res.partner record is created, the creation fails with an integrity error
@lmignon lmignon force-pushed the 18.0-add-fs-folder branch from 36c8f7c to c715e12 Compare June 11, 2025 15:22
@lmignon lmignon force-pushed the 18.0-add-fs-folder branch from 422c0b9 to ef5d65c Compare August 27, 2025 06:43
The hyphen is a valid character in the name of a directory or file.
@lmignon lmignon force-pushed the 18.0-add-fs-folder branch from ef5d65c to 256da4b Compare August 27, 2025 06:49
@youring
Copy link
Contributor

youring commented Aug 28, 2025

Thank you for creating this very useful module! It seems very similar to Alfodoo project. Will version control be added in the future?

Tested on runboat, found two points:
If create a folder for the first time,
ValueError: No default storage found for the content of the external filesystem fields for model res.partner and field fs_folder_field. Please set a default storage in the filesystem storage configuration.
Go to FS Storage, set Odoo Filesystem Backend as Default For Fs Contents, now it's fixed.
Should this be automatically set by demo module?

It seems preview is handled by the standalone SimpleDialog method, image is not centered, with white frame, and it can't be closed with the ESC key.
preview_img_not_centered_white_bg
And it's unable to navigate multiple files in current folder using the left and right arrow keys like Odoo core's preview.
A dumb question: for consistency, can we leverage Odoo core's preview component for attachment preview to replace SimpleDialog here?

@lmignon
Copy link
Contributor Author

lmignon commented Aug 28, 2025

Thank you for creating this very useful module! It seems very similar to Alfodoo project.

Same company, same authors ...

Will version control be added in the future?

The “fs_folder” module allows you to manage content stored in file systems external to Odoo from within Odoo. In its basic version, it focuses solely on cross-functional features for all file systems supported by the Python fsspecs library, which we use as an abstraction layer for the various file systems. Document versioning is not one of these standard features and is therefore not offered. However, the module has been designed to be easily extensible. An initial specialisation offered concerns more specific support for Microsoft Drive ( and SharePoint) directories. In the latter case, the target file system offers document version management features. These could be exposed in this specific context, even if it is not currently a requirement expressed by our customers. But do we really need it into Odoo? Indeed, It's very easy for users to jump from Odoo to a specific file or directory in the Microsoft application that manages these items and benefit from these advanced features without having to complicate the implementation in Odoo.

Tested on runboat, found two points: If create a folder for the first time, ValueError: No default storage found for the content of the external filesystem fields for model res.partner and field fs_folder_field. Please set a default storage in the filesystem storage configuration. Go to FS Storage, set Odoo Filesystem Backend as Default For Fs Contents, now it's fixed. Should this be automatically set by demo module?

It could

It seems preview is handled by the standalone SimpleDialog method, image is not centered, with white frame, and it can't be closed with the ESC key. preview_img_not_centered_white_bg And it's unable to navigate multiple files in current folder using the left and right arrow keys like Odoo core's preview. A dumb question: for consistency, can we leverage Odoo core's preview component for attachment preview to replace SimpleDialog here?

We have not found a simple way to use the native Odoo component. The preview could be improved, and all contributions are welcome. At this stage, we are not using the basic version of the fs_folder addon; we are using the fs_folder_ms_drive addon. Nevertheless, we have taken care to design this new document management approach to make it as modular as possible. As mentioned above, fs_folder is the basic component, and although it already offers many features, some of them, such as the preview, are offered in this first draft in a simple form because they are not used in our projects (in the specialization for ms_drive, we use the preview system provided by Microsoft).

@lmignon
Copy link
Contributor Author

lmignon commented Sep 14, 2025

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-480-by-lmignon-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 14, 2025
Signed-off-by lmignon
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 18.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 18.0-ocabot-merge-pr-480-by-lmignon-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit bc04134 into OCA:18.0 Sep 14, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon deleted the 18.0-add-fs-folder branch September 14, 2025 08:01
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.

5 participants