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
6 changes: 1 addition & 5 deletions automation_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==============
Automation Oca
==============
Expand All @@ -17,7 +13,7 @@ Automation Oca
.. |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-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fautomation-lightgray.png?logo=github
Expand Down
36 changes: 15 additions & 21 deletions automation_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Automation Oca</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="automation-oca">
<h1 class="title">Automation Oca</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="automation-oca">
<h1>Automation Oca</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d3e48c044c0a3af52cc44e77484a375b51c98c04feefdaa9717f64fd8beeb128
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/automation/tree/16.0/automation_oca"><img alt="OCA/automation" src="https://img.shields.io/badge/github-OCA%2Fautomation-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/automation&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/automation/tree/16.0/automation_oca"><img alt="OCA/automation" src="https://img.shields.io/badge/github-OCA%2Fautomation-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/automation&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to automate several process according to some rules.</p>
<p>This is useful for creating automated actions on your database like:</p>
<ul class="simple">
Expand Down Expand Up @@ -405,9 +400,9 @@ <h1>Automation Oca</h1>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<div class="section" id="configure-your-processes">
<h3><a class="toc-backref" href="#toc-entry-2">Configure your processes</a></h3>
<h2><a class="toc-backref" href="#toc-entry-2">Configure your processes</a></h2>
<ol class="arabic simple">
<li>Access the <tt class="docutils literal">Automation</tt> menu.</li>
<li>Create a new Automation Configuration.</li>
Expand All @@ -432,7 +427,7 @@ <h3><a class="toc-backref" href="#toc-entry-2">Configure your processes</a></h3>
<p><img alt="Configuration Screenshot" src="https://raw.githubusercontent.com/OCA/automation/16.0/automation_oca/static/description/configuration.png" /></p>
</div>
<div class="section" id="configuration-of-steps">
<h3><a class="toc-backref" href="#toc-entry-3">Configuration of steps</a></h3>
<h2><a class="toc-backref" href="#toc-entry-3">Configuration of steps</a></h2>
<p>Steps can trigger one of the following options:</p>
<ul class="simple">
<li><tt class="docutils literal">Mail</tt>: Sends an email using a template.</li>
Expand Down Expand Up @@ -478,12 +473,12 @@ <h3><a class="toc-backref" href="#toc-entry-3">Configuration of steps</a></h3>
on the template</p>
</div>
<div class="section" id="records-creation">
<h3><a class="toc-backref" href="#toc-entry-4">Records creation</a></h3>
<h2><a class="toc-backref" href="#toc-entry-4">Records creation</a></h2>
<p>Records are created using a cron action. This action is executed every 6
hours by default.</p>
</div>
<div class="section" id="step-execution">
<h3><a class="toc-backref" href="#toc-entry-5">Step execution</a></h3>
<h2><a class="toc-backref" href="#toc-entry-5">Step execution</a></h2>
<p>Steps are executed using a cron action. This action is executed every
hour by default. On the record view, you can execute manually an action.</p>
<p>There is a way to enforce step execution when finalize the previous one.
Expand All @@ -492,36 +487,36 @@ <h3><a class="toc-backref" href="#toc-entry-5">Step execution</a></h3>
</div>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/automation/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/automation/issues/new?body=module:%20automation_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-7">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-7">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-8">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-8">Authors</a></h2>
<ul class="simple">
<li>Dixmit</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-9">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella (<a class="reference external" href="https://www.dixmit.com/">Dixmit</a>)</li>
</ul>
</div>
<div class="section" id="other-credits">
<h3><a class="toc-backref" href="#toc-entry-10">Other credits</a></h3>
<h2><a class="toc-backref" href="#toc-entry-10">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Associacion Española de Odoo (<a class="reference external" href="https://www.aeodoo.org/">AEODOO</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -534,6 +529,5 @@ <h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
126 changes: 126 additions & 0 deletions base_automation_sales_team_subscribe/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
====================================
Base Automation Sales Team Subscribe
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0c3d76b54b6b1b700929e300de84b05eed104efd6e832f5e7437be540b1f7057
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fautomation-lightgray.png?logo=github
:target: https://github.com/OCA/automation/tree/16.0/base_automation_sales_team_subscribe
:alt: OCA/automation
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-base_automation_sales_team_subscribe
: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/automation&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of automated actions to allow to
"Add Followers" all members of a sales team.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

**BUSINESS NEED**

In Odoo, Automated Actions (base_automation) allow users to
automatically add followers to a record. However, in the standard
version, you must select specific individual Partners one by one.

In many organizations, notification requirements are team-based.

Managing these subscriptions individually is tedious and error-prone. If
a new member joins a Sales Team, an administrator would have to manually
update every single Automated Action to include that new user.

**APPROACH**

This module extends the "Add Followers" action type within Automated
Actions to include a "Add Sales Teams as Followers" field.

Usage
=====

To use this module, you need to:

1. Go to **Settings > Technical > Automation > Automated Actions**.
2. Create a new Automated Action or select an existing one.
3. Set the **Action To Do** (state) to ``Add Followers``.
4. In the **Add Sales Teams as Followers** field, select one or more
Sales Teams.
5. (Optional) You can still add individual partners in the standard
**Add Followers** field. The module will combine both lists.
6. Save the action.

**Example result:** When the trigger conditions are met (e.g., a new
Opportunity is created), Odoo will look up all members currently
assigned to the selected Sales Teams and add their associated Partners
as followers to the record chatter.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/automation/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/automation/issues/new?body=module:%20base_automation_sales_team_subscribe%0Aversion:%2016.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
-------

* ACSONE SA/NV

Contributors
------------

- Niolas Delbovier nicolas.delbovier@acsone.eu (https://www.acsone.eu/)

Other credits
-------------

[ This file is optional and contains additional credits, other than
authors, contributors, and maintainers. ]

The development of this module has been financially supported by:

- ACSONE SA/NV

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/automation <https://github.com/OCA/automation/tree/16.0/base_automation_sales_team_subscribe>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions base_automation_sales_team_subscribe/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions base_automation_sales_team_subscribe/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Base Automation Sales Team Subscribe",
"summary": """Subscribe all members of a sales team via automated actions""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/automation",
"depends": ["sales_team", "base_automation"],
"data": [
"views/base_automation.xml",
],
"demo": [],
}
2 changes: 2 additions & 0 deletions base_automation_sales_team_subscribe/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import base_automation
from . import ir_actions_server
14 changes: 14 additions & 0 deletions base_automation_sales_team_subscribe/models/base_automation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class BaseAutomation(models.Model):
_inherit = "base.automation"

subscribe_team_ids = fields.Many2many(
comodel_name="crm.team",
string="Add Sales Teams as Followers",
help="All members of these teams will be added as followers.",
)
34 changes: 34 additions & 0 deletions base_automation_sales_team_subscribe/models/ir_actions_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class IrActionsServer(models.Model):
_inherit = "ir.actions.server"

def _run_action_followers_multi(self, eval_context=None):
res = super()._run_action_followers_multi(eval_context=eval_context)

if self.usage == "base_automation":
automation = (
self.env["base.automation"]
.sudo()
.search([("action_server_id", "=", self.id)], limit=1)
)

if automation and automation.subscribe_team_ids:
Model = self.env[self.model_name]
if hasattr(Model, "message_subscribe"):
team_partners = automation.subscribe_team_ids.mapped(
"member_ids.partner_id"
)
partners_to_add = team_partners - self.partner_ids

if partners_to_add:
records = Model.browse(
self._context.get("active_ids")
or self._context.get("active_id")
)
records.message_subscribe(partner_ids=partners_to_add.ids)
return res
11 changes: 11 additions & 0 deletions base_automation_sales_team_subscribe/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**BUSINESS NEED**

In Odoo, Automated Actions (base_automation) allow users to automatically add followers to a record. However, in the standard version, you must select specific individual Partners one by one.

In many organizations, notification requirements are team-based.

Managing these subscriptions individually is tedious and error-prone. If a new member joins a Sales Team, an administrator would have to manually update every single Automated Action to include that new user.

**APPROACH**

This module extends the "Add Followers" action type within Automated Actions to include a "Add Sales Teams as Followers" field.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Niolas Delbovier <nicolas.delbovier@acsone.eu> (https://www.acsone.eu/)
6 changes: 6 additions & 0 deletions base_automation_sales_team_subscribe/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[ This file is optional and contains additional credits, other than
authors, contributors, and maintainers. ]

The development of this module has been financially supported by:

- ACSONE SA/NV
1 change: 1 addition & 0 deletions base_automation_sales_team_subscribe/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module extends the functionality of automated actions to allow to "Add Followers" all members of a sales team.
11 changes: 11 additions & 0 deletions base_automation_sales_team_subscribe/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To use this module, you need to:

1. Go to **Settings > Technical > Automation > Automated Actions**.
2. Create a new Automated Action or select an existing one.
3. Set the **Action To Do** (state) to `Add Followers`.
4. In the **Add Sales Teams as Followers** field, select one or more Sales Teams.
5. (Optional) You can still add individual partners in the standard **Add Followers** field. The module will combine both lists.
6. Save the action.

**Example result:**
When the trigger conditions are met (e.g., a new Opportunity is created), Odoo will look up all members currently assigned to the selected Sales Teams and add their associated Partners as followers to the record chatter.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading