diff --git a/project_resource/README.rst b/project_resource/README.rst new file mode 100644 index 000000000..651bb9f34 --- /dev/null +++ b/project_resource/README.rst @@ -0,0 +1,49 @@ +.. 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 + +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. + +configuration +============= +Nothing to configure. + +License +======= +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V17) Shikhil Raj + 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 https://www.cybrosys.com + +image:: https://cybrosys.com/images/logo.png + +Further information +=================== +HTML Description: ``__ diff --git a/project_resource/__init__.py b/project_resource/__init__.py new file mode 100644 index 000000000..5248e1630 --- /dev/null +++ b/project_resource/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################### +from . import models +from . import wizards diff --git a/project_resource/__manifest__.py b/project_resource/__manifest__.py new file mode 100644 index 000000000..c7d6c2071 --- /dev/null +++ b/project_resource/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions () +# +# 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 . +# +############################################################################### +{ + 'name': "Project Free Resource", + 'version': '17.0.1.0.0', + 'category': 'Project', + 'summary': """Get all free resources for the project""", + '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/project_task_views.xml', + 'views/res_users_view.xml', + 'wizards/free_resource_view.xml' + ], + "images": ["static/description/banner.jpg"], + 'license': 'LGPL-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..4814604d1 --- /dev/null +++ b/project_resource/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 01.08.2024 +#### Version 17.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..861a87a97 --- /dev/null +++ b/project_resource/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################# +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..e16c66a83 --- /dev/null +++ b/project_resource/models/project_task.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################### +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", + help='Start date of the task') + users_ids = fields.Many2many('res.users', + compute="_compute_users_ids", + help="This field is to store the users" + " based on the calculation") + date_deadline = fields.Date(string='Deadline', + help='End date of the task') + manager_id = fields.Many2one('res.users', + string='Project Manager', + related='project_id.user_id', + readonly=True, + help='Project Manager of the task') + + @api.onchange('task_start_date', 'date_deadline') + def _compute_users_ids(self): + """ Returning the domain for selecting the free resource """ + for rec in self: + if rec.date_deadline and rec.task_start_date: + from_date = rec.date_deadline + end_date = rec.task_start_date + resource_ids = rec.get_free_resource_ids(from_date, end_date) + if rec.project_id.privacy_visibility == 'followers': + rec.users_ids = rec.env['res.users'].search( + [('id', 'not in', resource_ids), + ('id', 'in', rec.project_id.message_follower_ids.ids), + ('share', '=', False)]) + rec.user_ids.write({'id': [(6, 0, rec.users_ids)]}) + else: + rec.users_ids = rec.env['res.users'].search([ + ('id', 'not in', resource_ids), + ('share', '=', False)]) + rec.user_ids.write({'id': [(6, 0, rec.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..83dc9380e --- /dev/null +++ b/project_resource/models/res_users.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################# +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..6d89eb95d --- /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 \ No newline at end of file diff --git a/project_resource/static/description/assets/icons/capture (1).png b/project_resource/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/project_resource/static/description/assets/icons/capture (1).png differ 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/chevron.png b/project_resource/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/project_resource/static/description/assets/icons/chevron.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/img.png b/project_resource/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/project_resource/static/description/assets/icons/img.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/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/photo-capture.png b/project_resource/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/project_resource/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/project_resource/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/project_resource/static/description/assets/misc/Cybrosys R.png differ diff --git a/project_resource/static/description/assets/misc/email.svg b/project_resource/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/project_resource/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project_resource/static/description/assets/misc/phone.svg b/project_resource/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/project_resource/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/project_resource/static/description/assets/misc/star (1) 2.svg b/project_resource/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/project_resource/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/project_resource/static/description/assets/misc/support (1) 1.svg b/project_resource/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/project_resource/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/project_resource/static/description/assets/misc/support-email.svg b/project_resource/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/project_resource/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/project_resource/static/description/assets/misc/tick-mark.svg b/project_resource/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/project_resource/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/project_resource/static/description/assets/misc/whatsapp 1.svg b/project_resource/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/project_resource/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/project_resource/static/description/assets/misc/whatsapp.svg b/project_resource/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/project_resource/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project_resource/static/description/assets/modules/print_minutes_of_meeting.png b/project_resource/static/description/assets/modules/print_minutes_of_meeting.png new file mode 100644 index 000000000..1d9e21fbc Binary files /dev/null and b/project_resource/static/description/assets/modules/print_minutes_of_meeting.png differ diff --git a/project_resource/static/description/assets/modules/project_custom_gantt.png b/project_resource/static/description/assets/modules/project_custom_gantt.png new file mode 100644 index 000000000..2ad200f9f Binary files /dev/null and b/project_resource/static/description/assets/modules/project_custom_gantt.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..84457ac0a 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_attachments.jpg b/project_resource/static/description/assets/modules/project_task_attachments.jpg new file mode 100644 index 000000000..492b47dbe Binary files /dev/null and b/project_resource/static/description/assets/modules/project_task_attachments.jpg differ diff --git a/project_resource/static/description/assets/modules/project_tasks_from_templates.png b/project_resource/static/description/assets/modules/project_tasks_from_templates.png new file mode 100644 index 000000000..c84c8b1c4 Binary files /dev/null and b/project_resource/static/description/assets/modules/project_tasks_from_templates.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..3ce71a366 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/screenshots/1.png b/project_resource/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..62ffd778c Binary files /dev/null and b/project_resource/static/description/assets/screenshots/1.png differ diff --git a/project_resource/static/description/assets/screenshots/2.png b/project_resource/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..330df4e93 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/2.png differ diff --git a/project_resource/static/description/assets/screenshots/3.png b/project_resource/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..67ba5f77f Binary files /dev/null and b/project_resource/static/description/assets/screenshots/3.png differ diff --git a/project_resource/static/description/assets/screenshots/4.png b/project_resource/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..ad058446e Binary files /dev/null and b/project_resource/static/description/assets/screenshots/4.png differ diff --git a/project_resource/static/description/assets/screenshots/5.png b/project_resource/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ac3cd6d51 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/5.png differ diff --git a/project_resource/static/description/assets/screenshots/6.png b/project_resource/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..7e88023bf Binary files /dev/null and b/project_resource/static/description/assets/screenshots/6.png differ diff --git a/project_resource/static/description/assets/screenshots/7.png b/project_resource/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..94b977f75 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/7.png differ diff --git a/project_resource/static/description/assets/screenshots/8.png b/project_resource/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..d70c6e5cc Binary files /dev/null and b/project_resource/static/description/assets/screenshots/8.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..107e2023e Binary files /dev/null and b/project_resource/static/description/assets/screenshots/hero.gif differ diff --git a/project_resource/static/description/banner.jpg b/project_resource/static/description/banner.jpg new file mode 100644 index 000000000..74220514c Binary files /dev/null and b/project_resource/static/description/banner.jpg differ diff --git a/project_resource/static/description/icon.png b/project_resource/static/description/icon.png new file mode 100644 index 000000000..007388c2a 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..14316318a --- /dev/null +++ b/project_resource/static/description/index.html @@ -0,0 +1,631 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Project Free Resource

+

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

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Directly get the all resource details.

+
+
+
+
+
+
+ +
+
+

Resource detail list view.

+
+
+
+
+
+
+ +
+
+

+ Only the Users Allowed will be Able to Access Project and Tasks. +

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

+ Visibility set to invited internal users.

+
+
+
+
+
+
+ +
+
+

+ Resource for the task with invited internal users.

+
+
+
+
+
+
+ +
+
+

+ Visibility set to all internal users.

+
+
+
+
+
+
+ +
+
+

+ 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 for the task with all employee visibility.

+
+
+
+
+
+
+
    +
  • + Get the resources for a task, based the given task period and visibility. +
  • +
  • + Only the Users Allowed will be Able to Access Project and Tasks. +
  • +
  • + 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. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:1 August 2024 +
+

+ Initial commit for Project Free Resource.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/project_resource/views/project_task_views.xml b/project_resource/views/project_task_views.xml new file mode 100644 index 000000000..32de28601 --- /dev/null +++ b/project_resource/views/project_task_views.xml @@ -0,0 +1,20 @@ + + + + + Project.task.view.form.inherit.project.resource + project.task + + + + + + + 1 + + + 1 + + + + \ No newline at end of file diff --git a/project_resource/views/res_users_view.xml b/project_resource/views/res_users_view.xml new file mode 100644 index 000000000..d35e90821 --- /dev/null +++ b/project_resource/views/res_users_view.xml @@ -0,0 +1,44 @@ + + + + + res.users.view.form.inherit.project.resource + res.users + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + res.users.view.tree.inherit.project.resource + res.users + + + + + + +
\ No newline at end of file diff --git a/project_resource/wizards/__init__.py b/project_resource/wizards/__init__.py new file mode 100644 index 000000000..64ac71973 --- /dev/null +++ b/project_resource/wizards/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################### +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..19816ce77 --- /dev/null +++ b/project_resource/wizards/free_resource.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class FreeResource(models.TransientModel): + """Wizard to add the period to get the free resource""" + _name = 'free.resource' + _description = 'Free Resource' + + date_from = fields.Date( + string="Start Date", + help="Start date of period for receiving the Free Resource") + date_to = fields.Date( + string="End Date", + help="End date of period for receiving the Free Resource") + + def get_free_resource(self): + """Get the list of free resource at the given period """ + if self.date_from and self.date_to: + case = 'in' + resource_ids = self.env['project.task'].\ + get_free_resource_ids(self.date_from, self.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_view.xml b/project_resource/wizards/free_resource_view.xml new file mode 100644 index 000000000..4e54b767d --- /dev/null +++ b/project_resource/wizards/free_resource_view.xml @@ -0,0 +1,37 @@ + + + + + free.resource.view.form + free.resource + +
+ + + + + + + +
+
+ +
+
+ + + Free Resource + free.resource + form + + new + + + +
\ No newline at end of file