Repository navigation
[19.0][FIX] dms: Fix upload file process - #528
Conversation
0a9b86d to
27f4cd0
Compare
27f4cd0 to
9a64716
Compare
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
OK, I don't get the traceback anymore, but when I try to upload a file to a folder whose storage is attachment, the message A file must have model and resource ID in attachment storage is displayed.
How can I upload a file to this folder? Or what is the purpose of these folder/storage types?
Please clarify, because if I try to set res_id, the field is read-only. I'm not sure I understand this flow.
2026-10-20.08-45-56.mp4
Something similar happens when I try to create a new subfolder inside a folder that uses attachment as its storage type: I can't create the folder, and I can't set res_id either.
I can only upload files if I go to a record of this model (res.partner in the example) and attach a file there. At that moment, a new folder with the res_id is created automatically. I understand this is the expected flow, but in that case, the New and Upload buttons in the Documents kanban view should be disabled when the storage type is attachment and the folder doesn't have a res_model and res_id. This would prevent users from trying to upload files when it's not allowed.
2026-10-20.08-55-03.mp4
|
We have already clarified internally the reason for the behavior you describe: it is “intentional” that you cannot create directories linked to a record for UX reasons; they will be created automatically when an attachment linked to that record is created (for example, in a partner). |
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 7b510bd. Thanks a lot for contributing to OCA. ❤️ |
Fix upload file process
Related to #517 (review)
Please @carlos-lopez-tecnativa can you review it?
@Tecnativa