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

[ADD] dms_partner_attachment_link: add module #349

Open
wants to merge 4 commits into
base: 16.0
Choose a base branch
from

Conversation

dmitriypaulov
Copy link

This module adds "DMS Attachments" smart button to the partner's form leading to a set of related, stored as attachments DMS files

@pedrobaeza
Copy link
Member

Which is the difference with https://github.com/OCA/dms/tree/15.0/dms_attachment_link ?

@pedrobaeza pedrobaeza added this to the 16.0 milestone Jul 2, 2024
@pedrobaeza
Copy link
Member

And why not using dms_field for this?

@dmitriypaulov
Copy link
Author

Which is the difference with https://github.com/OCA/dms/tree/15.0/dms_attachment_link ?

The difference is that dms_attachment_link adds a wizard for files quick creation from records of specific models. This module just adds a shortcut to see partner related files. I hope that is clear, please let me know if I'm wrong

@pedrobaeza
Copy link
Member

Well, not really clear the usefulness of this, but it's OK, don't worry.

Copy link
Member

@ivs-cetmix ivs-cetmix left a comment

Choose a reason for hiding this comment

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

Rather a question yet...

"domain": [
("res_id", "=", self.id),
("res_model", "=", "res.partner"),
("storage_id.save_type", "=", "attachment"),
Copy link
Member

Choose a reason for hiding this comment

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

What is this storage_id domain condition for?
Shouldn't all the files be shown no matter where they are stored?

Copy link
Author

Choose a reason for hiding this comment

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

From the task description: "Keep in mind that we can find related partners only for files that are stored in the Attachment Storages"

Copy link
Author

Choose a reason for hiding this comment

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

@ivs-cetmix see also readme/DESCRIPTION.md file

Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

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

Although I understand the need for this module, doing so will always make a new one necessary for almost any model and I think that is not a good approach.

My approach to this would be more transversal (maybe add it even in the dms module), add an action automatically in the form view of a record (only if there is some document: folder or file) called "View Documens" (or similar) and that when clicked we go to the "Files" action (kanban view) with the folder of the record selected. what do you think?

@dmitriypaulov dmitriypaulov force-pushed the 16.0-t3758-dms_partner_attachment_link-add_module branch from c1e2297 to 5b76268 Compare July 15, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants