Skip to content
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][MIG] sales_team_security: Migration to version 16.0 #2602

Merged
merged 24 commits into from
Aug 8, 2023

Conversation

Yadier-Tecnativa
Copy link
Contributor

@Tecnativa TT43248
Supersede for #2458

@pedrobaeza
Copy link
Member

The previous PR was not incorrect. The translations suggestions are just improvements that can be done later, so you are not bringing too much extra value, and you are removing the authorship of the previous contributor, discouraging future contributions. If you want to "finish" the migration here, please respect the migration commit authorship, add the translation on top, and also squash administrative commits: https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests

@Yadier-Tecnativa
Copy link
Contributor Author

Thanks @pedrobaeza , I'll be more careful next time, now I'll do what you suggested and I'll fix it.

@pedrobaeza
Copy link
Member

I still don't see the commits from the other author.

@Yadier-Tecnativa Yadier-Tecnativa force-pushed the 16.0-mig-sales_team_security branch 2 times, most recently from 04fe275 to 591e0a0 Compare July 18, 2023 03:32
@Yadier-Tecnativa
Copy link
Contributor Author

I still don't see the commits from the other author.

Done

@pedrobaeza
Copy link
Member

You are still not preserving the commit authorship. It's not enough with cherry-picking the commit. You have to replace it in your commit history.

@Yadier-Tecnativa Yadier-Tecnativa force-pushed the 16.0-mig-sales_team_security branch 5 times, most recently from ad19a2c to d5387c5 Compare July 20, 2023 12:31
@rafaelbn
Copy link
Member

rafaelbn commented Aug 7, 2023

/ocabot migration sales_team_security

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Aug 7, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Aug 7, 2023
97 tasks
pedrobaeza and others added 12 commits August 8, 2023 12:15
==============================
Security rules for sales teams
==============================

This module sets different permissions levels for accessing sales and CRM
records based on the sales team: customers, sales orders, leads, opportunities,
phone calls and sales teams.

It also handles the propagation of the sales team from commercial partners to
the contacts, which standard doesn't make.

Installation
============

At installation time, this module sets int all the contacts that have the sales
team empty the sales team of the parent. If you have a lot of contacts, this
operation can take a while.

Usage
=====

On the user configuration (Configuration > Users > Users), select in the
*Sales Team* section the option "See only own team". Then, the documents
mentioned before will be filtered out to have only those belonging to the
teams the user belongs to.

This is complementary to the Sales level access, but sometimes can be
incoherent depending on the combination chosen. If you chose "See Own Leads"
on _Sales_ section, marking on unmarking the sales team check will be
irrelevant, because the most restricting level, which the sales one, will
prevail.

Known issues/Roadmap
====================

* This module is designed for supporting only sales part, so someone that has
  access to other Odoo parts (for example, an accountant), shouldn't have
  this new permission, or some access errors will be found when seeing invoices
  and other documents. A _sales_team_security_account_ bridge module can be
  done for fixing this case, but not in the case of for example warehouse.
Restrict contacts by code, removing the need of manually manipulating the existing
record rules, that can also have some side effects.
- Standard procedure
- Adapt partner view
- Adapt tests
Translated using Weblate (Spanish)

Currently translated at 100.0% (4 of 4 strings)

Translation: sale-workflow-13.0/sale-workflow-13.0-sales_team_security
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sales_team_security/es/

Added translation using Weblate (Italian)

Translated using Weblate (Italian)

Currently translated at 100.0% (4 of 4 strings)

Translation: sale-workflow-13.0/sale-workflow-13.0-sales_team_security
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sales_team_security/it/
ivantodorovich and others added 12 commits August 8, 2023 12:15
…contacts + others

- For avoiding access errors on this records that are related to sales flow
- Sync salesman on parent change

Co-Authored-By: Pedro M. Baeza <pedro.baeza@tecnativa.com>
A team manager wasn't able to access to their orders if the team was
different from their team.

Whole review has been done for the rest of the channel manager rules,
and added some tests.

Migration script included.
Steps to reproduce the problem:

- Create a main contact.
- Create a child contact of the main contact, selecting a salesperson.
- Go to the main contact, and check the followers.

Expected behavior:

The main contact has the salesperson as follower. The same if editing
the child contact, the salesperson is changed.

Obtained result:

No follower for the salesperson.

That's because the `create` method is not intercepted to do the
followers synchronization.

TT39963
Currently translated at 75.0% (6 of 8 strings)

Translation: sale-workflow-15.0/sale-workflow-15.0-sales_team_security
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sales_team_security/it/
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this:

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2602-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 84f015e into OCA:16.0 Aug 8, 2023
4 of 6 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6f9bd1b. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-mig-sales_team_security branch August 8, 2023 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants