diff --git a/project_resource/README.rst b/project_resource/README.rst new file mode 100755 index 000000000..353a3b903 --- /dev/null +++ b/project_resource/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Project Free Resource +===================== +This module helps in getting all the free resource for a project task based on the project start date and end date, and can assign to one among them. + +Company +------- +*`Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developer : (V15) Mohammed Dilshad Tk, 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 further information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/project_resource/__init__.py b/project_resource/__init__.py new file mode 100644 index 000000000..66f987bef --- /dev/null +++ b/project_resource/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import models +from . import wizards diff --git a/project_resource/__manifest__.py b/project_resource/__manifest__.py new file mode 100644 index 000000000..4f51c3532 --- /dev/null +++ b/project_resource/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +{ + 'name': "Project Free Resource", + 'version': '15.0.1.0.0', + 'category': 'Project', + 'summary': """Get all free resources for the project in odoo 15""", + 'description': """This module helps in getting all the free resource for a + project task based on the project start date and end date, and can assign + to one among them. """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['project', 'hr_timesheet'], + 'data': [ + 'security/ir.model.access.csv', + 'views/res_users_views.xml', + 'views/project_task_views.xml', + 'wizards/free_resource_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/project_resource/doc/RELEASE_NOTES.md b/project_resource/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..840edc0fe --- /dev/null +++ b/project_resource/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 28.12.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Project Free Resource diff --git a/project_resource/models/__init__.py b/project_resource/models/__init__.py new file mode 100644 index 000000000..b6b5c172c --- /dev/null +++ b/project_resource/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import project_task +from . import res_users diff --git a/project_resource/models/project_task.py b/project_resource/models/project_task.py new file mode 100644 index 000000000..096ffe458 --- /dev/null +++ b/project_resource/models/project_task.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class ProjectTask(models.Model): + """ Inherits project Task to add fields and to show all free resources + for the project based on the project start and end dates""" + _inherit = 'project.task' + + task_start_date = fields.Date(string="Start Date", required=True, + help='Start date of the task') + users_ids = fields.Many2many('res.users', + compute="_onchange_user_ids", + help="This field is to store the users" + " based on the calculation") + + @api.onchange('task_start_date', 'date_deadline') + def _onchange_user_ids(self): + """ Returning the domain for selecting the free resource """ + if self.date_deadline and self.task_start_date: + from_date = self.date_deadline + end_date = self.task_start_date + resource_ids = self.get_free_resource_ids(from_date, end_date) + if self.project_id.privacy_visibility == 'followers': + self.users_ids = self.env['res.users'].search( + [('id', 'not in', resource_ids), + ('id', 'in', self.project_id.message_follower_ids.ids), + ('share', '=', False)]) + self.user_ids.write({'id': [(6, 0, self.users_ids)]}) + else: + self.users_ids = self.env['res.users'].search([('id', 'not in', + resource_ids), + ('share', '=', False)]) + self.user_ids.write({'id': [(6, 0, self.users_ids)]}) + + def get_free_resource_ids(self, from_date, end_date): + """Function to get the resources for the particular period """ + lst = [] + for task in self.env['res.users'].search([]).project_allocated_ids: + if task.task_start_date and task.date_deadline: + if task.task_start_date <= from_date <= task.date_deadline: + lst.append(task.manager_id.id) + for user in task.user_ids: + lst.append(user.id) + if task.task_start_date <= end_date >= task.date_deadline: + lst.append(task.manager_id.id) + for user in task.user_ids: + lst.append(user.id) + return_list = list(set(lst)) + return return_list diff --git a/project_resource/models/res_users.py b/project_resource/models/res_users.py new file mode 100644 index 000000000..caf1cdd71 --- /dev/null +++ b/project_resource/models/res_users.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResUsers(models.Model): + """To know the assigned/free users""" + _inherit = 'res.users' + + project_allocated_ids = fields.One2many(comodel_name='project.task', + inverse_name='manager_id', + string='Assigned Task', + help='The tasks which are assigned') diff --git a/project_resource/security/ir.model.access.csv b/project_resource/security/ir.model.access.csv new file mode 100644 index 000000000..4dfb33c65 --- /dev/null +++ b/project_resource/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access.free.resource,free.resource.access,model_free_resource,base.group_user,1,1,1,1 diff --git a/project_resource/static/description/assets/icons/check.png b/project_resource/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/project_resource/static/description/assets/icons/check.png differ diff --git a/project_resource/static/description/assets/icons/cogs.png b/project_resource/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/project_resource/static/description/assets/icons/cogs.png differ diff --git a/project_resource/static/description/assets/icons/consultation.png b/project_resource/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/project_resource/static/description/assets/icons/consultation.png differ diff --git a/project_resource/static/description/assets/icons/ecom-black.png b/project_resource/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/project_resource/static/description/assets/icons/ecom-black.png differ diff --git a/project_resource/static/description/assets/icons/education-black.png b/project_resource/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/project_resource/static/description/assets/icons/education-black.png differ diff --git a/project_resource/static/description/assets/icons/hotel-black.png b/project_resource/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/project_resource/static/description/assets/icons/hotel-black.png differ diff --git a/project_resource/static/description/assets/icons/license.png b/project_resource/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/project_resource/static/description/assets/icons/license.png differ diff --git a/project_resource/static/description/assets/icons/lifebuoy.png b/project_resource/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/project_resource/static/description/assets/icons/lifebuoy.png differ diff --git a/project_resource/static/description/assets/icons/logo.png b/project_resource/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/project_resource/static/description/assets/icons/logo.png differ diff --git a/project_resource/static/description/assets/icons/manufacturing-black.png b/project_resource/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/project_resource/static/description/assets/icons/manufacturing-black.png differ diff --git a/project_resource/static/description/assets/icons/pos-black.png b/project_resource/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/project_resource/static/description/assets/icons/pos-black.png differ diff --git a/project_resource/static/description/assets/icons/puzzle.png b/project_resource/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/project_resource/static/description/assets/icons/puzzle.png differ diff --git a/project_resource/static/description/assets/icons/restaurant-black.png b/project_resource/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/project_resource/static/description/assets/icons/restaurant-black.png differ diff --git a/project_resource/static/description/assets/icons/service-black.png b/project_resource/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/project_resource/static/description/assets/icons/service-black.png differ diff --git a/project_resource/static/description/assets/icons/trading-black.png b/project_resource/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/project_resource/static/description/assets/icons/trading-black.png differ diff --git a/project_resource/static/description/assets/icons/training.png b/project_resource/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/project_resource/static/description/assets/icons/training.png differ diff --git a/project_resource/static/description/assets/icons/update.png b/project_resource/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/project_resource/static/description/assets/icons/update.png differ diff --git a/project_resource/static/description/assets/icons/user.png b/project_resource/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/project_resource/static/description/assets/icons/user.png differ diff --git a/project_resource/static/description/assets/icons/wrench.png b/project_resource/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/project_resource/static/description/assets/icons/wrench.png differ diff --git a/project_resource/static/description/assets/misc/categories.png b/project_resource/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/project_resource/static/description/assets/misc/categories.png differ diff --git a/project_resource/static/description/assets/misc/check-box.png b/project_resource/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/project_resource/static/description/assets/misc/check-box.png differ diff --git a/project_resource/static/description/assets/misc/compass.png b/project_resource/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/project_resource/static/description/assets/misc/compass.png differ diff --git a/project_resource/static/description/assets/misc/corporate.png b/project_resource/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/project_resource/static/description/assets/misc/corporate.png differ diff --git a/project_resource/static/description/assets/misc/customer-support.png b/project_resource/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/project_resource/static/description/assets/misc/customer-support.png differ diff --git a/project_resource/static/description/assets/misc/cybrosys-logo.png b/project_resource/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/project_resource/static/description/assets/misc/cybrosys-logo.png differ diff --git a/project_resource/static/description/assets/misc/features.png b/project_resource/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/project_resource/static/description/assets/misc/features.png differ diff --git a/project_resource/static/description/assets/misc/logo.png b/project_resource/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/project_resource/static/description/assets/misc/logo.png differ diff --git a/project_resource/static/description/assets/misc/pictures.png b/project_resource/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/project_resource/static/description/assets/misc/pictures.png differ diff --git a/project_resource/static/description/assets/misc/pie-chart.png b/project_resource/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/project_resource/static/description/assets/misc/pie-chart.png differ diff --git a/project_resource/static/description/assets/misc/right-arrow.png b/project_resource/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/project_resource/static/description/assets/misc/right-arrow.png differ diff --git a/project_resource/static/description/assets/misc/star.png b/project_resource/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/project_resource/static/description/assets/misc/star.png differ diff --git a/project_resource/static/description/assets/misc/support.png b/project_resource/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/project_resource/static/description/assets/misc/support.png differ diff --git a/project_resource/static/description/assets/misc/whatsapp.png b/project_resource/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/project_resource/static/description/assets/misc/whatsapp.png differ diff --git a/project_resource/static/description/assets/modules/auto_daily_weekly_report.png b/project_resource/static/description/assets/modules/auto_daily_weekly_report.png new file mode 100644 index 000000000..cdcba33eb Binary files /dev/null and b/project_resource/static/description/assets/modules/auto_daily_weekly_report.png differ diff --git a/project_resource/static/description/assets/modules/project_report_pdf.png b/project_resource/static/description/assets/modules/project_report_pdf.png new file mode 100644 index 000000000..2c43716d5 Binary files /dev/null and b/project_resource/static/description/assets/modules/project_report_pdf.png differ diff --git a/project_resource/static/description/assets/modules/project_task_timer.png b/project_resource/static/description/assets/modules/project_task_timer.png new file mode 100644 index 000000000..8eb268300 Binary files /dev/null and b/project_resource/static/description/assets/modules/project_task_timer.png differ diff --git a/project_resource/static/description/assets/modules/project_task_unique_code.png b/project_resource/static/description/assets/modules/project_task_unique_code.png new file mode 100644 index 000000000..45b2bbfbc Binary files /dev/null and b/project_resource/static/description/assets/modules/project_task_unique_code.png differ diff --git a/project_resource/static/description/assets/modules/projects_task_checklists.png b/project_resource/static/description/assets/modules/projects_task_checklists.png new file mode 100644 index 000000000..a371728b3 Binary files /dev/null and b/project_resource/static/description/assets/modules/projects_task_checklists.png differ diff --git a/project_resource/static/description/assets/modules/task_deadline_reminder.png b/project_resource/static/description/assets/modules/task_deadline_reminder.png new file mode 100644 index 000000000..c128be58a Binary files /dev/null and b/project_resource/static/description/assets/modules/task_deadline_reminder.png differ diff --git a/project_resource/static/description/assets/screenshots/11.png b/project_resource/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..fbde7a224 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/11.png differ diff --git a/project_resource/static/description/assets/screenshots/22.png b/project_resource/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..0c32684c6 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/22.png differ diff --git a/project_resource/static/description/assets/screenshots/33.png b/project_resource/static/description/assets/screenshots/33.png new file mode 100644 index 000000000..9a78fa5ec Binary files /dev/null and b/project_resource/static/description/assets/screenshots/33.png differ diff --git a/project_resource/static/description/assets/screenshots/44.png b/project_resource/static/description/assets/screenshots/44.png new file mode 100644 index 000000000..f5c3385a0 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/44.png differ diff --git a/project_resource/static/description/assets/screenshots/55.png b/project_resource/static/description/assets/screenshots/55.png new file mode 100644 index 000000000..e85909794 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/55.png differ diff --git a/project_resource/static/description/assets/screenshots/66.png b/project_resource/static/description/assets/screenshots/66.png new file mode 100644 index 000000000..03e57be69 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/66.png differ diff --git a/project_resource/static/description/assets/screenshots/77.png b/project_resource/static/description/assets/screenshots/77.png new file mode 100644 index 000000000..9de854bfa Binary files /dev/null and b/project_resource/static/description/assets/screenshots/77.png differ diff --git a/project_resource/static/description/assets/screenshots/88.png b/project_resource/static/description/assets/screenshots/88.png new file mode 100644 index 000000000..5be1d2154 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/88.png differ diff --git a/project_resource/static/description/assets/screenshots/hero.gif b/project_resource/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..18761f153 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/hero.gif differ diff --git a/project_resource/static/description/banner.png b/project_resource/static/description/banner.png new file mode 100644 index 000000000..8aff05760 Binary files /dev/null and b/project_resource/static/description/banner.png differ diff --git a/project_resource/static/description/icon.png b/project_resource/static/description/icon.png new file mode 100644 index 000000000..5b3bf8abe Binary files /dev/null and b/project_resource/static/description/icon.png differ diff --git a/project_resource/static/description/index.html b/project_resource/static/description/index.html new file mode 100644 index 000000000..4d44c71b0 --- /dev/null +++ b/project_resource/static/description/index.html @@ -0,0 +1,702 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.Sh +
+
+
+
+
+ +
+
+
+

+ Project Free Resource

+

+ Get The Resources For a Task, Based The Given task Period + And Visibility +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This module helps in getting all the resource for a project + based on the project tasks start date and end date, and can + assign to one among them.Its lists based on project manager of each project.

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Get the resources for a task, based the given task + period and visibility

+
+
+ +
+
+ +
+
+

+ Directly get the all resource details if date + filter is applied

+
+
+ +
+
+ +
+
+

+ If not date filter, will get all resource details based on user's projects on given dates. +

+
+
+ +
+ +
+
+

+ Screenshots +

+
+ +
+

+ Visibility set to invited employees +

+ +
+ +
+

+ Resource for the task with invited employees +

+ +
+ +
+

+ Visibility set to all employees +

+ +
+ +
+

+ Resource for the task with all employee visibility

+ +
+ +
+

+ Resource menu for get resource details +

+ +
+ +
+

+ Wizard for add the date filter(When filter applied users without any project between those dates will lists) +

+ +
+ +
+

+ Resource detail list view +

+ +
+ +
+

+ Resource detail form view. +

+ +
+
+ +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/project_resource/views/project_task_views.xml b/project_resource/views/project_task_views.xml new file mode 100644 index 000000000..81870c067 --- /dev/null +++ b/project_resource/views/project_task_views.xml @@ -0,0 +1,25 @@ + + + + + project.task.view.form.inherit.project.resource + project.task + + + + + + + + + + True + + + True + + + + diff --git a/project_resource/views/res_users_views.xml b/project_resource/views/res_users_views.xml new file mode 100644 index 000000000..635d448cc --- /dev/null +++ b/project_resource/views/res_users_views.xml @@ -0,0 +1,42 @@ + + + + + res.users.view.form.inherit.project.resource + res.users + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + res.users.view.tree.inherit.project.resource + res.users + + + + + + +
diff --git a/project_resource/wizards/__init__.py b/project_resource/wizards/__init__.py new file mode 100644 index 000000000..d3cca8949 --- /dev/null +++ b/project_resource/wizards/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import free_resource diff --git a/project_resource/wizards/free_resource.py b/project_resource/wizards/free_resource.py new file mode 100644 index 000000000..ab6c1f434 --- /dev/null +++ b/project_resource/wizards/free_resource.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from odoo import fields, models + + +class FreeResource(models.TransientModel): + """Wizard to add the period to get the free resource""" + _name = 'free.resource' + + date_from = fields.Date(string="Start Date", help="Start date") + date_to = fields.Date(string="End Date", help="End date") + + def get_free_resource(self): + """Get the list of free resource at the given period """ + date_from = self.date_from + date_to = self.date_to + if date_from and date_to: + case = 'in' + resource_ids = self.env['project.task'].\ + get_free_resource_ids(date_from, date_to) + else: + resource_ids = [] + case = 'not in' + return { + 'name': 'Free Resource', + 'view_mode': 'tree,form', + 'target': 'main', + 'res_model': 'res.users', + 'views': [ + (self.env.ref('project_resource.res_users_view_tree').id, 'tree'), + (self.env.ref('project_resource.res_users_view_form').id, 'form')], + 'type': 'ir.actions.act_window', + 'domain': [('id', case, resource_ids), ('share', '=', False)], + } diff --git a/project_resource/wizards/free_resource_views.xml b/project_resource/wizards/free_resource_views.xml new file mode 100644 index 000000000..785f637ef --- /dev/null +++ b/project_resource/wizards/free_resource_views.xml @@ -0,0 +1,39 @@ + + + + + free.resource.view.form + free.resource + +
+ + + + + + + +
+
+ +
+
+ + + Free Resource + free.resource + form + + new + + + +