Merge PR #802 into 15.0

Signed-off-by dreispt
This commit is contained in:
OCA-git-bot 2021-11-29 08:35:32 +00:00
commit ad7caec3dd
21 changed files with 1620 additions and 0 deletions

View File

@ -0,0 +1,98 @@
===================
Mail Activity Board
===================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/14.0/mail_activity_board
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_activity_board
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/205/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module adds an activity board with form, tree, kanban, calendar, pivot, graph and search views.
**Table of contents**
.. contents::
:local:
Usage
=====
To use this module, you need to:
#. Access to the views from menu Boards.
A smartButton of activities is added in the mail thread from form view.
From this smartButton is linked to the activity board, to the view tree,
which shows the activities related to the opportunity.
From the form view of the activity you can navigate to the origin of the activity.
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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_activity_board%0Aversion:%2014.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
~~~~~~~
* SDi
* David Juaneda
* Sodexis
Contributors
~~~~~~~~~~~~
* `SDI <https://www.sdi.es>`_:
* David Juaneda
* `ForgeFlow <https://www.forgeflow.com>`_:
* Miquel Raïch (miquel.raich@forgeflow.com)
* `Pesol <https://www.pesol.es>`_:
* Pedro Gonzalez (pedro.gonzalez@pesol.es)
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/social <https://github.com/OCA/social/tree/14.0/mail_activity_board>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -0,0 +1 @@
from . import models

View File

@ -0,0 +1,24 @@
# Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Activity Board",
"summary": "Add Activity Boards",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": "SDi, David Juaneda, Sodexis, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["calendar", "board"],
"data": ["views/mail_activity_view.xml"],
"assets": {
"web.assets_backend": [
"mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.esm.js",
],
"web.assets_qweb": [
"mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml",
],
},
}

View File

@ -0,0 +1,115 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_board
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-02 21:13+0000\n"
"Last-Translator: eduardgm <eduard.garcia@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next 6 months"
msgstr "Act. próximos 6 meses"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next month"
msgstr "Act. próximo mes"
#. module: mail_activity_board
#. openerp-web
#: code:addons/mail_activity_board/static/src/xml/inherit_chatter.xml:0
#: model:ir.actions.act_window,name:mail_activity_board.open_boards_activities
#: model:ir.ui.menu,name:mail_activity_board.board_menu_activities
#, python-format
msgid "Activities"
msgstr "Actividades"
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity"
msgstr "Actividad"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity Form"
msgstr ""
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity_mixin
msgid "Activity Mixin"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_partner_ids
msgid "Attendees"
msgstr "Asistentes"
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__duration
msgid "Duration"
msgstr "Duración"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Log a note..."
msgstr "Registrar una nota..."
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__res_model_id_name
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Origin"
msgstr "Origen"
#. module: mail_activity_board
#. openerp-web
#: code:addons/mail_activity_board/static/src/xml/inherit_chatter.xml:0
#, python-format
msgid "See activities list"
msgstr "Ver lista de actividades"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next 6 months."
msgstr "Mostrar las actividades programadas para los próximos 6 meses."
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next month."
msgstr "Mostrar las actividades programadas para el próximo mes."
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start"
msgstr "Inicio"
#. module: mail_activity_board
#: model:ir.model.fields,help:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start date of an event, without time for full days events"
msgstr "Fecha de inicio de un evento, sin tiempo para eventos de días completos"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Start meeting"
msgstr "Empezar reunión"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "User"
msgstr "Usuario"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "e.g. Discuss proposal"
msgstr "Ej. Discutir propuesta"

View File

@ -0,0 +1,117 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_board
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-01-28 11:55+0000\n"
"Last-Translator: Laurent Corron <laurent.corron@acsone.eu>\n"
"Language-Team: none\n"
"Language: fr_BE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10\n"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next 6 months"
msgstr "Act. les 6 prochains mois"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next month"
msgstr "Act. le mois prochain"
#. module: mail_activity_board
#. openerp-web
#: code:addons/mail_activity_board/static/src/xml/inherit_chatter.xml:0
#: model:ir.actions.act_window,name:mail_activity_board.open_boards_activities
#: model:ir.ui.menu,name:mail_activity_board.board_menu_activities
#, python-format
msgid "Activities"
msgstr "Activités"
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity"
msgstr "Activité"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity Form"
msgstr "Formulaire d'activité"
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity_mixin
msgid "Activity Mixin"
msgstr "Combinaison d'activités"
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_partner_ids
msgid "Attendees"
msgstr "Participants"
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__duration
msgid "Duration"
msgstr "Durée"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Log a note..."
msgstr "Enregistrer une note ..."
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__res_model_id_name
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Origin"
msgstr "Origine"
#. module: mail_activity_board
#. openerp-web
#: code:addons/mail_activity_board/static/src/xml/inherit_chatter.xml:0
#, python-format
msgid "See activities list"
msgstr "Voir la liste des activités"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next 6 months."
msgstr "Afficher les activités prévues pour les 6 prochains mois."
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next month."
msgstr "Afficher les activités prévues pour le mois prochain."
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start"
msgstr "Début"
#. module: mail_activity_board
#: model:ir.model.fields,help:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start date of an event, without time for full days events"
msgstr ""
"Date de début d'un événement, sans heure pour les événements d'une journée "
"complète"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Start meeting"
msgstr "Commencer la réunion"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "User"
msgstr "Utilisateur"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "e.g. Discuss proposal"
msgstr "Par exemple. Discuter de la proposition"

View File

@ -0,0 +1,133 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_board
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_kanban
msgid "<i title=\"date\" class=\"fa fa-clock-o\"/>"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_kanban
msgid "<span><i title=\"date\" class=\"fa fa-clock-o\"/></span>"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next 6 months"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Act. next month"
msgstr ""
#. module: mail_activity_board
#. openerp-web
#: code:addons/mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml:0
#: model:ir.actions.act_window,name:mail_activity_board.open_boards_activities
#: model:ir.ui.menu,name:mail_activity_board.board_menu_activities
#, python-format
msgid "Activities"
msgstr ""
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Activity Form"
msgstr ""
#. module: mail_activity_board
#: model:ir.model,name:mail_activity_board.model_mail_activity_mixin
msgid "Activity Mixin"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_partner_ids
msgid "Attendees"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__display_name
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity_mixin__display_name
msgid "Display Name"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__duration
msgid "Duration"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__id
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity_mixin__id
msgid "ID"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity____last_update
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity_mixin____last_update
msgid "Last Modified on"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Log a note..."
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__res_model_id_name
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Origin"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next 6 months."
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "Show activities scheduled for next month."
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,field_description:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start"
msgstr ""
#. module: mail_activity_board
#: model:ir.model.fields,help:mail_activity_board.field_mail_activity__calendar_event_id_start
msgid "Start date of an event, without time for full days events"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "Start meeting"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_search
msgid "User"
msgstr ""
#. module: mail_activity_board
#: model_terms:ir.ui.view,arch_db:mail_activity_board.mail_activity_view_form_board
msgid "e.g. Discuss proposal"
msgstr ""

View File

@ -0,0 +1,2 @@
from . import mail_activity
from . import mail_activity_mixin

View File

@ -0,0 +1,63 @@
# Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2018 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailActivity(models.Model):
_inherit = "mail.activity"
res_model_id_name = fields.Char(
related="res_model_id.name", string="Origin", readonly=True
)
duration = fields.Float(related="calendar_event_id.duration", readonly=True)
calendar_event_id_start = fields.Datetime(
related="calendar_event_id.start", readonly=True
)
calendar_event_id_partner_ids = fields.Many2many(
related="calendar_event_id.partner_ids", readonly=True
)
def open_origin(self):
self.ensure_one()
vid = self.env[self.res_model].browse(self.res_id).get_formview_id()
response = {
"type": "ir.actions.act_window",
"res_model": self.res_model,
"view_mode": "form",
"res_id": self.res_id,
"target": "current",
"flags": {"form": {"action_buttons": False}},
"views": [(vid, "form")],
}
return response
@api.model
def action_activities_board(self):
action = self.env.ref("mail_activity_board.open_boards_activities").read()[0]
return action
@api.model
def _find_allowed_model_wise(self, doc_model, doc_dict):
doc_ids = list(doc_dict)
allowed_doc_ids = (
self.env[doc_model]
.with_context(active_test=False)
.search([("id", "in", doc_ids)])
.ids
)
return {
message_id
for allowed_doc_id in allowed_doc_ids
for message_id in doc_dict[allowed_doc_id]
}
@api.model
def _find_allowed_doc_ids(self, model_ids):
ir_model_access_model = self.env["ir.model.access"]
allowed_ids = set()
for doc_model, doc_dict in model_ids.items():
if not ir_model_access_model.check(doc_model, "read", False):
continue
allowed_ids |= self._find_allowed_model_wise(doc_model, doc_dict)
return allowed_ids

View File

@ -0,0 +1,34 @@
# Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class MailActivityMixin(models.AbstractModel):
_inherit = "mail.activity.mixin"
def redirect_to_activities(self, **kwargs):
"""Redirects to the list of activities of the object shown.
Redirects to the activity board and configures the domain so that
only those activities that are related to the object shown are
displayed.
Add to the title of the view the name the class of the object from
which the activities will be displayed.
:param kwargs: contains the id of the object and the model it's about.
:return: action.
"""
_id = kwargs.get("id")
model = kwargs.get("model")
action = self.env["mail.activity"].action_activities_board()
views = []
for v in action["views"]:
if v[1] == "tree":
v = (v[0], "list")
views.append(v)
action["views"] = views
action["domain"] = [("res_id", "=", _id), (("res_model", "=", model))]
return action

View File

@ -0,0 +1,11 @@
* `SDI <https://www.sdi.es>`_:
* David Juaneda
* `ForgeFlow <https://www.forgeflow.com>`_:
* Miquel Raïch (miquel.raich@forgeflow.com)
* `Pesol <https://www.pesol.es>`_:
* Pedro Gonzalez (pedro.gonzalez@pesol.es)

View File

@ -0,0 +1 @@
This module adds an activity board with form, tree, kanban, calendar, pivot, graph and search views.

View File

@ -0,0 +1,9 @@
To use this module, you need to:
#. Access to the views from menu Boards.
A smartButton of activities is added in the mail thread from form view.
From this smartButton is linked to the activity board, to the view tree,
which shows the activities related to the opportunity.
From the form view of the activity you can navigate to the origin of the activity.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,444 @@
<?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 0.15.1: http://docutils.sourceforge.net/" />
<title>Mail Activity Board</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
: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 http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="mail-activity-board">
<h1 class="title">Mail Activity Board</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/social/tree/14.0/mail_activity_board"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_activity_board"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/205/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds an activity board with form, tree, kanban, calendar, pivot, graph and search views.</p>
<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="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="#maintainers" id="id6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Access to the views from menu Boards.</li>
</ol>
<p>A smartButton of activities is added in the mail thread from form view.
From this smartButton is linked to the activity board, to the view tree,
which shows the activities related to the opportunity.</p>
<p>From the form view of the activity you can navigate to the origin of the activity.</p>
</div>
<div class="section" id="bug-tracker">
<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 smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_activity_board%0Aversion:%2014.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="#id3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>SDi</li>
<li>David Juaneda</li>
<li>Sodexis</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.sdi.es">SDI</a>:<ul>
<li>David Juaneda</li>
</ul>
</li>
<li><a class="reference external" href="https://www.forgeflow.com">ForgeFlow</a>:<ul>
<li>Miquel Raïch (<a class="reference external" href="mailto:miquel.raich&#64;forgeflow.com">miquel.raich&#64;forgeflow.com</a>)</li>
</ul>
</li>
<li><a class="reference external" href="https://www.pesol.es">Pesol</a>:<ul>
<li>Pedro Gonzalez (<a class="reference external" href="mailto:pedro.gonzalez&#64;pesol.es">pedro.gonzalez&#64;pesol.es</a>)</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id6">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/14.0/mail_activity_board">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>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
/** @odoo-module **/
import {patch} from "web.utils";
import {ChatterTopbar} from "@mail/components/chatter_topbar/chatter_topbar";
const components = {ChatterTopbar};
// Import {rpc}
import rpc from "web.rpc";
patch(
components.ChatterTopbar.prototype,
"mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.esm.js",
{
// --------------------------------------------------------------------------
// Handlers
// --------------------------------------------------------------------------
/**
* @private
* @param {MouseEvent} ev
*/
// eslint-disable-next-line no-unused-vars
_onListActivity(ev) {
var self = this;
rpc.query({
model: this.chatter.thread.model,
method: "redirect_to_activities",
args: [[]],
kwargs: {
id: this.chatter.thread.id,
model: this.chatter.thread.model,
},
context: {},
}).then(function (action) {
self.env.bus.trigger("do-action", {
action,
options: {
on_close: () => {
this.chatter.thread.refreshActivities();
this.chatter.thread.refresh();
},
},
});
});
},
}
);

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="mail.ChatterTopbar" t-inherit-mode="extension">
<xpath
expr="//*[@class='btn btn-link o_ChatterTopbar_button o_ChatterTopbar_buttonScheduleActivity']"
position="after"
>
<button
class="btn btn-link o_ChatterTopbar_button"
type="button"
t-att-disabled="chatter.isDisabled"
t-on-click="_onListActivity"
>
<i class="fa fa-list" />Activities
</button>
</xpath>
</t>
</templates>

View File

@ -0,0 +1 @@
from . import test_mail_activity_board

View File

@ -0,0 +1,204 @@
# Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestMailActivityBoardMethods(TransactionCase):
def setUp(self):
super(TestMailActivityBoardMethods, self).setUp()
# Set up activities
# Create a user as 'Crm Salesman' and added few groups
mail_activity_group = self.create_mail_activity_group()
self.employee = self.env["res.users"].create(
{
"company_id": self.env.ref("base.main_company").id,
"name": "Employee",
"login": "csu",
"email": "crmuser@yourcompany.com",
"groups_id": [
(
6,
0,
[
self.env.ref("base.group_user").id,
],
)
],
}
)
# Create a user who doesn't have access to anything except activities
self.employee2 = self.env["res.users"].create(
{
"company_id": self.env.ref("base.main_company").id,
"name": "Employee2",
"login": "alien",
"email": "alien@yourcompany.com",
"groups_id": [(6, 0, [mail_activity_group.id])],
}
)
# lead_model_id = self.env['ir.model']._get('crm.lead').id
partner_model = self.env["ir.model"]._get("res.partner")
ActivityType = self.env["mail.activity.type"]
self.activity1 = ActivityType.create(
{
"name": "Initial Contact",
"delay_count": 5,
"delay_unit": "days",
"summary": "ACT 1 : Presentation, barbecue, ... ",
"res_model": partner_model.model,
}
)
self.activity2 = ActivityType.create(
{
"name": "Call for Demo",
"delay_count": 6,
"delay_unit": "days",
"summary": "ACT 2 : I want to show you my ERP !",
"res_model": partner_model.model,
}
)
self.activity3 = ActivityType.create(
{
"name": "Celebrate the sale",
"delay_count": 3,
"delay_unit": "days",
"summary": "ACT 3 : "
"Beers for everyone because I am a good salesman !",
"res_model": partner_model.model,
}
)
# I create an opportunity, as employee
self.partner_client = self.env.ref("base.res_partner_1")
# assure there isn't any mail activity yet
self.env["mail.activity"].sudo().search([]).unlink()
self.act1 = (
self.env["mail.activity"]
.sudo()
.create(
{
"activity_type_id": self.activity3.id,
"note": "Partner activity 1.",
"res_id": self.partner_client.id,
"res_model_id": partner_model.id,
"user_id": self.employee.id,
}
)
)
self.act2 = (
self.env["mail.activity"]
.sudo()
.create(
{
"activity_type_id": self.activity2.id,
"note": "Partner activity 2.",
"res_id": self.partner_client.id,
"res_model_id": partner_model.id,
"user_id": self.employee.id,
}
)
)
self.act3 = (
self.env["mail.activity"]
.sudo()
.create(
{
"activity_type_id": self.activity3.id,
"note": "Partner activity 3.",
"res_id": self.partner_client.id,
"res_model_id": partner_model.id,
"user_id": self.employee.id,
}
)
)
def create_mail_activity_group(self):
manager_mail_activity_test_group = self.env["res.groups"].create(
{"name": "group_manager_mail_activity_test"}
)
mail_activity_model_id = (
self.env["ir.model"]
.sudo()
.search([("model", "=", "mail.activity")], limit=1)
)
access = self.env["ir.model.access"].create(
{
"name": "full_access_mail_activity",
"model_id": mail_activity_model_id.id,
"perm_read": True,
"perm_write": True,
"perm_create": True,
"perm_unlink": True,
}
)
access.group_id = manager_mail_activity_test_group
return manager_mail_activity_test_group
def get_view(self, activity):
action = activity.open_origin()
result = self.env[action.get("res_model")].load_views(action.get("views"))
return result.get("fields_views").get(action.get("view_mode"))
def test_open_origin_res_partner(self):
"""This test case checks
- If the method redirects to the form view of the correct one
of an object of the 'res.partner' class to which the activity
belongs.
"""
# Id of the form view for the class 'crm.lead', type 'lead'
form_view_partner_id = self.env.ref("base.view_partner_form").id
# Id of the form view return open_origin()
view = self.get_view(self.act1)
# Check the next view is correct
self.assertEqual(form_view_partner_id, view.get("view_id"))
# Id of the form view return open_origin()
view = self.get_view(self.act2)
# Check the next view is correct
self.assertEqual(form_view_partner_id, view.get("view_id"))
# Id of the form view return open_origin()
view = self.get_view(self.act3)
# Check the next view is correct
self.assertEqual(form_view_partner_id, view.get("view_id"))
def test_redirect_to_activities(self):
"""This test case checks
- if the method returns the correct action,
- if the correct activities are shown.
"""
action_id = self.env.ref("mail_activity_board.open_boards_activities").id
action = self.partner_client.redirect_to_activities(
**{"id": self.partner_client.id}
)
self.assertEqual(action.get("id"), action_id)
kwargs = {"groupby": ["activity_type_id"]}
kwargs["domain"] = action.get("domain")
result = self.env[action.get("res_model")].load_views(action.get("views"))
fields = result.get("fields_views").get("kanban").get("fields")
kwargs["fields"] = list(fields.keys())
result = self.env["mail.activity"].read_group(**kwargs)
acts = []
for group in result:
records = self.env["mail.activity"].search_read(
domain=group.get("__domain"), fields=kwargs["fields"]
)
acts += [record_id.get("id") for record_id in records]
for act in acts:
self.assertIn(act, self.partner_client.activity_ids.ids)

View File

@ -0,0 +1,292 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--
VIEWS
-->
<!-- FORM VIEW -->
<record id="mail_activity_view_form_board" model="ir.ui.view">
<field name="name">mail.activity.boards.view.form</field>
<field name="model">mail.activity</field>
<field name="priority">30</field>
<field name="arch" type="xml">
<form string="Activity Form" create="false" edit="false" delete="false">
<sheet string="Activity">
<button
name="open_origin"
type="object"
class="centre oe_link"
nolabel="1"
>
<h1><field name="res_name" /></h1>
</button>
<field name="activity_category" invisible="1" />
<field name="res_model" invisible="1" />
<field name="res_model_id" invisible="1" />
<field name="res_id" invisible="1" />
<group>
<group>
<field
name="activity_type_id"
required="1"
options="{'no_create': True, 'no_open': True}"
/>
<field name="res_model_id_name" />
<field name="calendar_event_id" invisible="1" />
<field name="create_date" invisible="1" />
</group>
<group>
<field
name="date_deadline"
attrs="{'invisible': [('activity_category', '=', 'meeting')]}"
/>
<field
name="calendar_event_id_start"
string="Start meeting"
attrs="{'invisible': [('calendar_event_id','=', False)]}"
/>
<field
name="duration"
widget="float_time"
attrs="{'invisible': ['|',('duration', '=', False),
('calendar_event_id','=', False)]}"
/>
<field name="user_id" options="{'no_open': True}" />
</group>
</group>
<group
attrs="{'invisible': ['|',('calendar_event_id','=', False),('calendar_event_id_partner_ids','=', False)]}"
>
<field name="calendar_event_id_partner_ids" mode="kanban" />
</group>
<group>
<field name="summary" placeholder="e.g. Discuss proposal" />
<field name="note" placeholder="Log a note..." />
</group>
</sheet>
</form>
</field>
</record>
<!-- TREE VIEW -->
<record id="mail_activity_view_tree" model="ir.ui.view">
<field name="name">mail.activity.boards.view.tree</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_tree" />
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="default_order" />
<attribute
name="decoration-danger"
>(date_deadline &lt; current_date)</attribute>
<attribute
name="decoration-warning"
>(date_deadline == current_date)</attribute>
<attribute
name="decoration-success"
>(date_deadline &gt; current_date)</attribute>
</xpath>
</field>
</record>
<!-- KANBAN VIEW -->
<record id="mail_activity_view_kanban" model="ir.ui.view">
<field name="name">mail.activity.boards.view.kanban</field>
<field name="model">mail.activity</field>
<field name="priority" eval="10" />
<field name="arch" type="xml">
<kanban
default_group_by="activity_type_id"
class="_kanban_small_column o_opportunity_kanban"
create="0"
_order="date_deadline"
group_create="false"
group_delete="false"
group_edit="false"
>
<field name="user_id" />
<field name="res_id" />
<field name="res_name" />
<field name="res_model" />
<field name="summary" />
<field name="date_deadline" />
<field name="state" />
<field name="icon" />
<field name="activity_type_id" />
<field name="activity_category" />
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="oe_kanban_content">
<div>
<strong class="o_kanban_record_subtitle">
<span
t-attf-class="fa #{record.icon.raw_value}"
/>
<field name="summary" />
</strong>
</div>
<div>
<strong class="o_kanban_record_title"><field
name="res_name"
/></strong>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
<t
t-set="act_date"
t-value="new Date(record.date_deadline.raw_value)"
/>
<t t-if="act_date &lt; (new Date())">
<span t-attf-class="text-danger"><i
title="date"
class="fa fa-clock-o"
/></span>
<t
t-if="record.activity_category.raw_value!='meeting'"
>
<span t-attf-class="text-danger">
<field
name="date_deadline"
t-options='{"widget": "date"}'
/>
</span>
</t>
<t t-else="">
<span t-attf-class="text-danger">
<field
name="calendar_event_id_start"
t-options='{"widget": "date"}'
/>
</span>
</t>
</t>
<t t-else="">
<span><i
title="date"
class="fa fa-clock-o"
/></span>
<t
t-if="record.activity_category.raw_value!='meeting'"
>
<span>
<field
name="date_deadline"
t-options='{"widget": "date"}'
/>
</span>
</t>
<t t-else="">
<field
name="calendar_event_id_start"
t-options='{"widget": "date"}'
/>
</t>
</t>
</div>
<div class="oe_kanban_bottom_right">
<img
t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)"
t-att-title="record.user_id.value"
t-att-alt="record.user_id.value"
width="24"
height="24"
class="oe_kanban_avatar"
/>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- SEARCH VIEW -->
<record id="mail_activity_view_search" model="ir.ui.view">
<field name="name">mail.activity.boards.view.search</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_search" />
<field name="priority" eval="2" />
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr='//field[@name="res_model"]' position='before'>
<field name="user_id" />
<field name="res_name" string="Origin" />
</xpath>
<xpath expr='//filter[@name="activities_overdue"]' position='before'>
<filter
string="Act. next month"
name="activities_month"
domain="[('date_deadline', '&lt;', (context_today()+datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"
help="Show activities scheduled for next month."
/>
<filter
string="Act. next 6 months"
name="activities_6_month"
domain="[('date_deadline', '&lt;', (context_today()+datetime.timedelta(days=180)).strftime('%Y-%m-%d'))]"
help="Show activities scheduled for next 6 months."
/>
<separator />
</xpath>
<xpath expr='//search/group' position='inside'>
<filter
string="User"
name='assigned_user'
context="{'group_by':'user_id'}"
/>
<filter
string="Origin"
name='origin'
context="{'group_by': 'res_model_id'}"
/>
</xpath>
</field>
</record>
<!--
ACTION
-->
<record model="ir.actions.act_window" id="open_boards_activities">
<field name="name">Activities</field>
<field name="res_model">mail.activity</field>
<field name="view_mode">kanban,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
<field
name="view_ids"
eval="[(5, 0, 0),
(0, 0, {'view_mode': 'kanban', 'view_id': ref('mail_activity_view_kanban')}),
(0, 0, {'view_mode': 'tree', 'view_id': ref('mail_activity_view_tree')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('mail_activity_view_form_board')}),
(0, 0, {'view_mode': 'calendar'}),
(0, 0, {'view_mode': 'pivot'}),
(0, 0, {'view_mode': 'graph'})]"
/>
<field name="search_view_id" ref="mail_activity_view_search" />
</record>
<!--
Menus
-->
<menuitem
id="board_menu_activities"
name="Activities"
parent="base.menu_board_root"
action="open_boards_activities"
sequence="1"
/>
</odoo>

View File

@ -0,0 +1 @@
../../../../mail_activity_board

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)