[9.0] Improve document_page_approval#163
Merged
Conversation
Contributor
Author
|
Done! |
Contributor
Author
|
Pushed some new changes, including a FIX of a critical bug that was undetected before. |
ivantodorovich
commented
Apr 24, 2018
| am_i_approver = fields.Boolean( | ||
| related='page_id.am_i_approver' | ||
| related='page_id.am_i_approver', | ||
| related_sudo=False, |
Contributor
Author
There was a problem hiding this comment.
Took me a while to figure it out. Turns out related fields are computed as sudo() by default 👎
ivantodorovich
commented
Apr 25, 2018
| if approver_group_id not in user.groups_id: | ||
| # if user belongs to 'Knowledge / Manager', he can approve anything | ||
| if user.has_group('document_page.group_document_manager'): | ||
| return True |
Contributor
Author
There was a problem hiding this comment.
This is actually an improvement, not a FIX.
Also rewrited the code to use has_group instead of manually checking for groups_id
ivantodorovich
commented
Apr 25, 2018
| <field name="perm_unlink" eval="True"/> | ||
| <field name="perm_create" eval="True"/> | ||
| </record> | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Now, only Approvers can see other people pending Change Requests.
Contributor
Author
Member
|
@ivantodorovich Agree. I merged #162. Can you rebase? |
…s, and removed workflow engine.
…istory names and summary
…field on document_page
…(), hence always giving the user Approving rights.
Contributor
Author
|
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #162
Among other things, it removes the workflow engine from this module, making it easy to further migrate it to
11.0, as stated on this comment: #160 (review) by @dreisptSee commit log for details