Sales documents permissions by channels (teams)

sales_team_security
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/18.0/sales_team_security
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSCarlos Lopez, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds a new "Sale" group called "User: Team documents", that
includes the proper permissions for showing only the information related
to that user sale team (having assigned that team/channel or no team at
all, independently from the assigned salesman):

- Contacts.
- Quotations/Sales Orders (implemented in sales_team_security_sale)
- Leads/Opportunities (implemented in sales_team_security_crm)

It also handles the sync (auto-creation and remove) of followers in
company partners and childs of them according to salesmans. Any example
about it: - Partner company \> Salesman: Admin - Partner company,
Contact 1 \> Without salesman - Partner company, Contact 2 \> Salesman:
Demo All these partners have these followers: Admin + Demo

And finally, there are rules for partners to be restricted to the own
ones for the group "User: Own Documents Only" for being coherent with
the permission scheme. Someone with this permission will see:

- Contacts without salesman assigned.
- Contacts with them as salesman.
- Contacts with them as follower.

For keeping consistent accesses, followers of the main and
shipping/invoice contacts are synced according the salesman of the
children contacts

Code Analysis

Views touched (0)

No views found for this module.

Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • user_id Many2one
    index=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/17.0/sales_team_security
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, David Alonso // Solvos, Deriman-Alonso
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module adds a new "Sale" group called "User: Team documents", that
includes the proper permissions for showing only the information related
to that user sale team (having assigned that team/channel or no team at
all, independently from the assigned salesman):

- Contacts.
- Quotations/Sales Orders (implemented in sales_team_security_sale)
- Leads/Opportunities (implemented in sales_team_security_crm)

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

It also handles the sync (auto-creation and remove) of followers in
company partners and childs of them according to salesmans. Any example
about it: - Partner company \> Salesman: Admin - Partner company,
Contact 1 \> Without salesman - Partner company, Contact 2 \> Salesman:
Demo All these partners have these followers: Admin + Demo

And finally, there are rules for partners to be restricted to the own
ones for the group "User: Own Documents Only" for being coherent with
the permission scheme. Someone with this permission will see:

- Contacts without salesman nor team assigned.
- Contacts without salesman assigned, but the same team.
- Contacts with them as salesman, independently from the team.
- Contacts with them as follower.

For keeping consistent accesses, followers of the main and
shipping/invoice contacts are synced according the salesman of the
children contacts

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/16.0/sales_team_security
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:45
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/15.0/sales_team_security
VERSION
VERSION 1.0.3
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Weblate, OCA-git-bot, oca-ci, Cesar Andres Sanchez, Christopher Rogos, josep-tecnativa
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:33
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/14.0/sales_team_security
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, Ivàn Todorovich, OCA Transbot, Víctor Martínez, oca-travis, Weblate, OCA-git-bot, oca-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/13.0/sales_team_security
VERSION
VERSION 3.0.1
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, david, OCA Transbot, Víctor Martínez, Nicolás Mac Rouillon, João Marques, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - crm
    - base_setup
    - base
    - web
    - sales_team
    - mail
    - bus
    - web_tour
    - calendar
    - resource
    - fetchmail
    - utm
    - contacts
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - phone_validation
    - sale
    - payment
    - account
    - product
    - uom
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
    Sync followers on contact creation.
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/12.0/sales_team_security
VERSION
VERSION 4.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSRenato Lima, Pedro M. Baeza, OCA Transbot, Víctor Martínez, oca-travis, OCA-git-bot, Montxu
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - crm
    - base_setup
    - base
    - web
    - sales_team
    - mail
    - bus
    - web_tour
    - calendar
    - resource
    - fetchmail
    - utm
    - contacts
    - digest
    - portal
    - http_routing
    - sale
    - payment
    - account
    - product
    - decimal_precision
    - uom
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner field Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • team_id Many2one
    index=True
  • user_id Many2one
    index=True
Public methods (2)
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
  • write(self, vals)
    @api.multi
    If the salesman is changed, first remove the old salesman as follower of the key contacts (commercial + delivery/invoice), and then sync for the new ones. It performs as well the followers sync on contact type change.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/11.0/sales_team_security
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - crm
    - base_setup
    - base
    - web
    - sales_team
    - mail
    - bus
    - web_tour
    - calendar
    - resource
    - fetchmail
    - utm
    - web_planner
    - contacts
    - sale
    - account
    - product
    - decimal_precision
    - analytic
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales info in contacts) res.partner field Inherits base.view_partner_form
Models touched (1)

New fields (0)

No new fields.

Public methods (1)
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the team_id and user_id.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/8.0/sales_team_security
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttps://www.tecnativa.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - web_kanban_sparkline
    - sale
    - account_voucher
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - board
    - edi
    - email_template
    - procurement
    - crm
    - base_action_rule
    - resource
    - calendar
    - web_calendar
    - fetchmail
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_partner_form Partner form (with sales team in contacts) res.partner xpath Inherits base.view_partner_form
Models touched (2)

New fields (0)

No new fields.

Public methods (2)
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Patch view to inject the default value for the section_id.
  • onchange_address(self, use_parent_address, parent_id)
    @api.multi

New fields (1)
  • sale_team_ids Many2many → crm.case.section
    column1='member_id' column2='section_id' comodel_name='crm.case.section' relation='sale_member_rel' string='Sales teams'
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG] sales_team_security: Migration to 19.0 (#3960)