Skip to content

Commit

Permalink
[MIG] mail_activity_team: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sonhd91 committed Mar 5, 2024
1 parent 7d8bddd commit 91263a2
Show file tree
Hide file tree
Showing 17 changed files with 134 additions and 220 deletions.
65 changes: 38 additions & 27 deletions mail_activity_team/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Mail Activity Team
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:03f9f5230325096db55adb5d53806d70d4a396af32f4de252271faba5d5d0b88
!! source digest: sha256:1ec2986e180d35e605a67ecb2b8256da4ee87b09abedeab928d81618833db93c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
Expand All @@ -17,13 +17,13 @@ Mail Activity Team
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/16.0/mail_activity_team
:target: https://github.com/OCA/social/tree/17.0/mail_activity_team
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_team
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_team
: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/social&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -45,59 +45,70 @@ Usage

To set up new teams:

#. Go to *Settings / Activate developer mode*
#. Go to *Settings / Technical / Email / Activity Teams*
#. Create a new Team and assign (optionally) the models in which it will
1. Go to *Settings / Activate developer mode*
2. Go to *Settings / Technical / Discuss / Activity Teams*
3. Create a new Team and assign (optionally) the models in which it will
be used, and the members of the team.

You can also assign a user to Activity teams going to
*Settings / Users & Companies / Users*, and in the *Preferences* tab, field
Activity Teams.
You can also assign a user to Activity teams going to *Settings / Users
& Companies / Users*, and in the *Preferences* tab, field Activity
Teams.

When you create a new activity the application will propose the user's
assigned team.

You can report on the activities assigned to a team going to
*Dashboards / Activities*, and then filter by a specific team or group by
teams.
You can report on the activities assigned to a team going to *Dashboards
/ Activities*, and then filter by a specific team or group by teams.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/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/social/issues/new?body=module:%20mail_activity_team%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_activity_team%0Aversion:%2017.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
~~~~~~~
-------

* ForgeFlow
* Sodexis

Contributors
~~~~~~~~~~~~
------------

* `ForgeFlow <https://www.forgeflow.com>`_:
- `ForgeFlow <https://www.forgeflow.com>`__:

* Jordi Ballester Alomar ([email protected])
* Miquel Raïch ([email protected])
* Bernat Puig Font ([email protected])
* Pedro Gonzalez ([email protected])
* `Tecnativa <https://www.tecnativa.com>`_:
- Jordi Ballester Alomar ([email protected])
- Miquel Raïch ([email protected])
- Bernat Puig Font ([email protected])

* David Vidal
* `Dynapps <https://www.dynapps.eu>`_:
- Pedro Gonzalez ([email protected])
- `Tecnativa <https://www.tecnativa.com>`__:

* Raf Ven
- David Vidal

- `Dynapps <https://www.dynapps.eu>`__:

- Raf Ven

- [Trobz] (https://trobz.com):

- Son Ho [email protected]

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

The migration of this module from 16.0 to 17.0 was financially supported
by Camptocamp

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -109,6 +120,6 @@ 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/social <https://github.com/OCA/social/tree/16.0/mail_activity_team>`_ project on GitHub.
This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mail_activity_team>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion mail_activity_team/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Mail Activity Team",
"summary": "Add Teams to Activities",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"development_status": "Alpha",
"category": "Social Network",
"website": "https://github.com/OCA/social",
Expand Down
2 changes: 1 addition & 1 deletion mail_activity_team/models/mail_activity_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _compute_missing_activities(self):
domain.append(("user_id", "in", team.member_ids.ids))
if team.res_model_ids:
domain.append(("res_model_id", "in", team.res_model_ids.ids))
team.count_missing_activities = activity_model.search(domain, count=True)
team.count_missing_activities = activity_model.search_count(domain)

name = fields.Char(required=True, translate=True)
active = fields.Boolean(default=True)
Expand Down
6 changes: 5 additions & 1 deletion mail_activity_team/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def systray_get_activities(self):
activity_data = self.env.cr.dictfetchall()
model_ids = [a["id"] for a in activity_data]
model_names = {
n[0]: n[1] for n in self.env["ir.model"].sudo().browse(model_ids).name_get()
n["id"]: n["display_name"]
for n in self.env["ir.model"]
.sudo()
.browse(model_ids)
.read(["id", "display_name"])
}
user_activities = {}
for activity in activity_data:
Expand Down
2 changes: 2 additions & 0 deletions mail_activity_team/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
- David Vidal
- [Dynapps](https://www.dynapps.eu):
- Raf Ven
- [Trobz] (https://trobz.com):
- Son Ho <[email protected]>
1 change: 1 addition & 0 deletions mail_activity_team/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The migration of this module from 16.0 to 17.0 was financially supported by Camptocamp
2 changes: 1 addition & 1 deletion mail_activity_team/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To set up new teams:

1. Go to *Settings / Activate developer mode*
2. Go to *Settings / Technical / Email / Activity Teams*
2. Go to *Settings / Technical / Discuss / Activity Teams*
3. Create a new Team and assign (optionally) the models in which it
will be used, and the members of the team.

Expand Down
17 changes: 0 additions & 17 deletions mail_activity_team/readme/USAGE.rst

This file was deleted.

1 change: 0 additions & 1 deletion mail_activity_team/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
access_mail_activity_team_all,mail.activity.team.all,model_mail_activity_team,,1,0,0,0
access_mail_activity_team_user,mail.activity.team.user,model_mail_activity_team,base.group_user,1,1,0,0
access_mail_activity_team_system_user,mail.activity.team.system.user,model_mail_activity_team,base.group_system,1,1,1,1
62 changes: 35 additions & 27 deletions mail_activity_team/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Mail Activity Team</title>
<style type="text/css">

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

Expand Down Expand Up @@ -367,9 +366,9 @@ <h1 class="title">Mail Activity Team</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:03f9f5230325096db55adb5d53806d70d4a396af32f4de252271faba5d5d0b88
!! source digest: sha256:1ec2986e180d35e605a67ecb2b8256da4ee87b09abedeab928d81618833db93c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/social/tree/16.0/mail_activity_team"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_team"><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/social&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="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/social/tree/17.0/mail_activity_team"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_team"><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/social&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds the possibility to assign teams to activities.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
Expand All @@ -380,53 +379,53 @@ <h1 class="title">Mail Activity Team</h1>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id6">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>To set up new teams:</p>
<ol class="arabic simple">
<li>Go to <em>Settings / Activate developer mode</em></li>
<li>Go to <em>Settings / Technical / Email / Activity Teams</em></li>
<li>Go to <em>Settings / Technical / Discuss / Activity Teams</em></li>
<li>Create a new Team and assign (optionally) the models in which it will
be used, and the members of the team.</li>
</ol>
<p>You can also assign a user to Activity teams going to
<em>Settings / Users &amp; Companies / Users</em>, and in the <em>Preferences</em> tab, field
Activity Teams.</p>
<p>You can also assign a user to Activity teams going to <em>Settings / Users
&amp; Companies / Users</em>, and in the <em>Preferences</em> tab, field Activity
Teams.</p>
<p>When you create a new activity the application will propose the user’s
assigned team.</p>
<p>You can report on the activities assigned to a team going to
<em>Dashboards / Activities</em>, and then filter by a specific team or group by
teams.</p>
<p>You can report on the activities assigned to a team going to <em>Dashboards
/ Activities</em>, and then filter by a specific team or group by teams.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/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/social/issues/new?body=module:%20mail_activity_team%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_activity_team%0Aversion:%2017.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">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>ForgeFlow</li>
<li>Sodexis</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.forgeflow.com">ForgeFlow</a>:<ul>
<li>Jordi Ballester Alomar (<a class="reference external" href="mailto:jordi.ballester&#64;forgeflow.com">jordi.ballester&#64;forgeflow.com</a>)</li>
Expand All @@ -443,16 +442,25 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Raf Ven</li>
</ul>
</li>
<li>[Trobz] (<a class="reference external" href="https://trobz.com">https://trobz.com</a>):<ul>
<li>Son Ho <a class="reference external" href="mailto:sonhd&#64;trobz.com">sonhd&#64;trobz.com</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id6">Other credits</a></h2>
<p>The migration of this module from 16.0 to 17.0 was financially supported
by Camptocamp</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id7">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" /></a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/16.0/mail_activity_team">OCA/social</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/17.0/mail_activity_team">OCA/social</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,26 @@
<templates>
<t
t-name="ActivityMenuView"
t-inherit="mail.ActivityMenuView"
t-inherit="mail.ActivityMenu"
t-inherit-mode="extension"
owl="1"
>
<xpath
expr="//div[hasclass('o_ActivityMenuView_activityGroups')]"
position="before"
>
<xpath expr="//div[1]" position="before">
<div class="o_mail_systray_dropdown_top">
<ul class="nav nav-pills">
<li class="nav-item">
<li class="nav-item cursor-pointer">
<a
class="my_activities o_filter_nav_item nav-link active"
data-filter='my'
t-on-click="activityMenuView.onClickActivityFilter"
t-on-click="() => this.onClickActivityFilter('my_activities')"
>
My Activities
</a>
</li>
<li class="nav-item">
<li class="nav-item cursor-pointer">
<a
class="team_activities o_filter_nav_item nav-link"
data-filter='team'
t-on-click="activityMenuView.onClickActivityFilter"
t-on-click="() => this.onClickActivityFilter('team_activities')"
>
Team Activities
</a>
Expand Down
Loading

0 comments on commit 91263a2

Please sign in to comment.