-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
[15.0][ADD] dms_field_auto_classification: New module #288
[15.0][ADD] dms_field_auto_classification: New module #288
Conversation
7bfcd2b
to
283f688
Compare
Ready to review. |
@api.depends("model_id") | ||
def _compute_model(self): | ||
for item in self: | ||
item.model = item.model_id.model |
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.
I think this will fail with non admin permissions, as models are restricted (and the same for any model access in whole module).
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.
This field is compute sudo.
Template must be created by a user with ir.model
permissions.
I have added to tests a user with permissions in Documents: Manager to confirm that that user can do the whole process (without having permissions to ir.model
).
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.
Template must be created by a user with
ir.model
permissions.
Only maximum admins have this permission, so this should be avoided (mis_builder
for example had similar problems).
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.
I understand the problem of high permissions, but what suggestion do you propose?
Another option is not to select a model (ir.model
) and write the name (res.partner for example) directly.
0ab487f
to
7459fb6
Compare
7459fb6
to
fe805fd
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.
Maybe I'm doing something wrong, but I couldn't make it work in demo:
- I'm using your test zip
- I set the VAT numbers to two customers.
- I try to classify them
But no classification is make or folder linked to the partners...
Sorry, you need to create an Embedded DMS templates for partners (https://github.com/OCA/dms/pull/288/files#diff-d37451b07c0c0fd8b55c34a39c8ac57c604748a580057a00fc24ccdbb3525ddeR23) and then (with the corresponding button) in the form view of each partner you must create the linked folder (this is how |
This PR has the |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 92e517c. Thanks a lot for contributing to OCA. ❤️ |
New module
Locked by:
dms_field
: [15.0][ADD] hr_dms_field: New module #279dms_auto_classification
: [15.0][ADD] dms_auto_classification: New module #287Please @pedrobaeza and @chienandalu can you review it?
@Tecnativa TT46805