-
-
Notifications
You must be signed in to change notification settings - Fork 379
[9.0] Improve document_page_approval #163
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
Conversation
max3903
left a comment
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.
Same as #162, bump the version
|
Done! |
|
Pushed some new changes, including a FIX of a critical bug that was undetected before. |
| am_i_approver = fields.Boolean( | ||
| related='page_id.am_i_approver' | ||
| related='page_id.am_i_approver', | ||
| related_sudo=False, |
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.
Took me a while to figure it out. Turns out related fields are computed as sudo() by default 👎
| 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 |
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 is actually an improvement, not a FIX.
Also rewrited the code to use has_group instead of manually checking for groups_id
| <field name="perm_unlink" eval="True"/> | ||
| <field name="perm_create" eval="True"/> | ||
| </record> | ||
|
|
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.
Now, only Approvers can see other people pending Change Requests.
|
@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.
|
Done! |
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