diff --git a/project_resource/README.rst b/project_resource/README.rst new file mode 100755 index 000000000..105c9f62f --- /dev/null +++ b/project_resource/README.rst @@ -0,0 +1,36 @@ +Project Free Resource +====================== + +Free Resources In Project. + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/14.0/setup/install.html +- Install our custom addon + + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developer: Jibin James @ cybrosys, odoo@cybrosys.com + + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/project_resource/__init__.py b/project_resource/__init__.py new file mode 100644 index 000000000..ff351795b --- /dev/null +++ b/project_resource/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Jibin James (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 wizard \ No newline at end of file diff --git a/project_resource/__manifest__.py b/project_resource/__manifest__.py new file mode 100644 index 000000000..2cdab9ceb --- /dev/null +++ b/project_resource/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Jibin James (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", + 'summary': """ + Get all free resources for the project based on the project start and end dates""", + 'description': """ + Get all free resources for the project based on the project start and end dates""", + 'version': '14.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'project', 'hr_timesheet'], + 'data': [ + 'security/ir.model.access.csv', + 'views/views.xml', + 'views/templates.xml', + 'wizard/wizard.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': True, + +} diff --git a/project_resource/doc/RELEASE_NOTES.md b/project_resource/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e2ff5afb6 --- /dev/null +++ b/project_resource/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 05.07.2022 +#### Version 14.0.1.0.1 +#### ADD +- Initial commit + diff --git a/project_resource/models/__init__.py b/project_resource/models/__init__.py new file mode 100644 index 000000000..cfadc4b9b --- /dev/null +++ b/project_resource/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Jibin James (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 \ No newline at end of file diff --git a/project_resource/models/models.py b/project_resource/models/models.py new file mode 100644 index 000000000..78307a92c --- /dev/null +++ b/project_resource/models/models.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Jibin James (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 datetime import timedelta +from odoo import models, fields, api + + +class ResourceProject(models.Model): + """ Task Model""" + _inherit = 'project.task' + + task_start_date = fields.Date(sting="Start Date", required=True, + help='Task end date') + + @api.onchange('task_start_date', 'date_deadline') + def select_employee(self): + """ returning the domain for selcting 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) + print(resource_ids,self.project_id.privacy_visibility, "ids") + if self.project_id.privacy_visibility == 'followers': + return {'domain': + {'user_id': + [('id', 'not in', resource_ids), + ('id', 'in', self.project_id.allowed_internal_user_ids.ids), + ('share', '=', False)]}} + else: + return {'domain': {'user_id': [('id', 'not in', resource_ids), + ('share', '=', False)]}} + + def get_free_resource_ids(self, from_date, end_date): + """getting the resources for the particular period """ + lst = [] + date_lst = [] + date_curent_list = [] + res_pro = self.env['res.users'].search([]) + for rec in res_pro.project_allocated_ids: + + if rec.task_start_date and rec.date_deadline: + if rec.task_start_date <= from_date <= rec.date_deadline: + lst.append(rec.user_id.id) + if rec.task_start_date <= end_date <= rec.date_deadline: + lst.append(rec.user_id.id) + + delta = rec.date_deadline - rec.task_start_date + for i in range(delta.days + 1): + date_lst.append(rec.task_start_date + timedelta(days=i)) + + delta = end_date - from_date + for i in range(delta.days + 1): + date_curent_list.append(from_date + timedelta(days=i)) + + if from_date not in date_lst and end_date not in date_lst: + for rec_date in date_curent_list: + if rec_date in date_lst: + lst.append(rec.user_id.id) + return_list = list(set(lst)) + return return_list + + +class ProjectEmployee(models.Model): + """To know the assigned/free users""" + _inherit = 'res.users' + + project_allocated_ids = fields.One2many('project.task', + 'user_id', + string='Assigned Task', + help='assigned tasks') diff --git a/project_resource/security/ir.model.access.csv b/project_resource/security/ir.model.access.csv new file mode 100644 index 000000000..641cea300 --- /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.free_resource,model_free_resource,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/project_resource/static/description/assets/arrow-circle-black.png b/project_resource/static/description/assets/arrow-circle-black.png new file mode 100644 index 000000000..e8948eb73 Binary files /dev/null and b/project_resource/static/description/assets/arrow-circle-black.png differ diff --git a/project_resource/static/description/assets/arrow-circle-magenta.png b/project_resource/static/description/assets/arrow-circle-magenta.png new file mode 100644 index 000000000..91c3c11b8 Binary files /dev/null and b/project_resource/static/description/assets/arrow-circle-magenta.png differ diff --git a/project_resource/static/description/assets/hero.png b/project_resource/static/description/assets/hero.png new file mode 100644 index 000000000..9630cbda0 Binary files /dev/null and b/project_resource/static/description/assets/hero.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/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/modules/advanced_ecom_image.png b/project_resource/static/description/assets/modules/advanced_ecom_image.png new file mode 100644 index 000000000..cf31cfb4a Binary files /dev/null and b/project_resource/static/description/assets/modules/advanced_ecom_image.png differ diff --git a/project_resource/static/description/assets/modules/barcode_scanning_image.png b/project_resource/static/description/assets/modules/barcode_scanning_image.png new file mode 100644 index 000000000..844b870eb Binary files /dev/null and b/project_resource/static/description/assets/modules/barcode_scanning_image.png differ diff --git a/project_resource/static/description/assets/modules/dynamic_image.png b/project_resource/static/description/assets/modules/dynamic_image.png new file mode 100644 index 000000000..f55c47e0f Binary files /dev/null and b/project_resource/static/description/assets/modules/dynamic_image.png differ diff --git a/project_resource/static/description/assets/modules/global_search_image.png b/project_resource/static/description/assets/modules/global_search_image.png new file mode 100644 index 000000000..67c50267b Binary files /dev/null and b/project_resource/static/description/assets/modules/global_search_image.png differ diff --git a/project_resource/static/description/assets/modules/invoice_image.png b/project_resource/static/description/assets/modules/invoice_image.png new file mode 100644 index 000000000..0c9bb377e Binary files /dev/null and b/project_resource/static/description/assets/modules/invoice_image.png differ diff --git a/project_resource/static/description/assets/modules/product_return_image.png b/project_resource/static/description/assets/modules/product_return_image.png new file mode 100644 index 000000000..3afc14722 Binary files /dev/null and b/project_resource/static/description/assets/modules/product_return_image.png differ diff --git a/project_resource/static/description/assets/respnsive-img.png b/project_resource/static/description/assets/respnsive-img.png new file mode 100644 index 000000000..f78bb1801 Binary files /dev/null and b/project_resource/static/description/assets/respnsive-img.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..bc6ac9135 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..2a6683b25 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..a60b4e609 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..612d10e5a Binary files /dev/null and b/project_resource/static/description/assets/screenshots/4.png differ diff --git a/project_resource/static/description/assets/screenshots/free1.png b/project_resource/static/description/assets/screenshots/free1.png new file mode 100644 index 000000000..ed20e74e9 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/free1.png differ diff --git a/project_resource/static/description/assets/screenshots/free2.png b/project_resource/static/description/assets/screenshots/free2.png new file mode 100644 index 000000000..a3b7c9ef6 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/free2.png differ diff --git a/project_resource/static/description/assets/screenshots/free3.png b/project_resource/static/description/assets/screenshots/free3.png new file mode 100644 index 000000000..0d880ddf6 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/free3.png differ diff --git a/project_resource/static/description/assets/screenshots/free4.png b/project_resource/static/description/assets/screenshots/free4.png new file mode 100644 index 000000000..804f74438 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/free4.png differ diff --git a/project_resource/static/description/assets/screenshots/freer.png b/project_resource/static/description/assets/screenshots/freer.png new file mode 100644 index 000000000..5649eb084 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/freer.png differ diff --git a/project_resource/static/description/assets/screenshots/freer1.png b/project_resource/static/description/assets/screenshots/freer1.png new file mode 100644 index 000000000..9cae650aa Binary files /dev/null and b/project_resource/static/description/assets/screenshots/freer1.png differ diff --git a/project_resource/static/description/assets/screenshots/freer2.png b/project_resource/static/description/assets/screenshots/freer2.png new file mode 100644 index 000000000..25f9af05c Binary files /dev/null and b/project_resource/static/description/assets/screenshots/freer2.png differ diff --git a/project_resource/static/description/assets/screenshots/freer3.png b/project_resource/static/description/assets/screenshots/freer3.png new file mode 100644 index 000000000..8d37cab42 Binary files /dev/null and b/project_resource/static/description/assets/screenshots/freer3.png differ diff --git a/project_resource/static/description/assets/screenshots/sticky_header.png b/project_resource/static/description/assets/screenshots/sticky_header.png new file mode 100644 index 000000000..9685ef6fb Binary files /dev/null and b/project_resource/static/description/assets/screenshots/sticky_header.png differ diff --git a/project_resource/static/description/banner.png b/project_resource/static/description/banner.png new file mode 100644 index 000000000..887a53c07 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..c73fb3acf 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..9fb25a7c7 --- /dev/null +++ b/project_resource/static/description/index.html @@ -0,0 +1,632 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Free Resources In Project

+

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

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ 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.

+ +
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

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

+
+
+ +
+
+ +
+
+

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

+
+
+ +
+
+ +
+
+

+ If not date filter, will get all resource details +

+
+
+ +
+ +
+
+

+ Screenshots +

+
+ +
+

+ Visibility set to invited Internal user +

+ +
+ +
+

+ Free resource for the task with invited internal user visibility +

+ +
+ +
+

+ Visibility set to all Internal user +

+ +
+ +
+

+ Free resource for the task with all internal user visibility

+ +
+ +
+

+ Resource menu for get resource details +

+ +
+ +
+

+ Wizard for add the date filter +

+ +
+ +
+

+ Resource detail list view +

+ +
+ +
+

+ Resource detail form view. +

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

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/project_resource/views/templates.xml b/project_resource/views/templates.xml new file mode 100644 index 000000000..fdbc3ae5a --- /dev/null +++ b/project_resource/views/templates.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/project_resource/views/views.xml b/project_resource/views/views.xml new file mode 100644 index 000000000..5458fa605 --- /dev/null +++ b/project_resource/views/views.xml @@ -0,0 +1,68 @@ + + + + Project.resource.form + project.task + + + + + + + + + + + True + + + True + + + + + + + + user.free.form + res.users + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + user.free.tree + res.users + + + + + + + + + +
+
\ No newline at end of file diff --git a/project_resource/wizard/__init__.py b/project_resource/wizard/__init__.py new file mode 100644 index 000000000..20a7f5c4b --- /dev/null +++ b/project_resource/wizard/__init__.py @@ -0,0 +1 @@ +from . import wizard \ No newline at end of file diff --git a/project_resource/wizard/wizard.py b/project_resource/wizard/wizard.py new file mode 100644 index 000000000..a0ce5050a --- /dev/null +++ b/project_resource/wizard/wizard.py @@ -0,0 +1,33 @@ +""" Creating Wizard to add the period to get the free resource""" +from odoo import models, fields + + +class FreeResource(models.TransientModel): + """Wizard to add the period to get the free resource""" + _name = 'free.resource' + + date_from = fields.Date(string="Start Date") + date_to = fields.Date(string="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: + resource_ids = self.env['project.task'].\ + get_free_resource_ids(date_from, date_to) + else: + resource_ids = [] + + return { + 'name': 'Free Resource', + 'view_mode': 'tree,form', + 'target': 'main', + 'res_model': 'res.users', + 'views': [ + (self.env.ref('project_resource.free_user_tree').id, 'tree'), + (self.env.ref('project_resource.free_user_form').id, 'form')], + 'type': 'ir.actions.act_window', + 'domain': [('id', 'not in', resource_ids), ('share', '=', False)], + } diff --git a/project_resource/wizard/wizard.xml b/project_resource/wizard/wizard.xml new file mode 100644 index 000000000..f8cb1741a --- /dev/null +++ b/project_resource/wizard/wizard.xml @@ -0,0 +1,38 @@ + + + free.resource.wizard + free.resource + +
+ + + + + + + +
+
+ +
+
+ + + Free resource wizard + free.resource + form + + new + + + + + +
\ No newline at end of file