Repository navigation
[19.0][ADD] sales_team_readonly + crm_readonly #772
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
Open
sebalix
wants to merge
2
commits into
OCA:19.0
Choose a base branch
from
akretion:19.0-add-crm_readonly
base: 19.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.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| ============ | ||
| CRM Readonly | ||
| ============ | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:3cdad2f7041d90403b2f9e28d043ee436234f145feb3db362f0d4e9a4796cff1 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Beta | ||
| .. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png | ||
| :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
| :alt: License: LGPL-3 | ||
| .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github | ||
| :target: https://github.com/OCA/crm/tree/19.0/crm_readonly | ||
| :alt: OCA/crm | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_readonly | ||
| :alt: Translate me on Weblate | ||
| .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
| :target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=19.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| This module provides a read-only access to the CRM documents introduced | ||
| by the ``crm`` standard module, through the *Readonly* option of the | ||
| *Sales* privilege of the user form. | ||
|
|
||
| Users holding the group can browse leads/opportunities and the CRM menus | ||
| (pipeline, activities, reporting) without any create, write or unlink | ||
| right. | ||
|
|
||
| The *Readonly* option is shared with the other Sales applications | ||
| through the ``sales_team_readonly`` module: it also grants read access | ||
| to the documents of the other installed modules using it (e.g. | ||
| ``sale_readonly``). | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| Assign the *Readonly* option under the *Sales* privilege in the user | ||
| form (Settings / Users). The option is mutually exclusive with the | ||
| standard *User: ...* and *Administrator* options of the same privilege. | ||
|
|
||
| What the user gets: | ||
|
|
||
| - read access to all leads/opportunities, whatever their salesperson; | ||
| - a CRM application menu with *My Pipeline*, *My Activities* and the | ||
| *Reporting* menus (forecast, pipeline and leads analyses, activities), | ||
| all in read-only mode; | ||
| - the *Leads* menu as soon as the *Leads* setting | ||
| (``crm.group_use_lead``) is enabled, exactly like standard sales | ||
| users; | ||
| - the read-only access to the other Sales applications using the shared | ||
| *Readonly* option (e.g. quotations and sales orders with | ||
| ``sale_readonly``). | ||
|
|
||
| What the user does not get: | ||
|
|
||
| - any write access: action buttons requiring write access (e.g. *Mark | ||
| Won*, *Convert to Opportunity*) raise an access error when clicked; | ||
| - the *Configuration* menus, reserved to sales administrators. | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_. | ||
| In case of trouble, please check there if your issue has already been reported. | ||
| If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
| `feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_readonly%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Do not contact contributors directly about support or help with technical issues. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Authors | ||
| ------- | ||
|
|
||
| * Akretion | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Akretion | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/19.0/crm_readonly>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
Empty file.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Copyright 2026 Akretion (https://www.akretion.com). | ||
| # @author Sébastien Alix <sebastien.alix@akretion.com> | ||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
|
||
| { | ||
| "name": "CRM Readonly", | ||
| "summary": "Read-only access to CRM documents", | ||
| "version": "19.0.1.0.0", | ||
| "category": "CRM", | ||
| "website": "https://github.com/OCA/crm", | ||
| "author": "Akretion, Odoo Community Association (OCA)", | ||
| "license": "LGPL-3", | ||
| "depends": [ | ||
| "crm", | ||
| "sales_team_readonly", | ||
| ], | ||
| "data": [ | ||
| "security/ir_rule.xml", | ||
| "security/ir.model.access.csv", | ||
| "views/crm_menus.xml", | ||
| ], | ||
| "installable": True, | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [build-system] | ||
| requires = ["whool"] | ||
| build-backend = "whool.buildapi" |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Akretion |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| This module provides a read-only access to the CRM documents introduced by | ||
| the `crm` standard module, through the *Readonly* option of the *Sales* | ||
| privilege of the user form. | ||
|
|
||
| Users holding the group can browse leads/opportunities and the CRM menus | ||
| (pipeline, activities, reporting) without any create, write or unlink | ||
| right. | ||
|
|
||
| The *Readonly* option is shared with the other Sales applications through | ||
| the `sales_team_readonly` module: it also grants read access to the | ||
| documents of the other installed modules using it (e.g. `sale_readonly`). |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| Assign the *Readonly* option under the *Sales* privilege in the user form | ||
| (Settings / Users). The option is mutually exclusive with the standard | ||
| *User: ...* and *Administrator* options of the same privilege. | ||
|
|
||
| What the user gets: | ||
|
|
||
| * read access to all leads/opportunities, whatever their salesperson; | ||
| * a CRM application menu with *My Pipeline*, *My Activities* and the | ||
| *Reporting* menus (forecast, pipeline and leads analyses, activities), | ||
| all in read-only mode; | ||
| * the *Leads* menu as soon as the *Leads* setting (`crm.group_use_lead`) | ||
| is enabled, exactly like standard sales users; | ||
| * the read-only access to the other Sales applications using the shared | ||
| *Readonly* option (e.g. quotations and sales orders with | ||
| `sale_readonly`). | ||
|
|
||
| What the user does not get: | ||
|
|
||
| * any write access: action buttons requiring write access (e.g. *Mark Won*, | ||
| *Convert to Opportunity*) raise an access error when clicked; | ||
| * the *Configuration* menus, reserved to sales administrators. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
| access_crm_lead_readonly,crm.lead.readonly,crm.model_crm_lead,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
| access_crm_tag_readonly,crm.tag.readonly,sales_team.model_crm_tag,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
| access_crm_recurring_plan_readonly,crm.recurring.plan.readonly,crm.model_crm_recurring_plan,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
| access_crm_lead_scoring_frequency_readonly,crm.lead.scoring.frequency.readonly,crm.model_crm_lead_scoring_frequency,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
| access_crm_lead_scoring_frequency_field_readonly,crm.lead.scoring.frequency.field.readonly,crm.model_crm_lead_scoring_frequency_field,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
| access_crm_activity_report_readonly,crm.activity.report.readonly,crm.model_crm_activity_report,sales_team_readonly.group_sales_readonly,1,0,0,0 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
| <record id="crm_lead_rule_group_readonly" model="ir.rule"> | ||
| <field name="name">CRM Lead Readonly: All Documents</field> | ||
| <field name="model_id" ref="crm.model_crm_lead" /> | ||
| <field name="domain_force">[(1, '=', 1)]</field> | ||
| <field | ||
| name="groups" | ||
| eval="[Command.link(ref('sales_team_readonly.group_sales_readonly'))]" | ||
| /> | ||
| <field name="perm_write" eval="False" /> | ||
| <field name="perm_create" eval="False" /> | ||
| <field name="perm_unlink" eval="False" /> | ||
| </record> | ||
|
|
||
| <record id="crm_activity_report_rule_group_readonly" model="ir.rule"> | ||
| <field name="name">Activities Analysis Readonly: All Documents</field> | ||
| <field name="model_id" ref="crm.model_crm_activity_report" /> | ||
| <field name="domain_force">[(1, '=', 1)]</field> | ||
| <field | ||
| name="groups" | ||
| eval="[Command.link(ref('sales_team_readonly.group_sales_readonly'))]" | ||
| /> | ||
| <field name="perm_write" eval="False" /> | ||
| <field name="perm_create" eval="False" /> | ||
| <field name="perm_unlink" eval="False" /> | ||
| </record> | ||
| </odoo> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.