Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions crm_readonly/README.rst
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 added crm_readonly/__init__.py
Empty file.
23 changes: 23 additions & 0 deletions crm_readonly/__manifest__.py
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,
}
3 changes: 3 additions & 0 deletions crm_readonly/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions crm_readonly/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Akretion
11 changes: 11 additions & 0 deletions crm_readonly/readme/DESCRIPTION.md
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`).
21 changes: 21 additions & 0 deletions crm_readonly/readme/USAGE.md
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.
7 changes: 7 additions & 0 deletions crm_readonly/security/ir.model.access.csv
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
Comment thread
sebalix marked this conversation as resolved.
Resolved
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
28 changes: 28 additions & 0 deletions crm_readonly/security/ir_rule.xml
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>
Binary file added crm_readonly/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading