@ -0,0 +1,50 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
All in one Schedule Activity Management |
||||
|
======================================= |
||||
|
* Schedule Activity Management for Odoo 17 |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* Set Schedule Management user inside the user |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer: |
||||
|
(v16) Rosmy , |
||||
|
(V17) Anjhana A K, |
||||
|
|
||||
|
* 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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import models |
@ -0,0 +1,62 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'All in one Schedule Activity Management', |
||||
|
'version': '17.0.1.0.0', |
||||
|
'category': 'Tools', |
||||
|
'summary': """The module allows the manage all scheduled activities.""", |
||||
|
'description': """The module is a robust tool for organizing and overseeing |
||||
|
all scheduled tasks and events, and Activity manager could manage scheduled |
||||
|
activities. """, |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['base_setup', 'mail', 'sale_management'], |
||||
|
'data': [ |
||||
|
'security/all_in_one_schedule_activity_management_groups.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'data/ir_cron_data.xml', |
||||
|
'views/mail_activity_views.xml', |
||||
|
'views/activity_tag_views.xml', |
||||
|
'views/my_activity_views.xml', |
||||
|
'views/activity_dashbord_views.xml', |
||||
|
'views/reporting_activity_views.xml', |
||||
|
'views/activity_history_views.xml', |
||||
|
'views/res_config_setting_views.xml', |
||||
|
'views/menu_views.xml', |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_backend': [ |
||||
|
'all_in_one_schedule_activity_management/static/src/js/activity_dashboard.js', |
||||
|
'all_in_one_schedule_activity_management/static/src/xml/activity_dashboard_view.xml', |
||||
|
'all_in_one_schedule_activity_management/static/src/css/dashboard.css', |
||||
|
'all_in_one_schedule_activity_management/static/src/css/style.scss', |
||||
|
'all_in_one_schedule_activity_management/static/src/css/material-gauge.css', |
||||
|
], |
||||
|
}, |
||||
|
'license': 'LGPL-3', |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': True, |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- This XML code creates a scheduled action for checking the due activities. --> |
||||
|
<data noupdate="1"> |
||||
|
<record id="ir_cron_mail_on_due_action" model="ir.cron"> |
||||
|
<field name="name">Recurring Todo Activity</field> |
||||
|
<field name="model_id" ref="model_mail_activity"/> |
||||
|
<field name="state">code</field> |
||||
|
<field name="code">model.action_mail_on_due_date()</field> |
||||
|
<field name="user_id" ref="base.user_root"/> |
||||
|
<field name="interval_number">1</field> |
||||
|
<field name="interval_type">days</field> |
||||
|
<field name="numbercall">-1</field> |
||||
|
</record> |
||||
|
</data> |
@ -0,0 +1,6 @@ |
|||||
|
## Module <all_in_one_schedule_activity_management> |
||||
|
|
||||
|
#### 29.03.2024 |
||||
|
#### Version 17.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial commit for All in one Schedule Activity Management |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import mail_activity |
||||
|
from . import activity_tag |
||||
|
from . import res_config_settings |
@ -0,0 +1,42 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
from random import randint |
||||
|
|
||||
|
|
||||
|
class ActivityTag(models.Model): |
||||
|
"""This class is used to create tags for activity""" |
||||
|
_name = "activity.tag" |
||||
|
_description = "Activity Tag" |
||||
|
|
||||
|
def _get_default_color(self): |
||||
|
"""to get colors for the tag""" |
||||
|
return randint(1, 11) |
||||
|
|
||||
|
name = fields.Char('Tag Name', required=True, translate=True, |
||||
|
help="Tag name") |
||||
|
color = fields.Integer('Color', default=_get_default_color, |
||||
|
help="Tag color") |
||||
|
|
||||
|
_sql_constraints = [ |
||||
|
('name_uniq', 'unique (name)', "Tag name already exists !"), |
||||
|
] |
@ -0,0 +1,180 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from collections import defaultdict |
||||
|
from odoo import fields, models, _ |
||||
|
from odoo.exceptions import UserError |
||||
|
|
||||
|
|
||||
|
class MailActivity(models.Model): |
||||
|
"""This class is used to inherit the mail.activity model""" |
||||
|
_inherit = "mail.activity" |
||||
|
|
||||
|
state = fields.Selection( |
||||
|
[ |
||||
|
("overdue", "Overdue"), ("today", "Today"), ("planned", "Planned"), |
||||
|
("done", "Done"), ("cancel", "Cancelled"),], |
||||
|
"State", compute="_compute_state", store=True, |
||||
|
help="state for the activity",) |
||||
|
active = fields.Boolean("Active", default=True, |
||||
|
help="The record make Active") |
||||
|
activity_type = fields.Many2many( |
||||
|
"activity.tag", string="Activity Type", |
||||
|
help="Activity type") |
||||
|
|
||||
|
def action_mail_on_due_date(self): |
||||
|
"""This function is used to send mails on due date""" |
||||
|
activity_email = self.env["mail.activity"].search([]) |
||||
|
notification_on_date = ( |
||||
|
self.env["ir.config_parameter"].sudo().get_param("notify_on_due_date") |
||||
|
) |
||||
|
notification_on_expiry = ( |
||||
|
self.env["ir.config_parameter"].sudo().get_param("notify_on_expiry") |
||||
|
) |
||||
|
for rec in activity_email: |
||||
|
if notification_on_expiry: |
||||
|
if rec.date_deadline < fields.date.today(): |
||||
|
self.env["mail.mail"].sudo().create( |
||||
|
{ |
||||
|
"email_from": self.env.company.email, |
||||
|
"author_id": self.env.user.partner_id.id, |
||||
|
"body_html": "Hello <br> You missed the %s activity for the document %s </br>" |
||||
|
% (rec.activity_type_id.name, rec.res_name), |
||||
|
"subject": "%s Activity missed" % rec.activity_type_id.name, |
||||
|
"email_to": rec.user_id.email, |
||||
|
} |
||||
|
).send(auto_commit=False) |
||||
|
if notification_on_date: |
||||
|
if rec.date_deadline == fields.date.today(): |
||||
|
self.env["mail.mail"].sudo().create( |
||||
|
{ |
||||
|
"email_from": self.env.company.email, |
||||
|
"author_id": self.env.user.partner_id.id, |
||||
|
"body_html": "Hello <br> Today is your %s activity for the document %s </br>" |
||||
|
% (rec.activity_type_id.name, rec.res_name), |
||||
|
"subject": "Today %s Activity" % rec.activity_type_id.name, |
||||
|
"email_to": rec.user_id.email, |
||||
|
} |
||||
|
).send(auto_commit=False) |
||||
|
|
||||
|
def action_activity_cancel(self): |
||||
|
"""cancel activity""" |
||||
|
for rec in self: |
||||
|
if rec.state == "cancel": |
||||
|
raise UserError(_("You Cant Cancelled this activity %s") % rec.res_name) |
||||
|
else: |
||||
|
rec.action_cancel() |
||||
|
|
||||
|
def action_activity_done(self): |
||||
|
"""done activity""" |
||||
|
for rec in self: |
||||
|
if rec.state == "done": |
||||
|
raise UserError(_("You Cant Cancelled this activity %s") % rec.res_name) |
||||
|
else: |
||||
|
rec._action_done() |
||||
|
|
||||
|
def get_activity_count(self): |
||||
|
"""get the activity count details""" |
||||
|
activity = self.env["mail.activity"] |
||||
|
all_activity = activity.search([]) |
||||
|
planned = activity.search([("state", "=", "planned")]) |
||||
|
overdue = activity.search([("state", "=", "overdue")]) |
||||
|
today = activity.search([("state", "=", "today")]) |
||||
|
done = activity.search([("state", "=", "done"), ("active", "=", False)]) |
||||
|
cancel = activity.search([("state", "=", "cancel")]) |
||||
|
return { |
||||
|
"len_all": len(all_activity), |
||||
|
"len_overdue": len(overdue), |
||||
|
"len_planned": len(planned), |
||||
|
"len_today": len(today), |
||||
|
"len_done": len(done), |
||||
|
"len_cancel": len(cancel), |
||||
|
} |
||||
|
|
||||
|
def get_activity(self, id): |
||||
|
"""Function for to get the activity""" |
||||
|
activity = self.env["mail.activity"].search([("id", "=", id)]) |
||||
|
return {"model": activity.res_model, "res_id": activity.res_id} |
||||
|
|
||||
|
def _action_done(self, feedback=False, attachment_ids=None): |
||||
|
"""action done function: rewrite the function""" |
||||
|
messages = self.env["mail.message"] |
||||
|
next_activities_values = [] |
||||
|
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 activity in self: |
||||
|
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 |
||||
|
records_sudo = self.env[activity.res_model].browse(activity.res_id) |
||||
|
records_sudo.message_post_with_source( |
||||
|
"mail.message_activity_done", |
||||
|
attachment_ids=attachment_ids, |
||||
|
author_id=self.env.user.partner_id.id, |
||||
|
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 |
||||
|
activity_message = records_sudo.message_ids[0] |
||||
|
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: |
||||
|
rec.state = "done" |
||||
|
rec.active = False |
||||
|
return messages, next_activities |
||||
|
|
||||
|
def action_cancel(self): |
||||
|
"""cancel activities""" |
||||
|
for rec in self: |
||||
|
rec.state = "cancel" |
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author:Anjhana A K(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
notify_on_due_date = fields.Boolean('Notify on Due Date', |
||||
|
help="Notify the due date", |
||||
|
config_parameter="notify_on_due_date") |
||||
|
notify_on_expiry = fields.Boolean('Notify on Expiry', |
||||
|
help="Notify the Expiry date", |
||||
|
config_parameter="notify_on_expiry") |
||||
|
|
||||
|
@api.model |
||||
|
def get_values(self): |
||||
|
"""Returns a list of values for the given configuration fields""" |
||||
|
res = super(ResConfigSettings, self).get_values() |
||||
|
res['notify_on_due_date'] = self.env[ |
||||
|
'ir.config_parameter'].sudo().get_param('notify_on_due_date') |
||||
|
res['notify_on_expiry'] = self.env[ |
||||
|
'ir.config_parameter'].sudo().get_param('notify_on_expiry') |
||||
|
return res |
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates the user for schedule management. --> |
||||
|
<record id="group_schedule_management_user" model="res.groups"> |
||||
|
<field name="name">Schedule Management User</field> |
||||
|
</record> |
||||
|
</odoo> |
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 485 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 23 KiB |
@ -0,0 +1,34 @@ |
|||||
|
p, span, a, ul, li, button { |
||||
|
font-size: inherit; |
||||
|
font-weight: inherit; |
||||
|
line-height: inherit; |
||||
|
} |
||||
|
|
||||
|
strong { |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
h1, h2, h3, h4, h5, h6 { |
||||
|
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; |
||||
|
} |
@ -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,64 @@ |
|||||
|
.o_action_manager { |
||||
|
direction: ltr; |
||||
|
webkit-box-flex: 1; |
||||
|
webkit-flex: 1 1 auto; |
||||
|
flex: 1 1 auto; |
||||
|
overflow: scroll !important; |
||||
|
} |
||||
|
.activity-dashboard-card { |
||||
|
border-radius: 0.3rem; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
padding: 1.7rem 1.5rem 1.5rem 1.5rem; |
||||
|
margin: 1rem auto; |
||||
|
height: 100px; |
||||
|
} |
||||
|
.activity-dashboard-card__icon-container { |
||||
|
height: 50px; |
||||
|
width: 50px; |
||||
|
border-radius: 50%; |
||||
|
} |
||||
|
.my_activity { |
||||
|
background-color: #229db9; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.all_activity{ |
||||
|
background: #88dfdf; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.planned_activity { |
||||
|
background-color: #e8c5ac; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.completed_activity{ |
||||
|
background: #a7a1f4;; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
|
||||
|
.today_activity{ |
||||
|
background: #f3bdf4; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.overdue_activity { |
||||
|
background-color: #a2d2fb; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.cancelled_activity{ |
||||
|
background: #beeecc; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.activity_type { |
||||
|
background-color: #ecb9b9;; |
||||
|
border-radius: 10px; |
||||
|
font-size: 35px; |
||||
|
} |
||||
|
.dashboard_main_section { |
||||
|
margin: 20px; |
||||
|
} |
After Width: | Height: | Size: 56 KiB |
@ -0,0 +1,164 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
/** |
||||
|
* @module all_in_one_schedule_activity_management.activity_dashboard |
||||
|
* @description This module handles the scheduled activity management. |
||||
|
*/ |
||||
|
import { Component, onWillStart} from "@odoo/owl"; |
||||
|
import { session } from "@web/session"; |
||||
|
import { registry } from "@web/core/registry"; |
||||
|
import { useService } from "@web/core/utils/hooks"; |
||||
|
import { jsonrpc } from "@web/core/network/rpc_service"; |
||||
|
|
||||
|
class ActivityDashboard extends Component { |
||||
|
static template = 'ActivityDashboard'; |
||||
|
setup() { |
||||
|
super.setup(); |
||||
|
this.orm = useService("orm"); |
||||
|
this.manage_activities = {} |
||||
|
this.dashboards_templates = ['LoginUser', 'ManageActivity', 'ActivityTable']; |
||||
|
onWillStart(this.willStart); |
||||
|
} |
||||
|
async willStart() { |
||||
|
this.title = 'Dashboard'; |
||||
|
await this.render_dashboards(); |
||||
|
} |
||||
|
async render_dashboards() { |
||||
|
this.manage_activities = await jsonrpc('/web/dataset/call_kw', { |
||||
|
model: 'mail.activity', |
||||
|
method : 'get_activity_count', |
||||
|
args: [[]], |
||||
|
kwargs: {}, |
||||
|
}); |
||||
|
this.manage_activities.done_activity = await this.orm.searchRead("mail.activity", [["state", "=", 'done'], ["active", "=", false]],); |
||||
|
this.manage_activities.planned_activity = await this.orm.searchRead("mail.activity",[["state", "=", 'planned']],) |
||||
|
this.manage_activities.today_activity = await this.orm.searchRead("mail.activity", [["state", "=", 'today']],) |
||||
|
this.manage_activities.overdue_activity = await this.orm.searchRead("mail.activity",[["state", "=", 'overdue']],) |
||||
|
} |
||||
|
|
||||
|
click_view(e) { |
||||
|
const id = e.target.value; |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'All Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: ['|',['active', '=', false], ['active', '=', true],['id', '=', id]], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list,form', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
async click_origin_view(e) { |
||||
|
const id_ = e.target.value; |
||||
|
const result = await jsonrpc('/web/dataset/call_kw', { |
||||
|
model: 'mail.activity', |
||||
|
method : 'get_activity', |
||||
|
args: [[],parseInt(id_)], |
||||
|
kwargs: {}, |
||||
|
}); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'Activity Origin', |
||||
|
res_model: result.model, |
||||
|
domain: [['id', '=', result.res_id]], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list,form', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
all_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'All Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
planned_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'Planned Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'planned']], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
completed_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'Completed Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'done'], ['active', '=', false]], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
today_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: "Today's Activities", |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'today']], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
overdue_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: 'Overdue Activity', |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'overdue']], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
cancelled_activity(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: "Today's Activity", |
||||
|
res_model: 'mail.activity', |
||||
|
domain: [['state', '=', 'cancel']], |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
activity_type(e) { |
||||
|
e.stopPropagation(); |
||||
|
e.preventDefault(); |
||||
|
this.env.services.action.doAction({ |
||||
|
type: 'ir.actions.act_window', |
||||
|
name: "Today's Activity", |
||||
|
res_model: 'mail.activity.type', |
||||
|
views: [[false, 'list'], [false, 'form']], |
||||
|
view_mode: 'list', |
||||
|
target: 'current' |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
registry.category("actions").add("activity_dashboard", ActivityDashboard); |
||||
|
export default ActivityDashboard; |
@ -0,0 +1,420 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- This XML code creates the dashboard for the mail.activity. --> |
||||
|
<templates> |
||||
|
<t t-name="ActivityDashboard"> |
||||
|
<div> |
||||
|
<div class="form-group"> |
||||
|
<h1 style="margin: 20px;"> |
||||
|
Activity Dashboard |
||||
|
</h1> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="filter_view_tb"/> |
||||
|
</div> |
||||
|
<br/> |
||||
|
<div> |
||||
|
<div class="table_view"> |
||||
|
<t t-call="ManageActivity"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<br/> |
||||
|
<div> |
||||
|
<div class="table_view_activity"> |
||||
|
<t t-call="ActivityTable"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
<t t-name="ManageActivity"> |
||||
|
<section class="dashboard_main_section"> |
||||
|
<div class="activity_dash_card row"> |
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card activity-my-activity all_activity" |
||||
|
t-on-click="all_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_all"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<p> |
||||
|
<h4>All Activity</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card planned_activity" |
||||
|
t-on-click="planned_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
|
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_planned"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<h3> |
||||
|
<span> |
||||
|
<div id="leads_this_year"/> |
||||
|
<div id="leads_this_quarter"/> |
||||
|
<div id="leads_this_month"/> |
||||
|
<div id="leads_this_week"/> |
||||
|
</span> |
||||
|
</h3> |
||||
|
<h4>Planned Activity</h4> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card completed_activity" |
||||
|
t-on-click="completed_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
|
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_done"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<h3> |
||||
|
<span> |
||||
|
<div id="leads_this_year"/> |
||||
|
<div id="leads_this_quarter"/> |
||||
|
<div id="leads_this_month"/> |
||||
|
<div id="leads_this_week"/> |
||||
|
</span> |
||||
|
</h3> |
||||
|
<p> |
||||
|
<h4>Completed Activities</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card today_activity" |
||||
|
t-on-click="today_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_today"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<h3> |
||||
|
<span> |
||||
|
<div id="leads_this_year"/> |
||||
|
<div id="leads_this_quarter"/> |
||||
|
<div id="leads_this_month"/> |
||||
|
<div id="leads_this_week"/> |
||||
|
</span> |
||||
|
</h3> |
||||
|
<p> |
||||
|
<h4>Today's Activities</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card overdue_activity" |
||||
|
t-on-click="overdue_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_overdue"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<h3> |
||||
|
<span> |
||||
|
<div id="leads_this_year"/> |
||||
|
<div id="leads_this_quarter"/> |
||||
|
<div id="leads_this_month"/> |
||||
|
<div id="leads_this_week"/> |
||||
|
</span> |
||||
|
</h3> |
||||
|
<p> |
||||
|
<h4>Overdue Activities</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card cancelled_activity" |
||||
|
t-on-click="cancelled_activity"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex"> |
||||
|
<i class="fa fa-clock-o text-mauve" style="padding-right: 80px; color: #3c3939;font-size: 30px; |
||||
|
padding-left: 0px;padding-bottom: 5px;padding-top: 13px;"/> |
||||
|
</div> |
||||
|
<div style="font-size: 30px;color: #3c3939;padding-left: 0px;padding-bottom: 17px;padding-top: 11px;"> |
||||
|
<t t-esc="manage_activities.len_cancel"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details" |
||||
|
style="padding-left: 26px;padding-bottom: 03px;padding-top: 11px;"> |
||||
|
<h3> |
||||
|
<span> |
||||
|
<div id="leads_this_year"/> |
||||
|
<div id="leads_this_quarter"/> |
||||
|
<div id="leads_this_month"/> |
||||
|
<div id="leads_this_week"/> |
||||
|
</span> |
||||
|
</h3> |
||||
|
<p> |
||||
|
<h4>Cancelled Activities</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-sm-12 col-md-3"> |
||||
|
<div class="activity-dashboard-card activity_type" |
||||
|
t-on-click="activity_type"> |
||||
|
<div class="activity-dashboard-card__icon-container bg-mauve-light d-flex justify-content-center align-items-center"> |
||||
|
<i class="fa fa-clock-o text-mauve" |
||||
|
style="color: black; font-size: 30px;"/> |
||||
|
</div> |
||||
|
<div class="dashboard-card__details"> |
||||
|
<p> |
||||
|
<h4>Activity Type</h4> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
</t> |
||||
|
<t t-name="ActivityTable"> |
||||
|
<div class="table_planned_activity"> |
||||
|
<t t-if="manage_activities.planned_activity"> |
||||
|
<table cellspacing="10" width="100%" |
||||
|
style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Planned Activities</th> |
||||
|
</tr> |
||||
|
|
||||
|
<t t-if="manage_activities.planned_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="manage_activities.planned_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="manage_activities.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 class="click-view" t-on-click="click_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td class="click-origin-view" |
||||
|
t-on-click="click_origin_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class="table_today_activity"> |
||||
|
<t t-if="manage_activities.today_activity"> |
||||
|
<table cellspacing="10" width="100%" |
||||
|
style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Today's Activities</th> |
||||
|
</tr> |
||||
|
<t t-if="manage_activities.today_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
|
||||
|
<t t-if="manage_activities.today_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="manage_activities.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 class=">click-view" t-on-click="click_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
<td class="click-origin-view" t-on-click="click_origin_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
Origin |
||||
|
</button> |
||||
|
</td> |
||||
|
|
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class="table_main_view"> |
||||
|
<t t-if="manage_activities.done_activity"> |
||||
|
<table cellspacing="10" width="100%" |
||||
|
style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Completed Activities</th> |
||||
|
</tr> |
||||
|
<t t-if="manage_activities.done_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
|
||||
|
<t t-if="manage_activities.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> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="manage_activities.done_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 class=">click-view" t-on-click="click_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
|
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</t> |
||||
|
</div> |
||||
|
<div class="table_main_view"> |
||||
|
<t t-if="manage_activities.overdue_activity"> |
||||
|
<table cellspacing="10" width="100%" |
||||
|
style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Overdue Activities</th> |
||||
|
</tr> |
||||
|
<t t-if="manage_activities.overdue_activity == ''"> |
||||
|
<td>No Data Available</td> |
||||
|
</t> |
||||
|
</thead> |
||||
|
<t t-if="manage_activities.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> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr t-foreach="manage_activities.overdue_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 class="click-view" t-on-click="click_view"> |
||||
|
<button t-att-value="line['id']" |
||||
|
style="border-radius: 8px; background-color: #c4c4f2;width: 100px;height: 35px;"> |
||||
|
View |
||||
|
</button> |
||||
|
</td> |
||||
|
|
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</t> |
||||
|
</table> |
||||
|
</t> |
||||
|
</div> |
||||
|
</t> |
||||
|
</templates> |
@ -0,0 +1,24 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- This XML code represents an Odoo server actions fot the activity cancel,done.--> |
||||
|
<record id="action_activity_cancel" model="ir.actions.server"> |
||||
|
<field name="name">Cancel</field> |
||||
|
<field name="model_id" ref="mail.model_mail_activity"/> |
||||
|
<field name="binding_model_id" ref="mail.model_mail_activity"/> |
||||
|
<field name="state">code</field> |
||||
|
<field name="code"> |
||||
|
if records: |
||||
|
action = records.action_activity_cancel() |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="action_activity_done" model="ir.actions.server"> |
||||
|
<field name="name">Mark As Done</field> |
||||
|
<field name="model_id" ref="mail.model_mail_activity"/> |
||||
|
<field name="binding_model_id" ref="mail.model_mail_activity"/> |
||||
|
<field name="state">code</field> |
||||
|
<field name="code"> |
||||
|
if records: |
||||
|
action = records.action_activity_done() |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates the action for mail.activity model to show the activity history views. --> |
||||
|
<record id="mail_activity_history_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Activity History</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">mail.activity</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
<field name="domain">[('date_deadline','<',context_today().strftime('%Y-%m-%d'))]</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,43 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates the activity tag action and creates different views for the activity.tag model. --> |
||||
|
<record id="activity_tag_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Tags</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">activity.tag</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
<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> |
||||
|
|
||||
|
<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"> |
||||
|
<tree string="Tags" editable="bottom" sample="1"> |
||||
|
<field name="name"/> |
||||
|
<field name="color" widget="color_picker" /> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
||||
|
|
@ -0,0 +1,199 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates the action for the mail activity and it creates different views for the mail.activity model. --> |
||||
|
<record id="mail_activity_view_form" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.form</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Log an Activity" create="false"> |
||||
|
<header> |
||||
|
<button id="mail_activity_schedule" string="Schedule" |
||||
|
name="action_close_dialog" type="object" |
||||
|
class="btn-primary" |
||||
|
invisible="id != False" |
||||
|
data-hotkey="q"/> |
||||
|
<button id="mail_activity_save" string="Save" |
||||
|
name="action_close_dialog" type="object" |
||||
|
class="btn-primary" |
||||
|
invisible="id == False" |
||||
|
data-hotkey="q"/> |
||||
|
<button invisible="chaining_type == 'trigger' or state in ['done', 'cancel']" |
||||
|
string="Mark as Done" name="action_done" |
||||
|
type="object" class="btn-secondary" data-hotkey="w" |
||||
|
context="{'mail_activity_quick_update': True}"/> |
||||
|
<button invisible="chaining_type == 'trigger' or state in ['done', 'cancel']" |
||||
|
string="Done & Schedule Next" |
||||
|
name="action_done_schedule_next" type="object" |
||||
|
class="btn-secondary" data-hotkey="x" |
||||
|
context="{'mail_activity_quick_update': True}"/> |
||||
|
<button invisible="chaining_type == 'trigger' or state in ['done', 'cancel']" |
||||
|
string="Done & Launch Next" |
||||
|
name="action_done_schedule_next" type="object" |
||||
|
class="btn-secondary" data-hotkey="x" |
||||
|
context="{'mail_activity_quick_update': True}"/> |
||||
|
<button string="Discard" class="btn-secondary" |
||||
|
special="cancel" data-hotkey="z"/> |
||||
|
<button string="Cancel" name="action_cancel" type="object" |
||||
|
invisible="state =='done'"/> |
||||
|
<field name="state" widget="statusbar" |
||||
|
statusbar_visible="today,planned,done"/> |
||||
|
</header> |
||||
|
<sheet string="Activity"> |
||||
|
<group invisible="0"> |
||||
|
<!-- <field name="type" invisible="1"/>--> |
||||
|
<field name="activity_category" invisible="1"/> |
||||
|
<field name="res_model" invisible="1"/> |
||||
|
<field name="res_name" invisible="0" readonly="0"/> |
||||
|
<field name="res_model_id" invisible="0"/> |
||||
|
<field name="res_id" invisible="0" widget="integer"/> |
||||
|
<field name="chaining_type" invisible="1"/> |
||||
|
<field name="previous_activity_type_id" invisible="1"/> |
||||
|
<field name="has_recommended_activities" invisible="1"/> |
||||
|
</group> |
||||
|
<group invisible="has_recommended_activities == False"> |
||||
|
<div class="o_row"> |
||||
|
<strong>Recommended Activities</strong> |
||||
|
<field name="recommended_activity_type_id" |
||||
|
widget="selection_badge" |
||||
|
domain="[('previous_type_ids', '=', previous_activity_type_id)]" |
||||
|
nolabel="1"/> |
||||
|
</div> |
||||
|
</group> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="activity_type_id" required="1" |
||||
|
options="{'no_create': True, 'no_open': True}"/> |
||||
|
<field name="summary" |
||||
|
placeholder="e.g. Discuss proposal"/> |
||||
|
<field name="active"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
<field name="date_deadline"/> |
||||
|
<field name="user_id"/> |
||||
|
<field name="activity_type" widget="many2many_tags" |
||||
|
options="{'color_field': 'color'}"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
<field name="note" class="oe-bordered-editor" |
||||
|
placeholder="Log a note..."/> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mail_activity_view_tree" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.tree</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Next Activities" |
||||
|
decoration-danger="date_deadline < current_date" |
||||
|
decoration-success="date_deadline == current_date" |
||||
|
default_order="date_deadline"> |
||||
|
<field name="res_name"/> |
||||
|
<field name="activity_type_id"/> |
||||
|
<field name="summary"/> |
||||
|
<field name="date_deadline"/> |
||||
|
<field name="activity_type" widget="many2many_tags" |
||||
|
options="{'color_field': 'color'}"/> |
||||
|
<field name="state"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mail_activity_view_search" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.search</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="inherit_id" ref="mail.mail_activity_view_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/filter" position="replace"> |
||||
|
<filter invisible="0" string="Late Activities" |
||||
|
name="activities_overdue" |
||||
|
domain="[('date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" |
||||
|
help="Show all records which has next action date is before today"/> |
||||
|
<filter invisible="0" string="Today Activities" |
||||
|
name="activities_today" |
||||
|
domain="[('date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> |
||||
|
<filter invisible="0" string="Future Activities" |
||||
|
name="activities_upcoming_all" |
||||
|
domain="[('date_deadline', '>', context_today().strftime('%Y-%m-%d')) |
||||
|
]"/> |
||||
|
<filter string="My activities" name="activities_my" |
||||
|
domain="[('user_id', '=', uid)]"/> |
||||
|
<filter string="Next 7 Days" name="next_seven_days" |
||||
|
domain="[('date_deadline', '<', (context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/> |
||||
|
<filter string="Next 30 Days" name="next_thirty_days" |
||||
|
domain="[('date_deadline', '<', (context_today()+datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"/> |
||||
|
<filter string="Next 365 Days" name="next_year_days" |
||||
|
domain="[('date_deadline', '<', (context_today()+datetime.timedelta(days=365)).strftime('%Y-%m-%d'))]"/> |
||||
|
<filter string="Last 7 Days" name="last_seven_days" |
||||
|
domain="[('date_deadline', '<', (context_today()-datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/> |
||||
|
<filter string="Last 30 Days" name="last_thirty_days" |
||||
|
domain="[('date_deadline', '<', (context_today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"/> |
||||
|
<filter string="Last 365 Days" name="last_year_days" |
||||
|
domain="[('date_deadline', '<', (context_today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d'))]"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mail_activity_view_kanban" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.kanban</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<kanban class="o_mail_activity_kanban"> |
||||
|
<field name="id"/> |
||||
|
<field name="res_model_id"/> |
||||
|
<field name="activity_type_id"/> |
||||
|
<field name="user_id"/> |
||||
|
<templates> |
||||
|
<t t-name="kanban-box"> |
||||
|
<div t-attf-class="oe_kanban_global_click"> |
||||
|
<div class="o_kanban_image"> |
||||
|
<img alt="Avatar" |
||||
|
t-att-src="kanban_image('res.users', 'avatar_128', record.user_id.raw_value)"/> |
||||
|
</div> |
||||
|
<div class="oe_kanban_details"> |
||||
|
<strong class="o_kanban_record_title"> |
||||
|
<field name="res_name"/> |
||||
|
</strong> |
||||
|
<div> |
||||
|
<field name="activity_type_id"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<field name="date_deadline"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
</templates> |
||||
|
</kanban> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mail_activity_view_pivot" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.pivot</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<pivot string="Activities Analysis" sample="1"> |
||||
|
<field name="activity_type_id" type="col"/> |
||||
|
<field name="date_deadline" interval="month" type="row"/> |
||||
|
</pivot> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="mail_activity_view_graph" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.view.graph</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<graph string="Activities Analysis" sample="1"> |
||||
|
<field name="activity_type_id"/> |
||||
|
<field name="date_deadline" interval="week"/> |
||||
|
</graph> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mail_activity_all_action" model="ir.actions.act_window"> |
||||
|
<field name="name">All Activity</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">mail.activity</field> |
||||
|
<field name="view_mode">tree,form,calendar,kanban,pivot,graph</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,46 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates different menus.--> |
||||
|
<record id="activity_dashboard_action" model="ir.actions.client"> |
||||
|
<field name="name">Dashboard</field> |
||||
|
<field name="tag">activity_dashboard</field> |
||||
|
<field name="target">current</field> |
||||
|
</record> |
||||
|
<menuitem |
||||
|
id="all_in_one_schedule_management_menu_root" |
||||
|
name="Activity Management" |
||||
|
groups="group_schedule_management_user" sequence="185" |
||||
|
web_icon="all_in_one_schedule_activity_management,static/description/icon.png" /> |
||||
|
<menuitem id="activity_dashboard_menu" |
||||
|
name="Dashboard" |
||||
|
sequence="10" |
||||
|
action="activity_dashboard_action" |
||||
|
parent="all_in_one_schedule_management_menu_root"/> |
||||
|
<menuitem id="activity_act_menu" |
||||
|
name="Activity" |
||||
|
sequence="50" |
||||
|
parent="all_in_one_schedule_management_menu_root"/> |
||||
|
<menuitem id="all_activity_menu" |
||||
|
name="All Activity" |
||||
|
action="mail_activity_all_action" |
||||
|
parent="activity_act_menu"/> |
||||
|
<menuitem id="my_activity_menu" |
||||
|
name="My Activity" |
||||
|
action="mail_activity_my_action" |
||||
|
parent="activity_act_menu"/> |
||||
|
<menuitem id="activity_tags_menu" |
||||
|
name="Activity Tag" |
||||
|
action="activity_tag_action" |
||||
|
parent="activity_act_menu"/> |
||||
|
<menuitem id="activity_history_menu" |
||||
|
name="Activity History" |
||||
|
action="mail_activity_history_action" |
||||
|
sequence="60" |
||||
|
parent="all_in_one_schedule_management_menu_root"/> |
||||
|
<menuitem id="activity_reporting_menu" |
||||
|
name="Reporting" |
||||
|
action="activity_reporting_action" |
||||
|
sequence="50" |
||||
|
parent="all_in_one_schedule_management_menu_root"/> |
||||
|
</odoo> |
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates an action for the 'mail.activity' |
||||
|
model. It creates different views to the mail activity. --> |
||||
|
<record id="mail_activity_my_action" model="ir.actions.act_window"> |
||||
|
<field name="name">My Activity</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">mail.activity</field> |
||||
|
<field name="view_mode">tree,form,calendar,kanban,pivot,graph</field> |
||||
|
<field name="domain">[('user_id','=',uid)]</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,31 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code creates an Odoo view for the 'mail.activity' |
||||
|
model. It adds a mail activity reports. --> |
||||
|
<record id="activity_reporting_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Activities</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">mail.activity</field> |
||||
|
<field name="view_mode">graph,pivot</field> |
||||
|
</record> |
||||
|
<record id="mail_activity_report_view_pivot" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.pivot.report</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<pivot string="Activities Report" sample="1"> |
||||
|
<field name="activity_type_id" type="col"/> |
||||
|
<field name="date_deadline" interval="month" type="row"/> |
||||
|
</pivot> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="mail_activity_report_view_graph" model="ir.ui.view"> |
||||
|
<field name="name">mail.activity.graph.report</field> |
||||
|
<field name="model">mail.activity</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<graph string="Activities Report" sample="1"> |
||||
|
<field name="activity_type_id"/> |
||||
|
<field name="date_deadline" interval="month"/> |
||||
|
</graph> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,37 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- This XML code represents an Odoo view modification for the 'res.config.settings' |
||||
|
model. It adds a due activity notification to the general configuration form. --> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name">res.config.settings.view.form.inherited.all.in.one.schedule.activity.management</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="priority" eval="20"/> |
||||
|
<field name="inherit_id" |
||||
|
ref="base_setup.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//div[@id='invite_users']" position="after"> |
||||
|
<h2>Due Activity Notification</h2> |
||||
|
<div class="row mt16 o_settings_container"> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="notify_on_due_date"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label string="Notify on due date" |
||||
|
for="notify_on_due_date"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="notify_on_expiry"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label string="Notify on Expiry" |
||||
|
for="notify_on_expiry"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |