-
-
Notifications
You must be signed in to change notification settings - Fork 187
[IMP] dms: Add functionality to assign linked attachments record ID its value #401
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
base: 18.0
Are you sure you want to change the base?
Conversation
785f62c
to
9b2e2d7
Compare
…ts value Similar to dms project we can select the model we want and then via a wizard we can select the record id/ids of the same kind of the chosen model.
9b2e2d7
to
e95e9d7
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.
IMO this is not necessary, it adds code to do something that should not be necessary because it is already done automatically: #404 (comment)
excuse me, how can this be done automatically? |
Just create an attachment linked to a record ( |
If the field in the view of dms.file is readonly: https://github.com/OCA/dms/blob/18.0/dms/views/dms_file.xml#L444 and is defined in the backend as related WITHOUT being editable there: from the code I see it is impossible to assign the res_id a value from the dms.file form view. |
@victoralmau I exerted some effort to understand the security of dms, and still need to understand it more so when I introduce my update it becomes smooth. but for this PR, I see it very clear that a field is readonly and no way to create it in the GUI. Shall I close this PR and finish discussion or we could have this new feature here and maybe in similar cases somewhere else? |
I think first of all, is this change necessary? The What is the use case why you need to create the directory "manually" before? That would really be the initial question. The security issue (there is no problem about it) is “simple” for files/directories that are linked to an attachment type storage with the “Inherit permissions from related record” checkbox checked, any user (portal or not) will be able to see the files/directories of a record, if they can see that record ( |
usecase is just each customer should have access to exemption documents they sign or upload or send by email or even I add them to their related directories. here what I like that each partner can have their own directory, but I don't understand how you create a folder for each partner at least this is not explained in the readme. you and pedro told me once I upload attachment it will be in partner dir., but how you create the dir. without a required field and readonly at the same time. for the access security, it is fine but I like to add access rules it will minimize the need to create a single group for each single user. Please write to me steps from scratch to create a folder for Joel portal or any demo partner or record a video and I will continue working on. I need to have a smooth update and minimize code and make it efficient. in dms.dir I am blocked and in dms.file and even in the attachment dashboard due to res_id, maybe you have something I did not understand yet. |
thank you very much, I guess I will update the readme with a use case for very new users. I will work on that if I don't need updating or not. |
Thanks for the explanation of using the dms_attachment_link. I just know how to use it :) |
I think it is important to clarify that the above explanation is ONLY of the The |
Similar to dms project we can select the model we want and then via a wizard, we can select the record id/ids of the same kind of the chosen model.
In the followers section I add the record of selected id there
if the model is Partners
Based on the issue I raised in #399 that the field is readonly and is required on the same time. This commit is solving the problem and making it no problem at all in the UI.