@ -0,0 +1,48 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
Website Project Kanban View |
||||
|
=========================== |
||||
|
This module is used for viewing kanban view of Project in Website |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
- Additional configuration not required |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (AGPL v3). |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer: (V17)Anfas Faisal K, |
||||
|
(V18) Gayathri V |
||||
|
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,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Gayathri V(odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 controllers |
||||
|
from . import models |
@ -0,0 +1,55 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author:Gayathri V(odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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': 'Website Project Kanban View', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Website,Project', |
||||
|
'summary': 'Project & Task kanban view in Website', |
||||
|
'description': "Geminate comes with a feature to introduce kanban view for " |
||||
|
"project and their related task on website. it will show " |
||||
|
"the progress of each task based on their stage and due " |
||||
|
"date. ", |
||||
|
'author': "Cybrosys Techno Solutions", |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['project', 'website'], |
||||
|
'data': [ |
||||
|
'data/ir_config_parameter_data.xml', |
||||
|
'views/kanban_view_project_templates.xml', |
||||
|
'views/kanban_view_task_templates.xml', |
||||
|
'views/res_config_settings_views.xml' |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_frontend': [ |
||||
|
'/project_website_kanban_view/static/src/css/style.css', |
||||
|
'https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css', |
||||
|
'https://cdn.jsdelivr.net/npm/jquery@3.6.4/dist/jquery.slim.min.js', |
||||
|
'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Gayathri V(odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 project_website_kanban_view |
@ -0,0 +1,160 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Gayathri V (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 odoo import http, _ |
||||
|
from odoo.exceptions import ValidationError |
||||
|
from odoo.http import request |
||||
|
from odoo.addons.portal.controllers.portal import CustomerPortal, \ |
||||
|
pager as portal_pager |
||||
|
|
||||
|
|
||||
|
class ProjectCustomerPortal(CustomerPortal): |
||||
|
""" |
||||
|
This class extends the CustomerPortal class in Odoo and provides |
||||
|
custom functionality for managing projects and tasks from the |
||||
|
customer portal. |
||||
|
""" |
||||
|
|
||||
|
@http.route(['/my/projects', '/my/projects/page/<int:page>'], type='http', |
||||
|
auth="user", website=True) |
||||
|
def portal_my_projects( |
||||
|
self, page=1, date_begin=None, date_end=None, sortby=None, |
||||
|
viewtype='kanban', **kw): |
||||
|
""" |
||||
|
Route to display a list of projects for the logged-in user in the |
||||
|
customer portal. |
||||
|
|
||||
|
:param page: Current page number. |
||||
|
:param date_begin: Beginning of date range filter. |
||||
|
:param date_end: End of date range filter. |
||||
|
:param sortby: Sorting option. |
||||
|
:param viewtype: Type of view to display (e.g., kanban). |
||||
|
:return: |
||||
|
""" |
||||
|
res = super( |
||||
|
ProjectCustomerPortal, self).portal_my_projects( |
||||
|
page=page, date_begin=date_begin, date_end=date_end, sortby=sortby, |
||||
|
viewtype='kanban', |
||||
|
**kw) |
||||
|
res.qcontext.update({'viewtype': viewtype}) |
||||
|
return res |
||||
|
|
||||
|
@http.route(['/my/tasks', '/my/tasks/page/<int:page>'], type='http', |
||||
|
auth="user", website=True) |
||||
|
def portal_my_tasks(self, page=1, date_begin=None, date_end=None, |
||||
|
sortby=None, filterby=None, search=None, |
||||
|
search_in='content', groupby=None, viewtype='kanban', |
||||
|
**kw): |
||||
|
""" |
||||
|
Route to display a list of tasks for the logged-in user in the |
||||
|
customer portal. |
||||
|
|
||||
|
:param page: Current page number. |
||||
|
:param date_begin: Beginning of date range filter. |
||||
|
:param date_end: End of date range filter. |
||||
|
:param sortby: Sorting option. |
||||
|
:param filterby: Filter option. |
||||
|
:param search: Search keyword. |
||||
|
:param search_in: Field to search in (e.g., content). |
||||
|
:param groupby: Grouping option. |
||||
|
:param viewtype: Type of view to display (e.g., kanban). |
||||
|
:return: HTTP response with the project details. |
||||
|
""" |
||||
|
res = super(ProjectCustomerPortal, self).portal_my_tasks( |
||||
|
page=page, date_begin=date_begin, date_end=date_end, |
||||
|
sortby=sortby, filterby=filterby, search=search, |
||||
|
search_in=search_in, groupby=groupby, viewtype=viewtype, **kw) |
||||
|
searchbar_filters = self._get_my_tasks_searchbar_filters() |
||||
|
domain = searchbar_filters.get(filterby, searchbar_filters.get('all'))[ |
||||
|
'domain'] |
||||
|
values = self._prepare_tasks_values(page, date_begin, date_end, sortby, |
||||
|
search, search_in, groupby, |
||||
|
domain=domain) |
||||
|
pager_vals = values['pager'] |
||||
|
pager_vals['url_args'].update(viewtype=viewtype) |
||||
|
pager = portal_pager(**pager_vals) |
||||
|
res.qcontext.update({ |
||||
|
'viewtype': viewtype, |
||||
|
"pager": pager |
||||
|
}) |
||||
|
return res |
||||
|
|
||||
|
@http.route(['/my/projects/<int:project_id>', |
||||
|
'/my/projects/<int:project_id>/page/<int:page>'], type='http', |
||||
|
auth="public", website=True) |
||||
|
def portal_my_project(self, project_id=None, access_token=None, page=1, |
||||
|
date_begin=None, date_end=None, sortby=None, |
||||
|
search=None, search_in='content', groupby=None, |
||||
|
task_id=None, viewtype='kanban', **kw): |
||||
|
""" |
||||
|
Route to display a specific project and its details in the customer |
||||
|
portal. |
||||
|
|
||||
|
:param project_id: ID of the project to display. |
||||
|
:param access_token: Access token for security. |
||||
|
:param page: Current page number. |
||||
|
:param date_begin: Beginning of date range filter. |
||||
|
:param date_end: End of date range filter. |
||||
|
:param sortby: Sorting option. |
||||
|
:param search: Search keyword. |
||||
|
:param search_in: Field to search in (e.g., content). |
||||
|
:param groupby: Grouping option. |
||||
|
:param task_id: ID of the task within the project. |
||||
|
:param viewtype: Type of view to display (e.g., kanban). |
||||
|
:return: HTTP response with the project details. |
||||
|
""" |
||||
|
res = super(ProjectCustomerPortal, self).portal_my_project( |
||||
|
project_id=project_id, access_token=access_token, page=page, |
||||
|
date_begin=date_begin, date_end=date_end, sortby=sortby, |
||||
|
search=search, search_in=search_in, groupby=groupby, |
||||
|
task_id=task_id, viewtype='kanban', **kw) |
||||
|
res.qcontext.update({'viewtype': viewtype}) |
||||
|
return res |
||||
|
|
||||
|
def _prepare_tasks_values(self, page, date_begin, date_end, sortby, search, |
||||
|
search_in, groupby, url="/my/tasks", domain=None, |
||||
|
su=False, project=False): |
||||
|
""" |
||||
|
Prepare the values for displaying tasks in the customer portal. |
||||
|
|
||||
|
:param page: Current page number. |
||||
|
:param date_begin: Beginning of date range filter. |
||||
|
:param date_end: End of date range filter. |
||||
|
:param sortby: Sorting option. |
||||
|
:param search: Search keyword. |
||||
|
:param search_in: Field to search in (e.g., content). |
||||
|
:param groupby: Grouping option. |
||||
|
:param url: URL for the tasks page. |
||||
|
:param domain: Filter domain for tasks. |
||||
|
:return: Dictionary containing values for tasks display. |
||||
|
""" |
||||
|
res = super(ProjectCustomerPortal, self)._prepare_tasks_values( |
||||
|
page=page, date_begin=date_begin, date_end=date_end, sortby=sortby, |
||||
|
search=search, search_in=search_in, groupby=groupby, url=url, |
||||
|
domain=domain, su=su, project=project) |
||||
|
task_per_page = int( |
||||
|
request.env['ir.config_parameter'].sudo().get_param( |
||||
|
"project_website_kanban_view.task_per_pager")) |
||||
|
self._items_per_page = task_per_page |
||||
|
if task_per_page == 0: |
||||
|
raise ValidationError(_( |
||||
|
"Task per page cannot be 0. Please configure a valid value.")) |
||||
|
return res |
@ -0,0 +1,10 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Adding a default value for task_per_pager in res.config.settings--> |
||||
|
<data noupdate="1"> |
||||
|
<record id="project_website_kanban_view_task_per_pager" model="ir.config_parameter"> |
||||
|
<field name="key">project_website_kanban_view.task_per_pager</field> |
||||
|
<field name="value">80</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,7 @@ |
|||||
|
## Module <project_website_kanban_view> |
||||
|
|
||||
|
#### 13.11.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
|
||||
|
- Initial commit for Website Project Kanban View |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Gayathri V (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 res_config_settings |
@ -0,0 +1,36 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Gayathri V (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
""" |
||||
|
This class extends the 'res.config.settings' model to add a new |
||||
|
configuration parameter for controlling the number of tasks per page in the |
||||
|
kanban view. |
||||
|
""" |
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
task_per_pager = fields.Integer( |
||||
|
string="Task per page in Kanban View", |
||||
|
help="Minimum number of tasks per page.", |
||||
|
config_parameter='project_website_kanban_view.task_per_pager') |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 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: 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: 344 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.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: 11 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: 80 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: 3.2 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.8 KiB |