@ -0,0 +1,49 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
||||
|
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
Activity Management |
||||
|
=================== |
||||
|
Simplify activity management with a comprehensive dashboard, offering |
||||
|
centralized control and oversight for seamless organization-wide coordination |
||||
|
and tracking. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional configurations needed |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
Affero General Public License, Version 3 (AGPL v3). |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer:(V17) Unnimaya C O, |
||||
|
(V18) Jumana Jabin MP ,Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Jumana Jabin MP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import models |
@ -0,0 +1,55 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Jumana Jabin MP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
{ |
||||
|
'name': 'Activity Management', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Extra Tools', |
||||
|
'summary': """Dashboard for streamlined management of all activities.""", |
||||
|
'description': """Simplify activity management with a comprehensive |
||||
|
dashboard, offering centralized control and oversight for seamless |
||||
|
organization-wide coordination and tracking.""", |
||||
|
'author': 'Cybrosys Techno solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['mail'], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/activity_tag_views.xml', |
||||
|
'views/activity_dashbord_views.xml', |
||||
|
'views/mail_activity_views.xml' |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_backend': [ |
||||
|
'activity_dashboard_mngmnt/static/src/css/dashboard.css', |
||||
|
'activity_dashboard_mngmnt/static/src/css/style.scss', |
||||
|
'activity_dashboard_mngmnt/static/src/css/material-gauge.css', |
||||
|
'activity_dashboard_mngmnt/static/src/xml/activity_dashboard_template.xml', |
||||
|
'activity_dashboard_mngmnt/static/src/js/activity_dashboard.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': ['static/description/Banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': True, |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
## Module <activity_dashboard_mngmnt> |
||||
|
|
||||
|
#### 19.04.2025 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial commit for Activity Management |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Jumana Jabin MP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import activity_tag |
||||
|
from . import mail_activity |
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Jumana Jabin MP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from random import randint |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ActivityTag(models.Model): |
||||
|
"""Model to add tags to an activity""" |
||||
|
_name = "activity.tag" |
||||
|
_description = "Activity Tag" |
||||
|
|
||||
|
name = fields.Char(string='Tag Name', |
||||
|
help='Name of the activity tag.', |
||||
|
required=True, |
||||
|
translate=True) |
||||
|
color = fields.Integer(string='Color', |
||||
|
help='Field that gives color to the tag.', |
||||
|
default=randint(1, 11)) |
||||
|
|
||||
|
_sql_constraints = [ |
||||
|
('name_uniq', 'unique (name)', "Tag name already exists !"), ] |
@ -0,0 +1,113 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Jumana Jabin MP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from collections import defaultdict |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MailActivity(models.Model): |
||||
|
"""Inherited mail.activity model mostly to add dashboard functionalities""" |
||||
|
_inherit = "mail.activity" |
||||
|
|
||||
|
activity_tag_ids = fields.Many2many('activity.tag', |
||||
|
string='Activity Tags', |
||||
|
help='Select activity tags.') |
||||
|
state = fields.Selection([ |
||||
|
('planned', 'Planned'), |
||||
|
('today', 'Today'), |
||||
|
('done', 'Done'), |
||||
|
('overdue', 'Overdue')], string='State', help='State of the activity', |
||||
|
compute='_compute_state', store=True) |
||||
|
|
||||
|
def _action_done(self, feedback=False, attachment_ids=None): |
||||
|
"""Override _action_done to remove the unlink code""" |
||||
|
# marking as 'done' |
||||
|
messages = self.env['mail.message'] |
||||
|
next_activities_values = [] |
||||
|
# Search for all attachments linked to the activities we are about to |
||||
|
# unlink. This way, we |
||||
|
# can link them to the message posted and prevent their deletion. |
||||
|
attachments = self.env['ir.attachment'].search_read([ |
||||
|
('res_model', '=', self._name), |
||||
|
('res_id', 'in', self.ids), |
||||
|
], ['id', 'res_id']) |
||||
|
activity_attachments = defaultdict(list) |
||||
|
for attachment in attachments: |
||||
|
activity_id = attachment['res_id'] |
||||
|
activity_attachments[activity_id].append(attachment['id']) |
||||
|
for model, activity_data in self._classify_by_model().items(): |
||||
|
records = self.env[model].browse(activity_data['record_ids']) |
||||
|
for record, activity in zip(records, activity_data['activities']): |
||||
|
# extract value to generate next activities |
||||
|
if activity.chaining_type == 'trigger': |
||||
|
vals = (activity.with_context( |
||||
|
activity_previous_deadline=activity.date_deadline). |
||||
|
_prepare_next_activity_values()) |
||||
|
next_activities_values.append(vals) |
||||
|
# post message on activity, before deleting it |
||||
|
activity_message = record.message_post_with_source( |
||||
|
'mail.message_activity_done', |
||||
|
attachment_ids=attachment_ids, |
||||
|
render_values={ |
||||
|
'activity': activity, |
||||
|
'feedback': feedback, |
||||
|
'display_assignee': activity.user_id != self.env.user |
||||
|
}, |
||||
|
mail_activity_type_id=activity.activity_type_id.id, |
||||
|
subtype_xmlid='mail.mt_activities', |
||||
|
) |
||||
|
if activity.activity_type_id.keep_done: |
||||
|
attachment_ids = ((attachment_ids or []) |
||||
|
+ activity_attachments.get(activity.id, |
||||
|
[])) |
||||
|
if attachment_ids: |
||||
|
activity.attachment_ids = attachment_ids |
||||
|
# Moving the attachments in the message |
||||
|
# TODO: Fix void res_id on attachment when you create an |
||||
|
# activity with an image |
||||
|
# directly, see route /web_editor/attachment/add |
||||
|
if activity_attachments[activity.id]: |
||||
|
message_attachments = self.env['ir.attachment'].browse( |
||||
|
activity_attachments[activity.id]) |
||||
|
if message_attachments: |
||||
|
message_attachments.write({ |
||||
|
'res_id': activity_message.id, |
||||
|
'res_model': activity_message._name, |
||||
|
}) |
||||
|
activity_message.attachment_ids = message_attachments |
||||
|
messages += activity_message |
||||
|
next_activities = self.env['mail.activity'] |
||||
|
if next_activities_values: |
||||
|
next_activities = self.env['mail.activity'].create( |
||||
|
next_activities_values) |
||||
|
for rec in self: |
||||
|
if rec.state != 'done': |
||||
|
rec.state = 'done' |
||||
|
rec.active = False |
||||
|
return messages, next_activities |
||||
|
|
||||
|
def get_activity(self, activity_id): |
||||
|
"""Method for returning model and id of activity""" |
||||
|
activity = self.env['mail.activity'].browse(activity_id) |
||||
|
return { |
||||
|
'model': activity.res_model, |
||||
|
'res_id': activity.res_id |
||||
|
} |
|
After Width: | Height: | Size: 736 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 714 KiB |
After Width: | Height: | Size: 52 KiB |
@ -0,0 +1,90 @@ |
|||||
|
p, span, a, ul, li, button { |
||||
|
font-size: inherit; |
||||
|
font-weight: inherit; |
||||
|
line-height: inherit; |
||||
|
} |
||||
|
|
||||
|
strong { |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.head { |
||||
|
line-height: 1.5em; |
||||
|
font-weight: 300; |
||||
|
} |
||||
|
|
||||
|
strong { |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
|
||||
|
.sub_title { |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.sub_title div span { |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.chart #canvas_graph { |
||||
|
height: 400px !important; |
||||
|
} |
||||
|
|
||||
|
.highcharts-background { |
||||
|
fill: none; |
||||
|
} |
||||
|
.text-mauve{ |
||||
|
padding-right: 10px; |
||||
|
font-size: 30px; |
||||
|
padding-left: 0px; |
||||
|
padding-bottom: 5px; |
||||
|
padding-top: 10px; |
||||
|
} |
||||
|
|
||||
|
.dashboard-card__detail { |
||||
|
flex-grow: 1; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
padding-left: 0px; |
||||
|
padding-bottom: 5px; |
||||
|
padding-top: 10px; |
||||
|
margin:15px |
||||
|
} |
||||
|
|
||||
|
/* Apply common styles to all tables */ |
||||
|
.table_activity { |
||||
|
width: 100%; |
||||
|
padding: 24px; |
||||
|
background-color: white; |
||||
|
color: #454748; |
||||
|
border-collapse: separate; |
||||
|
margin-top: 20px; /* Adjust the margin-top value as needed */ |
||||
|
} |
||||
|
|
||||
|
/* Apply specific styles to the table headers */ |
||||
|
.table_activity thead { |
||||
|
background-color: #f5f5f5; /* Add a background color to the header */ |
||||
|
} |
||||
|
|
||||
|
/* Apply styles to the table head cells */ |
||||
|
.table_activity th { |
||||
|
text-align: left; /* Adjust text alignment as needed */ |
||||
|
} |
||||
|
|
||||
|
.activity_head{ |
||||
|
font-weight: bold; |
||||
|
font-size: 20px; |
||||
|
} |
||||
|
|
||||
|
.click-view{ |
||||
|
border-radius: 8px; |
||||
|
background-color: #c4c4f2; |
||||
|
width: 100px;height: 35px; |
||||
|
} |
||||
|
|
||||
|
.click-origin-view{ |
||||
|
border-radius: 8px; |
||||
|
background-color: #c4c4f2; |
||||
|
width: 100px; |
||||
|
height: 35px; |
||||
|
} |
@ -0,0 +1,194 @@ |
|||||
|
/* |
||||
|
* #### Gauge Component |
||||
|
* |
||||
|
* The standard markup for the component is: |
||||
|
* |
||||
|
* <div class="gauge"> |
||||
|
* <div class="gauge__container"> |
||||
|
* <div class="gauge__marker"></div> |
||||
|
* <div class="gauge__background"></div> |
||||
|
* <div class="gauge__center"></div> |
||||
|
* <div class="gauge__data"></div> |
||||
|
* <div class="gauge__needle"></div> |
||||
|
* </div> |
||||
|
* <div class="gauge__labels"> |
||||
|
* <span class="gauge__label--low">No</span> |
||||
|
* <span class="gauge__label--spacer"></span> |
||||
|
* <span class="gauge__label--high">Yes</span> |
||||
|
* </div> |
||||
|
* </div> |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
* First define all of the relevant rules that aren't dependent |
||||
|
* on the size of the gauge. We want to collect the size-depenent |
||||
|
* rules in one place to make it easier to adjust the size. |
||||
|
*/ |
||||
|
|
||||
|
.gauge { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.gauge__container { |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
position: absolute; |
||||
|
left: 50%; |
||||
|
overflow: hidden; |
||||
|
text-align: center; |
||||
|
-webkit-transform: translateX(-50%); |
||||
|
-moz-transform: translateX(-50%); |
||||
|
-ms-transform: translateX(-50%); |
||||
|
-o-transform: translateX(-50%); |
||||
|
transform: translateX(-50%); |
||||
|
} |
||||
|
|
||||
|
.gauge__background { |
||||
|
z-index: 0; |
||||
|
position: absolute; |
||||
|
background-color: #d8f0de; |
||||
|
top: 0; |
||||
|
border-radius: 300px 300px 0 0; |
||||
|
} |
||||
|
|
||||
|
.gauge__data { |
||||
|
z-index: 1; |
||||
|
position: absolute; |
||||
|
background-color: #00c29d; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
border-radius: 300px 300px 0 0; |
||||
|
-webkit-transform-origin: center bottom; |
||||
|
-moz-transform-origin: center bottom; |
||||
|
-ms-transform-origin: center bottom; |
||||
|
-o-transform-origin: center bottom; |
||||
|
transform-origin: center bottom; |
||||
|
} |
||||
|
|
||||
|
.gauge__center { |
||||
|
z-index: 2; |
||||
|
position: absolute; |
||||
|
background-color: #f9f9f9; |
||||
|
margin-right: auto; |
||||
|
border-radius: 300px 300px 0 0; |
||||
|
} |
||||
|
|
||||
|
.gauge__marker { |
||||
|
z-index: 3; |
||||
|
background-color: #fff; |
||||
|
position: absolute; |
||||
|
width: 1px; |
||||
|
} |
||||
|
|
||||
|
.gauge__needle { |
||||
|
z-index: 4; |
||||
|
background-color: #21242c; |
||||
|
height: 3px; |
||||
|
position: absolute; |
||||
|
-webkit-transform-origin: left center; |
||||
|
-moz-transform-origin: left center; |
||||
|
-ms-transform-origin: left center; |
||||
|
-o-transform-origin: left center; |
||||
|
transform-origin: left center; |
||||
|
} |
||||
|
|
||||
|
.gauge__labels { |
||||
|
display: table; |
||||
|
margin: 0 auto; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.gauge__label--low { |
||||
|
display: table-cell; |
||||
|
text-align: center; |
||||
|
color: #00c29d; |
||||
|
} |
||||
|
|
||||
|
.gauge__label--spacer { |
||||
|
display: table-cell; |
||||
|
} |
||||
|
|
||||
|
.gauge__label--high { |
||||
|
display: table-cell; |
||||
|
text-align: center; |
||||
|
color: #979f99; |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* Now define the rules that depend on the size of |
||||
|
* the gauge. We start with sizing for a small mobile |
||||
|
* device. |
||||
|
*/ |
||||
|
|
||||
|
.gauge { height: calc(120px + 3em); } |
||||
|
.gauge__container { width: 240px; height: 120px; } |
||||
|
.gauge__marker { height: 120px; left: 119.5px; } |
||||
|
.gauge__background { width: 240px; height: 120px; } |
||||
|
.gauge__center { width: 144px; height: 72px; top: 48px; margin-left: 48px; } |
||||
|
.gauge__data { width: 240px; height: 120px; } |
||||
|
.gauge__needle { left: 120px; top: 117px; width: 120px; } |
||||
|
.gauge__labels { top: 120px; width: 240px; } |
||||
|
.gauge__label--low { width: 48px; } |
||||
|
.gauge__label--spacer { width: 144px; } |
||||
|
.gauge__label--high { width: 48px; } |
||||
|
|
||||
|
/* |
||||
|
* Increase the gauge size slightly on larger viewports. |
||||
|
*/ |
||||
|
|
||||
|
@media only screen and (min-width: 400px) { |
||||
|
.gauge { height: calc(150px + 3em); } |
||||
|
.gauge__container { width: 300px; height: 150px; } |
||||
|
.gauge__marker { height: 150px; left: 149.5px; } |
||||
|
.gauge__background { width: 300px; height: 150px; } |
||||
|
.gauge__center { width: 180px; height: 90px; top: 60px; margin-left: 60px; } |
||||
|
.gauge__data { width: 300px; height: 150px; } |
||||
|
.gauge__needle { left: 150px; top: 147px; width: 150px; } |
||||
|
.gauge__labels { top: 160px; width: 300px; font-size: 20px;} |
||||
|
.gauge__label--low { width: 60px; } |
||||
|
.gauge__label--spacer { width: 180px; } |
||||
|
.gauge__label--high { width: 60px; } |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* As an option, the `gauge--liveupdate` class can be added |
||||
|
* to the main gauge element. When this class is present, |
||||
|
* we add a transition that animates any changes to the gauge |
||||
|
* value. Currently, the app does not use this option because |
||||
|
* all the inputs that can change gauge values are present |
||||
|
* on tab panels that are different from the gauge itself. |
||||
|
* Therefore, users won't be able to see any gauge changes |
||||
|
* when they make input changes. The code is available, though, |
||||
|
* should this change. |
||||
|
*/ |
||||
|
|
||||
|
.gauge--liveupdate .gauge__data, |
||||
|
.gauge--liveupdate .gauge__needle { |
||||
|
-webkit-transition: all 1s ease-in-out; |
||||
|
-moz-transition: all 1s ease-in-out; |
||||
|
-ms-transition: all 1s ease-in-out; |
||||
|
-o-transition: all 1s ease-in-out; |
||||
|
transition: all 1s ease-in-out; |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* For a given gauge value, x, ranging from 0.0 to 1.0, set |
||||
|
* the `transform: rotate()` property according to the |
||||
|
* following equation: `-0.5 + 0.5x turns` The default |
||||
|
* properties below represent an x value of 0. |
||||
|
*/ |
||||
|
|
||||
|
.gauge__data { |
||||
|
-webkit-transform: rotate(-.50turn); |
||||
|
-moz-transform: rotate(-.50turn); |
||||
|
-ms-transform: rotate(-.50turn); |
||||
|
-o-transform: rotate(-.50turn); |
||||
|
transform: rotate(-.50turn); |
||||
|
} |
||||
|
.gauge__needle { |
||||
|
-webkit-transform: rotate(-.50turn); |
||||
|
-moz-transform: rotate(-.50turn); |
||||
|
-ms-transform: rotate(-.50turn); |
||||
|
-o-transform: rotate(-.50turn); |
||||
|
transform: rotate(-.50turn); |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
.o_action_manager { |
||||
|
direction: ltr; |
||||
|
webkit-box-flex: 1; |
||||
|
webkit-flex: 1 1 auto; |
||||
|
flex: 1 1 auto; |
||||
|
overflow: scroll !important; |
||||
|
} |
||||
|
.activity-dashboard-card { |
||||
|
display: flex; |
||||
|
flex-direction: row; /* Change to row for linear arrangement */ |
||||
|
justify-content: center; |
||||
|
border-radius: 0.3rem; |
||||
|
padding: 1.7rem 1.5rem 1.5rem 1.5rem; |
||||
|
margin: 1rem auto; |
||||
|
height: 100px; |
||||
|
cursor: pointer; |
||||
|
align-items: center; |
||||
|
box-sizing: border-box; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.activity-dashboard-card__icon-container { |
||||
|
height: 50px; |
||||
|
border-radius: 50%; |
||||
|
} |
||||
|
.my_activity { |
||||
|
background-color: #229db9; |
||||
|
} |
||||
|
.all_activity{ |
||||
|
background: #88dfdf; |
||||
|
} |
||||
|
.planned_activity { |
||||
|
background-color: #e8c5ac; |
||||
|
} |
||||
|
.completed_activity{ |
||||
|
background: #a7a1f4; |
||||
|
} |
||||
|
|
||||
|
.today_activity{ |
||||
|
background: #f3bdf4; |
||||
|
} |
||||
|
.overdue_activity { |
||||
|
background-color: #a2d2fb; |
||||
|
} |
||||
|
.cancelled_activity{ |
||||
|
background: #beeecc; |
||||
|
} |
||||
|
.activity_type { |
||||
|
background-color: #ecb9b9; |
||||
|
} |
||||
|
.dashboard_main_section { |
||||
|
margin: 20px; |
||||
|
} |
@ -0,0 +1,204 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import { registry } from "@web/core/registry"; |
||||
|
import { useService } from "@web/core/utils/hooks"; |
||||
|
import { Layout } from "@web/search/layout"; |
||||
|
import { Component, onWillStart } from "@odoo/owl"; |
||||
|
import { _t } from "@web/core/l10n/translation"; |
||||
|
export class ActivityDashboard extends Component { |
||||
|
setup() { |
||||
|
super.setup(); |
||||
|
this.orm = useService('orm'); |
||||
|
onWillStart(async () => await this.render_dashboards()); |
||||
|
} |
||||
|
async render_dashboards (ev) { |
||||
|
//Method for rendering dashboard.
|
||||
|
var self = this; |
||||
|
const planned_activity = await self.orm.call('mail.activity', |
||||
|
'search_read', [], { |
||||
|
domain: [["state", "=", 'planned']] |
||||
|
}); |
||||
|
const today_activity = await self.orm.call('mail.activity', |
||||
|
'search_read', [], { |
||||
|
domain: [["state", "=", 'today']] |
||||
|
}); |
||||
|
const overdue_activity = await self.orm.call('mail.activity', |
||||
|
'search_read', [], { |
||||
|
domain: [["state", "=", 'overdue']] |
||||
|
}); |
||||
|
const done_activity = await self.orm.call('mail.activity', |
||||
|
'search_read', [], |
||||
|
{ |
||||
|
domain: [["state", "=", 'done'],['active','in',[true,false]]] |
||||
|
}); |
||||
|
const activity_type = await self.orm.call('mail.activity.type', |
||||
|
'search_count', [], |
||||
|
{domain:[]}) |
||||
|
self.len_all= planned_activity.length+done_activity |
||||
|
.length+today_activity.length+overdue_activity.length |
||||
|
self.len_planned=planned_activity.length |
||||
|
self.len_done=done_activity.length |
||||
|
self.len_today=today_activity.length |
||||
|
self.len_overdue=overdue_activity.length |
||||
|
self.done_activity=done_activity |
||||
|
self.planned_activity=planned_activity |
||||
|
self.today_activity=today_activity |
||||
|
self.overdue_activity=overdue_activity |
||||
|
self.activity_type=await self.orm.call('mail.activity.type', |
||||
|
'search_count', [], |
||||
|
{domain:[]}); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler to open the list of all activities. |
||||
|
*/ |
||||
|
show_all_activities(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("All Activities"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity', |
||||
|
view_mode: 'list,form', |
||||
|
domain: [['active', 'in', [true,false]]], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler to open the list of planned activities. |
||||
|
*/ |
||||
|
show_planned_activities(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("Planned Activities"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'planned']], |
||||
|
view_mode: 'list,form', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler to open the list of completed activities. |
||||
|
*/ |
||||
|
show_completed_activities(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("Completed Activities"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'done'],['active','in',[true,false]]], |
||||
|
view_mode: 'list,form', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler to open the list of today's activities. |
||||
|
*/ |
||||
|
show_today_activities(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("Today's Activities"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'today']], |
||||
|
view_mode: 'list,form', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
}/** |
||||
|
* Event handler to open the list of overdue activities. |
||||
|
*/ |
||||
|
show_overdue_activities(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("Overdue Activities"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'overdue']], |
||||
|
view_mode: 'list,form', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler to open the list of activity types. |
||||
|
*/ |
||||
|
show_activity_types(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
var options = { |
||||
|
on_reverse_breadcrumb: self.on_reverse_breadcrumb, |
||||
|
}; |
||||
|
this.env.services.action.doAction({ |
||||
|
name: _t("Activity Type"), |
||||
|
type: 'ir.actions.act_window', |
||||
|
res_model: 'mail.activity.type', |
||||
|
view_mode: 'list,form', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}, options); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler for view button click. |
||||
|
*/ |
||||
|
click_view(e) { |
||||
|
var id = e.target.value; |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'All Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
res_id: parseInt(id), |
||||
|
views: [[false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
/** |
||||
|
* Event handler for view button click. |
||||
|
*/ |
||||
|
async click_origin(e) { |
||||
|
var id = e.target.value; |
||||
|
var self = this; |
||||
|
var result =await self.orm.call('mail.activity', 'get_activity', |
||||
|
[0,parseInt(id)],{}) |
||||
|
self.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'Activity Origin', |
||||
|
res_model: result.model, |
||||
|
res_id: result.res_id, |
||||
|
views: [[false, 'form']], |
||||
|
view_mode: 'form', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
ActivityDashboard.template = "ActivityDashboard"; |
||||
|
ActivityDashboard.components = { Layout }; |
||||
|
registry.category("actions").add("activity_dashboard", ActivityDashboard); |
@ -0,0 +1,336 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<templates> |
||||
|
<!-- Dashboard template--> |
||||
|
<t t-name="ActivityDashboard"> |
||||
|
<div> |
||||
|
<div class="form-group"> |
||||
|
<h1 class="head" style="margin: 20px;">Activity Dashboard</h1> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="table_view"> |
||||
|
<t t-call="ManageActivity"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
<t t-name="ManageActivity"> |
||||
|
<section class="dashboard_main_section"> |
||||
|
<div class="activity_dash_card row"> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div |
||||
|
class="activity-dashboard-card activity-my-activity all_activity" |
||||
|
t-on-click="show_all_activities"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="len_all"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">All Activities</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div class="activity-dashboard-card planned_activity" |
||||
|
t-on-click="show_planned_activities"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="len_planned"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">Planned Activities</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div class="activity-dashboard-card completed_activity" |
||||
|
t-on-click="show_completed_activities"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="len_done"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">Completed Activities</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div class="activity-dashboard-card today_activity" |
||||
|
t-on-click="show_today_activities"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="len_today"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">Today's Activities</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div class="activity-dashboard-card overdue_activity" |
||||
|
t-on-click="show_overdue_activities"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="len_overdue"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">Overdue Activities</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-6 col-md-4"> |
||||
|
<div class="activity-dashboard-card activity_type" |
||||
|
t-on-click="show_activity_types"> |
||||
|
<div class="activity-dashboard-card__icon-container d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<t t-esc="activity_type"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__detail"> |
||||
|
<h2 class="head">Activity Types</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<div class="table_activity table_planned_activity"> |
||||
|
<table id="planned-table" cellspacing="10" width="100%"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th colspan="6" class="activity_head">Planned |
||||
|
Activities |
||||
|
</th> |
||||
|
</tr> |
||||
|
<t t-if="planned_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="planned_activity != ''"> |
||||
|
<thead class="table table-bordered mt32"> |
||||
|
<tr class="table_head"> |
||||
|
<th class="table_head_" style="width:25%">Name</th> |
||||
|
<th class="table_head_">Activity Type</th> |
||||
|
<th class="table_head_">Assigned to</th> |
||||
|
<th class="table_head_">Dead Line Date</th> |
||||
|
<th class="table_head_">View</th> |
||||
|
<th class="table_head_">Origin</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="planned_activity" t-as="line" |
||||
|
t-key="line.id"> |
||||
|
<td> |
||||
|
<t t-esc="line['display_name']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['activity_type_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['user_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['date_deadline']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
t-on-click="click_view" |
||||
|
class="click-view"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
class="click-origin-view" |
||||
|
t-on-click="click_origin"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
<div id="pagination-container"/> |
||||
|
</div> |
||||
|
<div class="table_activity table_today_activity"> |
||||
|
<table cellspacing="10" width="100%"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th colspan="6" class="activity_head">Today's |
||||
|
Activities |
||||
|
</th> |
||||
|
</tr> |
||||
|
<t t-if="today_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="today_activity != ''"> |
||||
|
<thead class="table table-bordered mt32"> |
||||
|
<tr class="table_head"> |
||||
|
<th class="table_head_" style="width:25%">Name</th> |
||||
|
<th class="table_head_">Activity Type</th> |
||||
|
<th class="table_head_">Assigned to</th> |
||||
|
<th class="table_head_">Dead Line Date</th> |
||||
|
<th class="table_head_">View</th> |
||||
|
<th class="table_head_">Origin</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="today_activity" t-as="line" |
||||
|
t-key="line.id"> |
||||
|
<td> |
||||
|
<t t-esc="line['display_name']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['activity_type_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['user_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['date_deadline']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
class="click-view" |
||||
|
t-on-click="click_view"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
class="click-origin-view" |
||||
|
t-on-click="click_origin"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</div> |
||||
|
<div class="table_activity table_main_view"> |
||||
|
<table cellspacing="10" width="100%"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th colspan="6" class="activity_head">Completed |
||||
|
Activities |
||||
|
</th> |
||||
|
</tr> |
||||
|
<t t-if="done_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="done_activity != ''"> |
||||
|
<thead class="table table-bordered mt32"> |
||||
|
<tr class="table_head"> |
||||
|
<th class="table_head_">Name</th> |
||||
|
<th class="table_head_">Activity Type</th> |
||||
|
<th class="table_head_">Assigned to</th> |
||||
|
<th class="table_head_">Dead Line Date</th> |
||||
|
<th class="table_head_">View</th> |
||||
|
<th class="table_head_">Origin</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="done_activity" t-as="line" |
||||
|
t-key="line.id"> |
||||
|
<td style="width:25%"> |
||||
|
<t t-esc="line['display_name']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['activity_type_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['user_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['date_deadline']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
class="click-view" |
||||
|
t-on-click="click_view"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
t-on-click="click_origin" |
||||
|
class="click-origin-view"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</div> |
||||
|
<div class="table_activity table_main_view"> |
||||
|
<table cellspacing="10" width="100%"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th colspan="6" class="activity_head">Overdue |
||||
|
Activities |
||||
|
</th> |
||||
|
</tr> |
||||
|
<t t-if="overdue_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="overdue_activity != ''"> |
||||
|
<thead class="table table-bordered mt32"> |
||||
|
<tr class="table_head"> |
||||
|
<th class="table_head_">Name</th> |
||||
|
<th class="table_head_">Activity Type</th> |
||||
|
<th class="table_head_">Assigned to</th> |
||||
|
<th class="table_head_">Dead Line Date</th> |
||||
|
<th class="table_head_">View</th> |
||||
|
<th class="table_head_">Origin</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="overdue_activity" t-as="line" |
||||
|
t-key="line.id"> |
||||
|
<td style="width:25%"> |
||||
|
<t t-esc="line['display_name']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['activity_type_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['user_id']['1']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="line['date_deadline']"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
t-on-click="click_view" |
||||
|
class="click-view"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td> |
||||
|
<button t-att-value="line['id']" |
||||
|
class="click-origin-view" |
||||
|
t-on-click="click_origin"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</div> |
||||
|
</t> |
||||
|
</templates> |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Dashboard menu action--> |
||||
|
<record id="activity_management_dashboard_action" model="ir.actions.client"> |
||||
|
<field name="name">Dashboard</field> |
||||
|
<field name="tag">activity_dashboard</field> |
||||
|
<field name="target">current</field> |
||||
|
</record> |
||||
|
<!-- Dashboard menu--> |
||||
|
<menuitem id="activity_management_dashboard_menu" |
||||
|
name="Dashboard" |
||||
|
parent="activity_menu_root" |
||||
|
action="activity_management_dashboard_action" |
||||
|
sequence="-100"/> |
||||
|
</odoo> |
@ -0,0 +1,68 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Activity tag form view--> |
||||
|
<record id="activity_tag_view_form" model="ir.ui.view"> |
||||
|
<field name="name">activity.tag.view.form</field> |
||||
|
<field name="model">activity.tag</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Tags"> |
||||
|
<sheet> |
||||
|
<div class="oe_title"> |
||||
|
<label for="name"/> |
||||
|
<h1> |
||||
|
<field name="name" placeholder="e.g. Services"/> |
||||
|
</h1> |
||||
|
</div> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="color" required="True" |
||||
|
widget="color_picker"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Activity tag tree view--> |
||||
|
<record id="activity_tag_view_tree" model="ir.ui.view"> |
||||
|
<field name="name">activity.tag.view.tree</field> |
||||
|
<field name="model">activity.tag</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<list string="Tags" editable="bottom" sample="1"> |
||||
|
<field name="name"/> |
||||
|
<field name="color" widget="color_picker"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Activity tag form action--> |
||||
|
<record id="activity_tag_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Activity Tag</field> |
||||
|
<field name="res_model">activity.tag</field> |
||||
|
<field name="view_mode">list,form</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="o_view_nocontent_smiling_face"> |
||||
|
No tags found. Let's create one! |
||||
|
</p> |
||||
|
<p> |
||||
|
Tags are perfect to categorize. |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Activity Dashboard menu--> |
||||
|
<menuitem id="activity_menu_root" name="Activity Dashboard" |
||||
|
sequence="25" |
||||
|
web_icon="activity_dashboard_mngmnt,static/description/icon.png"/> |
||||
|
<!-- Configuration menu--> |
||||
|
<menuitem id="activity_menu_configuration" name="Configuration" |
||||
|
parent="activity_menu_root" |
||||
|
sequence="30"/> |
||||
|
<!-- Activity tag menu--> |
||||
|
<menuitem id="activity_tag_menu" name="Activity Tag" |
||||
|
parent="activity_menu_configuration" |
||||
|
action="activity_tag_action" |
||||
|
sequence="100"/> |
||||
|
<!-- Activity type menu--> |
||||
|
<menuitem id="activity_type_menu" name="Activity Type" |
||||
|
parent="activity_menu_configuration" |
||||
|
action="mail.mail_activity_type_action" sequence="100"/> |
||||
|
</odoo> |