-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
[16.0][FIX] mis_builder: use compute_sudo on field source_aml_model_id to prevent errors due to missing permissions. #596
Conversation
Hi @sbidoul, |
40ec864
to
a3cf25a
Compare
Hi @JordiBForgeFlow. Sounds good but normally So I'm curious about the circumstances that trigger a problem related to this. |
@sbidoul hmm good point. It failed in two different environments... will check further. |
@sbidoul I reproduced the error in runboat: |
When I add compute_sudo explicity in the field definition, the error does not appear. It's a mistery! Perhaps @MiquelRForgeFlow , the master mistery solver, can help here... |
a3cf25a
to
6d738e8
Compare
The problem was not in the compute, but in the |
The user may not have permission to access to the field field_id in ir.model, which corresponds to an ir.model.fields record. | ||
It's a technical issue in nature, so we should use sudo to access it without error. |
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.
The user may not have permission to access to the field field_id in ir.model, which corresponds to an ir.model.fields record. | |
It's a technical issue in nature, so we should use sudo to access it without error. | |
Resolve a permission issue when creating report periods with a user without admin rights. |
Let's have a user friendly change log.
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.
Done
Resolve a permission issue when creating report periods with a user without admin rights.
6d738e8
to
c221650
Compare
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 25d65be. Thanks a lot for contributing to OCA. ❤️ |
Thanks @sbidoul ! |
The field source_aml_model_id refers to the ir.model, which is a technical in nature, and users should not have naturally permission to read them directly.
Test => PENDING
Don't forget to add unit tests. If your PR fixes a bug, prefer creating a separate
commit for the test so we one see that your test reproduces the bug and is fixed by the
PR.
Target branch => PENDING TO CHECK IF PREVIOUS BRANCHES ARE AFFECTED
MIS Builder is actively maintained for Odoo versions 9, 10, 11 and 12.
If your feature is applicable with the same implementation to all these versions, please
target branch 10.0. Maintainers will port it to 9, 11 and 12 soon after merging.
In the rare cases your feature or implementation is specific to an Odoo version, then
target the corresponding branch.
Changelog entry => DONE