-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
[18.0][MIG] purchase_security: Migration to version 18.0 #2553
Open
Ricardo-MC
wants to merge
38
commits into
OCA:18.0
Choose a base branch
from
Ricardo-MC:18.0-mig-purchase_security
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Create "Purchase (own orders)" group. Restrict access to POs to those in the group. Add tests. TT26488
Currently translated at 100.0% (1 of 1 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_security/it/
When a Purchase User (own orders) create or edit an order, if changes Representative user to another and save it, an access error is raised. With this change, those users cannot change the default Representative, then orders are initially assigned to them, and no errors were fired.
With this improvement, order lines are also restricted for Own Reponsible Users, and this addon becomes more compatible with e.g. purchase_order_line_menu.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_security/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_security/es/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_security/it/
…permission feature TT44023
- Fine-tune security rules. - Put sequence on teams. - Edit teams on tree. - Convert purchase order team in computed writable. - Use new_test_user in tests + useless lines for shorten code. - Extra tests [FIX] purchase_security: Fine-tune security rules - PO lines domain was not adjusted - Team rule doesn't need the second operand
Similar to sales_team_security, partners are restricted according to purchase permissions: - User (own orders): If you are a follower of the partner or there is no user or you are the partner's user. - User (team orders): If you are a follower of the partner or there is no user or you are a user of your purchasing team. - Administrator: Without the restrictions of the other groups. Add 'Purchase representative' (purchase_user_id) field to partners. Add 'Purchase team' (purchase_team_id) field to partners. TT47237
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_security/
Currently translated at 100.0% (27 of 27 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_security/it/
[IMP] purchase_security/views/purchase_order_views.xml Co-authored-by: Carlos Lopez <[email protected]> [IMP] : pre-commit auto fixes
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-17.0/purchase-workflow-17.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-17-0/purchase-workflow-17-0-purchase_security/
Currently translated at 100.0% (26 of 26 strings) Translation: purchase-workflow-17.0/purchase-workflow-17.0-purchase_security Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-17-0/purchase-workflow-17-0-purchase_security/es/
Specify `@api.onchange` on `onchange_partner_id()`, because without it, the native onchange isn't triggered (I don't know why) and some fields like `fiscal_position_id` and `payment_term_id` are never updated. Others modules of purchase-workflow inherit `onchange_partner_id()` and set its onchange like this: ```@api.onchange("partner_id")``` Since the native one is: @api.onchange('partner_id', 'company_id') I honestly don't know why (excepted for "purchase_order_type", which divide them between two methods). This issue is reproducible on runboat, but you need to use the "baseonly" database. If you install some modules like "purchase_partner_incoterm", it will work again. I'm open to any better way to solve this issue
65d59f8
to
5b2559f
Compare
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.
No description provided.