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

[15.0][MIG] sales_team_security: Migration to 15.0 #2042

Merged
merged 22 commits into from
Jun 29, 2022

Conversation

cesar-tecnativa
Copy link
Contributor

@cesar-tecnativa cesar-tecnativa commented Jun 2, 2022

@Tecnativa TT36547

@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-sales_team_security branch 2 times, most recently from e6a0c74 to 26d0b26 Compare June 6, 2022 10:53
@cesar-tecnativa
Copy link
Contributor Author

@victoralmau please review

@OCA OCA deleted a comment from cesar-tecnativa Jun 6, 2022
@pedrobaeza
Copy link
Member

Please check tests that are not correct.

@cesar-tecnativa cesar-tecnativa changed the title [15.0][MIG] sales_team_security: migrate sales_team_security [15.0][MIG] sales_team_security: Migration to 15.0 Jun 6, 2022
@cesar-tecnativa

This comment was marked as outdated.

sales_team_security/models/res_partner.py Outdated Show resolved Hide resolved
sales_team_security/readme/CONTRIBUTORS.rst Outdated Show resolved Hide resolved
sales_team_security/tests/common.py Outdated Show resolved Hide resolved
sales_team_security/tests/common.py Outdated Show resolved Hide resolved
@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-sales_team_security branch 4 times, most recently from 02d94a5 to 5385a04 Compare June 8, 2022 14:18
@pedrobaeza
Copy link
Member

Please check latest commit message

@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-sales_team_security branch 4 times, most recently from 2e9bedf to 9a10822 Compare June 16, 2022 15:42
pedrobaeza and others added 4 commits June 28, 2022 10:00
==============================
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.
@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-sales_team_security branch 2 times, most recently from c9a5532 to 08439ad Compare June 28, 2022 08:16
sales_team_security/__manifest__.py Outdated Show resolved Hide resolved
sales_team_security/models/ir_rule.py Outdated Show resolved Hide resolved
sales_team_security/security/sales_team_security.xml Outdated Show resolved Hide resolved
sales_team_security/security/sales_team_security.xml Outdated Show resolved Hide resolved
sales_team_security/tests/common.py Outdated Show resolved Hide resolved
@cesar-tecnativa cesar-tecnativa force-pushed the 15.0-mig-sales_team_security branch 4 times, most recently from a0ed84c to 1b4bde5 Compare June 28, 2022 20:42
@pedrobaeza
Copy link
Member

@rousseldenis can you re-check?

Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

LGTM

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@pedrobaeza
Copy link
Member

/ocabot migration sales_team_security

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-2042-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jun 29, 2022
@OCA-git-bot OCA-git-bot merged commit 52c6c1a into OCA:15.0 Jun 29, 2022
@OCA-git-bot
Copy link
Contributor

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

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.

8 participants