[MIG] mail_activity_team: Migration to 17.0

pull/1321/head
sonhd91 2024-03-05 14:27:15 +07:00
parent 92367b6503
commit e3c9b9d85e
17 changed files with 134 additions and 220 deletions

View File

@ -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
@ -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|
@ -45,21 +45,20 @@ 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
===========
@ -67,7 +66,7 @@ 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.
@ -75,29 +74,41 @@ Credits
=======
Authors
~~~~~~~
-------
* ForgeFlow
* Sodexis
Contributors
~~~~~~~~~~~~
------------
* `ForgeFlow <https://www.forgeflow.com>`_:
- `ForgeFlow <https://www.forgeflow.com>`__:
* Jordi Ballester Alomar (jordi.ballester@forgeflow.com)
* Miquel Raïch (miquel.raich@forgeflow.com)
* Bernat Puig Font (bernat.puig@forgeflow.com)
* Pedro Gonzalez (pedro.gonzalez@pesol.es)
* `Tecnativa <https://www.tecnativa.com>`_:
- Jordi Ballester Alomar (jordi.ballester@forgeflow.com)
- Miquel Raïch (miquel.raich@forgeflow.com)
- Bernat Puig Font (bernat.puig@forgeflow.com)
* David Vidal
* `Dynapps <https://www.dynapps.eu>`_:
- Pedro Gonzalez (pedro.gonzalez@pesol.es)
- `Tecnativa <https://www.tecnativa.com>`__:
* Raf Ven
- David Vidal
- `Dynapps <https://www.dynapps.eu>`__:
- Raf Ven
- [Trobz] (https://trobz.com):
- Son Ho sonhd@trobz.com
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.
@ -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.

View File

@ -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",

View File

@ -17,7 +17,7 @@ class MailActivityTeam(models.Model):
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)

View File

@ -44,7 +44,11 @@ class ResUsers(models.Model):
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:

View File

@ -7,3 +7,5 @@
- David Vidal
- [Dynapps](https://www.dynapps.eu):
- Raf Ven
- [Trobz] (https://trobz.com):
- Son Ho <sonhd@trobz.com>

View File

@ -0,0 +1 @@
The migration of this module from 16.0 to 17.0 was financially supported by Camptocamp

View File

@ -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.

View File

@ -1,17 +0,0 @@
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
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.
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.

View File

@ -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

1 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
2 access_mail_activity_team_user mail.activity.team.user model_mail_activity_team base.group_user 1 1 0 0
3 access_mail_activity_team_system_user mail.activity.team.system.user model_mail_activity_team base.group_system 1 1 1 1

View File

@ -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 (goodger@python.org)
: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.
*/
@ -367,9 +366,9 @@ ul.auto-toc {
!! 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>
@ -380,53 +379,53 @@ Only for development or testing purpose, do not use in production.
<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 users
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>
@ -443,16 +442,25 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<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>

View File

@ -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>

View File

@ -1,55 +0,0 @@
/** @odoo-module **/
import {registerPatch} from "@mail/model/model_core";
import session from "web.session";
registerPatch({
name: "ActivityGroupView",
recordMethods: {
onClickFilterButton(ev) {
const _super = this._super.bind(this);
if (this.activityMenuViewOwner.currentFilter === "my") {
return _super(ev);
}
if (this.activityMenuViewOwner.currentFilter === "team") {
this.activityMenuViewOwner.close();
const data = _.extend(
{},
$(ev.currentTarget).data(),
$(ev.target).data()
);
const context = {};
if (data.filter === "my") {
context.search_default_activities_overdue = 1;
context.search_default_activities_today = 1;
} else {
context["search_default_activities_" + data.filter] = 1;
}
context.team_activities = true;
// Necessary because activity_ids of mail.activity.mixin has auto_join
// So, duplicates are faking the count and "Load more" doesn't show up
context.force_search_count = 1;
let domain = [["activity_team_user_ids", "in", [session.uid]]];
if (data.domain) {
domain = domain.concat(data.domain);
}
this.env.services.action.doAction(
{
context,
domain,
name: data.model_name,
res_model: data.res_model,
search_view_id: [false],
type: "ir.actions.act_window",
views: this.activityGroup.irModel.availableWebViews.map(
(viewName) => [false, viewName]
),
},
{
clearBreadcrumbs: true,
}
);
}
},
},
});

View File

@ -0,0 +1,37 @@
/** @odoo-module */
import {ActivityMenu} from "@mail/core/web/activity_menu";
import {patch} from "@web/core/utils/patch";
patch(ActivityMenu.prototype, {
setup() {
super.setup();
this.currentFilter = "my";
},
activateFilter(filter_el) {
this.deactivateButtons();
filter_el.addClass("active");
this.currentFilter = filter_el.data("filter");
this.updateTeamActivitiesContext();
this.fetchSystrayActivities();
},
updateTeamActivitiesContext() {
var active = false;
if (this.currentFilter === "team") {
active = true;
}
this.env.services.orm.user.updateContext({team_activities: active});
},
onBeforeOpen() {
this.env.services.orm.user.updateContext({team_activities: false});
super.onBeforeOpen();
},
deactivateButtons() {
$(".o_filter_nav_item").removeClass("active");
},
onClickActivityFilter(filter) {
this.activateFilter($("." + filter));
},
});

View File

@ -1,68 +0,0 @@
/** @odoo-module **/
import {attr} from "@mail/model/model_field";
import {registerPatch} from "@mail/model/model_core";
import session from "web.session";
registerPatch({
name: "ActivityMenuView",
fields: {
currentFilter: attr({
default: "my",
}),
isTeamActive: attr({
default: false,
}),
},
recordMethods: {
close() {
const _super = this._super.bind(this);
this.activateFilter($(".my_activities"));
return _super();
},
onClickDropdownToggle(ev) {
const _super = this._super.bind(this);
this.activateFilter($(".my_activities"));
return _super(ev);
},
deactivateButtons() {
$(".o_filter_nav_item").removeClass("active");
},
updateTeamActivitiesContext() {
this.update({isTeamActive: this.currentFilter === "team"});
},
activateFilter(filter) {
this.deactivateButtons();
filter.addClass("active");
this.update({currentFilter: filter.data("filter")});
this.updateTeamActivitiesContext();
this.fetchData();
},
onClickActivityFilter(event) {
event.stopPropagation();
this.activateFilter($(event.currentTarget));
},
/**
* @override
*/
async fetchData() {
const _super = this._super.bind(this);
if (!this.isTeamActive) {
return _super();
}
const context = _.extend({}, session.user_context, {team_activities: true});
const data = await this.messaging.rpc({
model: "res.users",
method: "systray_get_activities",
args: [],
kwargs: {context: context},
});
this.update({
activityGroups: data.map((vals) =>
this.messaging.models.ActivityGroup.convertData(vals)
),
extraCount: 0,
});
},
},
});

View File

@ -13,7 +13,7 @@
<field name="activity_user_id" position="after">
<field
name="activity_team_id"
attrs="{'invisible': [('activity_user_type', '!=', 'specific')]}"
invisible="activity_user_type != 'specific'"
/>
</field>
</field>

View File

@ -18,7 +18,7 @@
type="object"
class="oe_highlight"
groups="base.group_no_one"
attrs="{'invisible': [('count_missing_activities', '=', 0)]}"
invisible="count_missing_activities == 0"
/>
</header>
<sheet string="Activity Team">
@ -26,7 +26,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<group>
<group name="base">

View File

@ -7,14 +7,12 @@
<field name="inherit_id" ref="mail.mail_activity_view_form_popup" />
<field name="arch" type="xml">
<field name="user_id" position="attributes">
<attribute
name="attrs"
>{'invisible': [('team_id', '!=', False)]}</attribute>
<attribute name="invisible">team_id</attribute>
</field>
<field name="user_id" position="after">
<field
name="team_user_id"
attrs="{'invisible': [('team_id', '=', False)]}"
invisible="not team_id"
domain="[('activity_team_ids', '=', team_id)]"
/>
<field
@ -46,14 +44,12 @@
/>
<field name="arch" type="xml">
<field name="user_id" position="attributes">
<attribute
name="attrs"
>{'invisible': [('team_id', '=', False)]}</attribute>
<attribute name="invisible">not team_id</attribute>
</field>
<field name="user_id" position="after">
<field
name="team_user_id"
attrs="{'invisible': [('team_id', '!=', False)]}"
invisible="team_id"
domain="[('activity_team_ids', '=', team_id)]"
/>
<field