Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.0.0
Category
Sales
Folder size
0.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-08-07 09:06:23
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Franco Leyes, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None
Description
This module adds a new "Sale" group called "User: Team Documents Only", 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

Additionally, users with the "User: Team Documents Only" group can see contacts
created by any salesman that belongs to the same sales team(s), allowing
team members to view and access contacts managed by their teammates.

Code Analysis

Views touched (0)

No views found for this module.

HTTP endpoints (0)

No HTTP endpoints 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.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…