@ -0,0 +1,42 @@ | 
				
			|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg | 
				
			|||
    :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html | 
				
			|||
    :alt: License: AGPL-3 | 
				
			|||
 | 
				
			|||
Volunteers and Donors Management | 
				
			|||
================================ | 
				
			|||
This app allows you to manage your volunteers and donors in Odoo and allows you to create projects and tasks with volunteers . It also allows you to select volunteer and donor details on CRM of lead / pipelines | 
				
			|||
 | 
				
			|||
License | 
				
			|||
------- | 
				
			|||
General Public License, Version 3 (AGPL v3). | 
				
			|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) | 
				
			|||
 | 
				
			|||
Company | 
				
			|||
------- | 
				
			|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Credits | 
				
			|||
------- | 
				
			|||
Developer: (V15) Nandakishore M, Contact: odoo@cybrosys.com | 
				
			|||
 | 
				
			|||
Contacts | 
				
			|||
-------- | 
				
			|||
* Mail Contact : odoo@cybrosys.com | 
				
			|||
* Website : https://cybrosys.com | 
				
			|||
 | 
				
			|||
Bug Tracker | 
				
			|||
----------- | 
				
			|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. | 
				
			|||
 | 
				
			|||
Maintainer | 
				
			|||
========== | 
				
			|||
.. image:: https://cybrosys.com/images/logo.png | 
				
			|||
   :target: https://cybrosys.com | 
				
			|||
 | 
				
			|||
This module is maintained by Cybrosys Technologies. | 
				
			|||
 | 
				
			|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ | 
				
			|||
 | 
				
			|||
Further information | 
				
			|||
=================== | 
				
			|||
HTML Description: `<static/description/index.html>`__ | 
				
			|||
@ -0,0 +1,22 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from . import models | 
				
			|||
@ -0,0 +1,57 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
{ | 
				
			|||
    'name': "Volunteers and Donors Management", | 
				
			|||
    'version': "15.0.1.0.0", | 
				
			|||
    'category': 'Extra Tools', | 
				
			|||
    'summary': "The app helps manage volunteers and donors in Odoo, allowing " | 
				
			|||
               "assign volunteers and donors in Project and CRM ", | 
				
			|||
    'description': "This app allows you to manage your volunteers and donors " | 
				
			|||
                   "in Odoo and allows you to create projects and tasks with " | 
				
			|||
                   "volunteers and activities volunteers . It also allows you" | 
				
			|||
                   "to select volunteer and donor details on CRM of lead / " | 
				
			|||
                   "pipelines.", | 
				
			|||
    'author': 'Cybrosys Techno Solutions', | 
				
			|||
    'company': 'Cybrosys Techno Solutions', | 
				
			|||
    'maintainer': 'Cybrosys Techno Solutions', | 
				
			|||
    'website': 'https://www.cybrosys.com', | 
				
			|||
    'depends': ['crm', 'hr', 'project', 'sale_management', 'sale_timesheet'], | 
				
			|||
    'data': [ | 
				
			|||
        'security/ir.model.access.csv', | 
				
			|||
        'security/volunteers_donors_management_groups.xml', | 
				
			|||
        'report/project_reports.xml', | 
				
			|||
        'report/project_report_templates.xml', | 
				
			|||
        'views/res_partner_views.xml', | 
				
			|||
        'views/project_project_views.xml', | 
				
			|||
        'views/project_task_views.xml', | 
				
			|||
        'views/crm_lead_views.xml', | 
				
			|||
        'views/volunteer_type_views.xml', | 
				
			|||
        'views/volunteer_skill_views.xml', | 
				
			|||
        'views/donor_type_views.xml', | 
				
			|||
        'views/volunteers_and_donors_management_menu.xml' | 
				
			|||
    ], | 
				
			|||
    'images': ['static/description/banner.png'], | 
				
			|||
    'license': 'AGPL-3', | 
				
			|||
    'installable': True, | 
				
			|||
    'auto_install': False, | 
				
			|||
    'application': True, | 
				
			|||
} | 
				
			|||
@ -0,0 +1,7 @@ | 
				
			|||
## Module <volunteers_donors_management> | 
				
			|||
 | 
				
			|||
#### 03.05.2024 | 
				
			|||
#### Version 15.0.1.0.0 | 
				
			|||
#### ADD | 
				
			|||
 | 
				
			|||
- Initial Commit for Volunteers and Donors Management | 
				
			|||
@ -0,0 +1,28 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from . import crm_lead | 
				
			|||
from . import donor_type | 
				
			|||
from . import project | 
				
			|||
from . import project_task | 
				
			|||
from . import res_partner | 
				
			|||
from . import volunteer_skill | 
				
			|||
from . import volunteer_type | 
				
			|||
@ -0,0 +1,48 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class CrmLead(models.Model): | 
				
			|||
    """This class extends the 'crm.lead' model to add custom fields related | 
				
			|||
    to donor and volunteer information.""" | 
				
			|||
    _inherit = "crm.lead" | 
				
			|||
 | 
				
			|||
    donor_type_id = fields.Many2one('donor.type', string='Donor Type', | 
				
			|||
                                    related='partner_id.donor_type_id', | 
				
			|||
                                    help='The type of donor associated with ' | 
				
			|||
                                         'this lead', | 
				
			|||
                                    readonly=False) | 
				
			|||
    volunteer_type_id = fields.Many2one('volunteer.type', | 
				
			|||
                                        string='Volunteer Type', | 
				
			|||
                                        related='partner_id.volunteer_type_id', | 
				
			|||
                                        help='The type of volunteer ' | 
				
			|||
                                             'associated with this lead', | 
				
			|||
                                        readonly=False) | 
				
			|||
    volunteer_skill_ids = fields.Many2many('volunteer.skill', | 
				
			|||
                                           string='Volunteer Skill', | 
				
			|||
                                           help='The skills possessed by the ' | 
				
			|||
                                                'volunteer associated with ' | 
				
			|||
                                                'this lead', | 
				
			|||
                                           related= | 
				
			|||
                                           'partner_id.volunteer_skill_ids', | 
				
			|||
                                           readonly=False) | 
				
			|||
@ -0,0 +1,35 @@ | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class DonorType(models.Model): | 
				
			|||
    """This class represents the donor type model, which stores | 
				
			|||
    information related to different types of donors.""" | 
				
			|||
    _name = "donor.type" | 
				
			|||
    _description = "Donor Type" | 
				
			|||
    _rec_name = 'donor_type' | 
				
			|||
 | 
				
			|||
    donor_type = fields.Char(String='Name', help='The name of the donor type', | 
				
			|||
                             required=True) | 
				
			|||
    donor_code = fields.Char(string='Donor Code', required=True, | 
				
			|||
                             help='The code of the donor code') | 
				
			|||
    description = fields.Html(string='Description', translate=True, | 
				
			|||
                              help='A description of the donor type') | 
				
			|||
@ -0,0 +1,35 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class ProjectProject(models.Model): | 
				
			|||
    """This class extends the 'project.project' model to add a many-to-many | 
				
			|||
    field for storing volunteer details associated with a project.""" | 
				
			|||
    _inherit = "project.project" | 
				
			|||
 | 
				
			|||
    project_partner_ids = fields.Many2many( | 
				
			|||
        'res.partner', | 
				
			|||
        string='Volunteer Details', | 
				
			|||
        domain=[('is_volunteer', '=', True)], | 
				
			|||
        help='The volunteers associated ' | 
				
			|||
             'with this project') | 
				
			|||
@ -0,0 +1,74 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import api, fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class ProjectTask(models.Model): | 
				
			|||
    """  This class extends the 'project.task' model to add a many-to-many | 
				
			|||
    field for storing volunteer details associated with a task. | 
				
			|||
 | 
				
			|||
     Methods: | 
				
			|||
     _compute_followers(): Compute method to update task followers based on | 
				
			|||
        project_task_partner_ids. | 
				
			|||
    """ | 
				
			|||
    _inherit = "project.task" | 
				
			|||
 | 
				
			|||
    project_task_partner_ids = fields.Many2many( | 
				
			|||
        'res.partner', | 
				
			|||
        string='Volunteer Details', | 
				
			|||
        help='The volunteers associated with this task', | 
				
			|||
        readonly=False) | 
				
			|||
    project_invisible_partner_ids = fields.Many2many( | 
				
			|||
        'res.partner', string="Project Volunteers", | 
				
			|||
        related='project_id.project_partner_ids', ) | 
				
			|||
 | 
				
			|||
    @api.depends('project_invisible_partner_ids') | 
				
			|||
    def _compute_volunteer_domain(self): | 
				
			|||
        """Compute method to update project_task_partner_ids | 
				
			|||
             based on project_invisible_partner_ids.""" | 
				
			|||
        for task in self: | 
				
			|||
            task.project_task_partner_ids = [ | 
				
			|||
                (6, 0, task.project_invisible_partner_ids.ids)] | 
				
			|||
 | 
				
			|||
    @api.onchange('project_task_partner_ids') | 
				
			|||
    def _onchange_project_task_partner_ids(self): | 
				
			|||
        """Automatically add followers when project_task_partner_ids changes.""" | 
				
			|||
        self.message_subscribe(partner_ids=self.project_task_partner_ids.ids) | 
				
			|||
 | 
				
			|||
    def write(self, vals): | 
				
			|||
        """ | 
				
			|||
        Override the write method to handle changes in project_task_partner_ids. | 
				
			|||
 | 
				
			|||
        When the project_task_partner_ids field is updated, this method | 
				
			|||
        calculates the partner IDs that are being removed and unsubscribes | 
				
			|||
        them as followers. | 
				
			|||
 | 
				
			|||
        :param vals: A dictionary of field values to update. | 
				
			|||
        :return: The result of the original write method. | 
				
			|||
        """ | 
				
			|||
        if 'project_task_partner_ids' in vals: | 
				
			|||
            new_partner_ids = vals.get('project_task_partner_ids')[0][ | 
				
			|||
                2] if vals.get('project_task_partner_ids') else [] | 
				
			|||
            removed_partner_ids = list(set(self.project_task_partner_ids.ids) | 
				
			|||
                                       - set(new_partner_ids)) | 
				
			|||
            self.message_unsubscribe(partner_ids=removed_partner_ids) | 
				
			|||
        return super(ProjectTask, self).write(vals) | 
				
			|||
@ -0,0 +1,46 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class ResPartner(models.Model): | 
				
			|||
    """ This class extends the 'res.partner' model to add fields for storing | 
				
			|||
    information about volunteers and donors. | 
				
			|||
    """ | 
				
			|||
    _inherit = "res.partner" | 
				
			|||
 | 
				
			|||
    is_volunteer = fields.Boolean(string='Is Volunteer', help='Check this box ' | 
				
			|||
                                                              'if the partner ' | 
				
			|||
                                                              'is a volunteer') | 
				
			|||
    is_donor = fields.Boolean(string='Is Donor', help='Check this box if the ' | 
				
			|||
                                                      'partner is a donor') | 
				
			|||
    volunteer_type_id = fields.Many2one('volunteer.type', | 
				
			|||
                                        String='Volunteer Type', | 
				
			|||
                                        help='The type of volunteer ' | 
				
			|||
                                             'associated with this partner') | 
				
			|||
    volunteer_skill_ids = fields.Many2many('volunteer.skill', | 
				
			|||
                                           String='Volunteer Skill', | 
				
			|||
                                           help='The skills of the volunteer ' | 
				
			|||
                                                'associated with this partner') | 
				
			|||
    donor_type_id = fields.Many2one('donor.type', String='Donor Types', | 
				
			|||
                                    help='The type of donor associated with ' | 
				
			|||
                                         'this partner') | 
				
			|||
@ -0,0 +1,49 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from random import randint | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class VolunteerSkills(models.Model): | 
				
			|||
    """This class represents the skills that a volunteer can possess. | 
				
			|||
 | 
				
			|||
     Methods: _default_color(): Set the Color based on VolunteerSkills | 
				
			|||
     inside the tree view""" | 
				
			|||
    _name = "volunteer.skill" | 
				
			|||
    _description = "Volunteer Skill" | 
				
			|||
    _rec_name = 'volunteer_skill' | 
				
			|||
 | 
				
			|||
    def _default_color(self): | 
				
			|||
        """Set the Color based on VolunteerSkills inside the tree view""" | 
				
			|||
        return randint(1, 11) | 
				
			|||
 | 
				
			|||
    volunteer_skill = fields.Char(String='Name', help='The name of the ' | 
				
			|||
                                                      'volunteer skill', | 
				
			|||
                                  required=True) | 
				
			|||
    volunteer_skill_code = fields.Char(String='code', help='The code of the ' | 
				
			|||
                                                           'volunteer skill', | 
				
			|||
                                       required=True,) | 
				
			|||
    color = fields.Integer(string='Color', default=_default_color, | 
				
			|||
                           help='The color code of the volunteer skill') | 
				
			|||
 | 
				
			|||
    description = fields.Html(string='Description', translate=True, | 
				
			|||
                              help='A description of the volunteer skill') | 
				
			|||
@ -0,0 +1,38 @@ | 
				
			|||
# -*- coding: utf-8 -*- | 
				
			|||
################################################################################ | 
				
			|||
# | 
				
			|||
#    Cybrosys Technologies Pvt. Ltd. | 
				
			|||
# | 
				
			|||
#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). | 
				
			|||
#    Author: Nandakishore M (odoo@cybrosys.info) | 
				
			|||
# | 
				
			|||
#    You can modify it under the terms of the GNU AFFERO | 
				
			|||
#    GENERAL PUBLIC LICENSE (AGPL v3), Version 3. | 
				
			|||
# | 
				
			|||
#    This program is distributed in the hope that it will be useful, | 
				
			|||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
#    GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. | 
				
			|||
# | 
				
			|||
#    You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE | 
				
			|||
#    (AGPL v3) along with this program. | 
				
			|||
#    If not, see <http://www.gnu.org/licenses/>. | 
				
			|||
# | 
				
			|||
################################################################################ | 
				
			|||
from odoo import fields, models | 
				
			|||
 | 
				
			|||
 | 
				
			|||
class VolunteerType(models.Model): | 
				
			|||
    """This class represents the different types of volunteers.""" | 
				
			|||
    _name = "volunteer.type" | 
				
			|||
    _description = "Volunteer Type" | 
				
			|||
    _rec_name = 'volunteer_type' | 
				
			|||
 | 
				
			|||
    volunteer_type = fields.Char(String='Name', help='The name of the ' | 
				
			|||
                                                     'volunteer type', | 
				
			|||
                                 required=True) | 
				
			|||
    volunteer_code = fields.Char(String='code', help='The code of the ' | 
				
			|||
                                                     'volunteer type', | 
				
			|||
                                 required=True) | 
				
			|||
    description = fields.Html(String='Description', translate=True, | 
				
			|||
                              help='A description of the volunteer type') | 
				
			|||
@ -0,0 +1,184 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8" ?> | 
				
			|||
<odoo> | 
				
			|||
    <!--    Report Template--> | 
				
			|||
    <template id="report_project_details"> | 
				
			|||
        <t t-call="web.html_container"> | 
				
			|||
            <t t-foreach="docs" t-as="data"> | 
				
			|||
                <t t-call="web.external_layout"> | 
				
			|||
                    <div class="page"> | 
				
			|||
                        <div class="text-center"> | 
				
			|||
                            <h1> | 
				
			|||
                                <u>Project Report</u> | 
				
			|||
                            </h1> | 
				
			|||
                        </div> | 
				
			|||
                        <br> | 
				
			|||
                        </br> | 
				
			|||
                        <h3> | 
				
			|||
                            Project Name : | 
				
			|||
                            <t t-esc="data.name"/> | 
				
			|||
                        </h3> | 
				
			|||
                        <table class="table table-sm" | 
				
			|||
                               style="border: 1px solid black;"> | 
				
			|||
                            <tr> | 
				
			|||
                                <td> | 
				
			|||
                                    <strong>Customer Name:</strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td> | 
				
			|||
                                    <t t-if="data.partner_id.name"> | 
				
			|||
                                        <t t-esc="data.partner_id.name"/> | 
				
			|||
                                    </t> | 
				
			|||
                                </td> | 
				
			|||
                            </tr> | 
				
			|||
                            <tr> | 
				
			|||
                                <td> | 
				
			|||
                                    <strong>Project Manger:</strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td> | 
				
			|||
                                    <t t-if="data.user_id.name"> | 
				
			|||
                                        <t t-esc="data.user_id.name"/> | 
				
			|||
                                    </t> | 
				
			|||
                                </td> | 
				
			|||
                            </tr> | 
				
			|||
                            <tr> | 
				
			|||
                                <td> | 
				
			|||
                                    <strong>Planned Date</strong> | 
				
			|||
                                </td> | 
				
			|||
                                <td> | 
				
			|||
                                    <t t-if="data.date_start"> | 
				
			|||
                                        <t t-esc="data.date_start"/> | 
				
			|||
                                    </t> | 
				
			|||
                                </td> | 
				
			|||
                            </tr> | 
				
			|||
                        </table> | 
				
			|||
                        <br> | 
				
			|||
                        </br> | 
				
			|||
                        <t t-if="data.task_ids"> | 
				
			|||
                            <h3>Tasks:</h3> | 
				
			|||
                            <style> | 
				
			|||
                                table, thead, th, td, tr, tbody { | 
				
			|||
                                border: 1px solid black; | 
				
			|||
                                border-collapse: collapse; | 
				
			|||
                                padding: 5px; | 
				
			|||
                                } | 
				
			|||
                            </style> | 
				
			|||
                            <table class="table table-sm" | 
				
			|||
                                   style="border: 2px solid black;"> | 
				
			|||
                                <thead> | 
				
			|||
                                    <tr> | 
				
			|||
                                        <strong> | 
				
			|||
                                            <th>Task Name</th> | 
				
			|||
                                            <th>Planned Hours</th> | 
				
			|||
                                            <th>Spent Hours</th> | 
				
			|||
                                            <th>Remaining Hours</th> | 
				
			|||
                                            <th>Assigned To</th> | 
				
			|||
                                            <th>Assigning Date</th> | 
				
			|||
                                            <th>Deadline</th> | 
				
			|||
                                            <th>Stage</th> | 
				
			|||
                                        </strong> | 
				
			|||
                                    </tr> | 
				
			|||
                                </thead> | 
				
			|||
                                <tbody> | 
				
			|||
                                    <t t-foreach="data.task_ids" t-as="task"> | 
				
			|||
                                        <tr> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="task.name"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-if="task.planned_hours"> | 
				
			|||
                                                    <t t-esc="task.planned_hours"/> | 
				
			|||
                                                </t> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-set="total_amount" t-value="0.0"/> | 
				
			|||
                                                <t t-if="task.timesheet_ids"> | 
				
			|||
                                                    <t t-foreach="task.timesheet_ids" t-as="time"> | 
				
			|||
                                                        <t t-if="time.unit_amount"> | 
				
			|||
                                                            <t t-set="total_amount" t-value="total_amount + time.unit_amount"/> | 
				
			|||
                                                        </t> | 
				
			|||
                                                    </t> | 
				
			|||
                                                </t> | 
				
			|||
                                                <t t-esc="total_amount"/> | 
				
			|||
                                            </td> | 
				
			|||
 | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-if="task.remaining_hours"> | 
				
			|||
                                                    <t t-esc="task.remaining_hours"/> | 
				
			|||
                                                </t> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="', '.join(user.name for user in task.user_ids)"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-if="task.date_assign"> | 
				
			|||
                                                    <t t-esc="task.date_assign.strftime('%d-%m-%Y')"/> | 
				
			|||
                                                </t> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-if="task.date_deadline"> | 
				
			|||
                                                    <t t-esc="task.date_deadline.strftime('%d-%m-%Y')"/> | 
				
			|||
                                                </t> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="task.stage_id.name"/> | 
				
			|||
                                            </td> | 
				
			|||
                                        </tr> | 
				
			|||
                                    </t> | 
				
			|||
                                </tbody> | 
				
			|||
                            </table> | 
				
			|||
                        </t> | 
				
			|||
                        <br> | 
				
			|||
                        </br> | 
				
			|||
                        <t t-if="data.project_partner_ids"> | 
				
			|||
                            <h3>Volunteer Details</h3> | 
				
			|||
                            <style> | 
				
			|||
                                table, thead, th, td, tr, tbody { | 
				
			|||
                                border: 1px solid black; | 
				
			|||
                                border-collapse: collapse; | 
				
			|||
                                padding: 5px; | 
				
			|||
                                } | 
				
			|||
                            </style> | 
				
			|||
                            <table class="table table-sm" | 
				
			|||
                                   style="border: 2px solid black;"> | 
				
			|||
                                <thead> | 
				
			|||
                                    <tr> | 
				
			|||
                                        <strong> | 
				
			|||
                                            <th>Volunteer</th> | 
				
			|||
                                            <th>Volunteer Type</th> | 
				
			|||
                                            <th>Volunteer Skill</th> | 
				
			|||
                                            <th>Phone</th> | 
				
			|||
                                            <th>Email</th> | 
				
			|||
                                        </strong> | 
				
			|||
                                    </tr> | 
				
			|||
                                </thead> | 
				
			|||
                                <tbody> | 
				
			|||
 | 
				
			|||
                                    <t t-foreach="data.project_partner_ids" | 
				
			|||
                                       t-as="request"> | 
				
			|||
                                        <tr> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="request.display_name"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="request.volunteer_type_id.volunteer_type"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="', '.join(skill.volunteer_skill for skill in request.volunteer_skill_ids)"/> | 
				
			|||
                                            </td> | 
				
			|||
 | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="request.phone"/> | 
				
			|||
                                            </td> | 
				
			|||
                                            <td> | 
				
			|||
                                                <t t-esc="request.email"/> | 
				
			|||
                                            </td> | 
				
			|||
                                        </tr> | 
				
			|||
                                    </t> | 
				
			|||
                                </tbody> | 
				
			|||
                            </table> | 
				
			|||
                        </t> | 
				
			|||
                    </div> | 
				
			|||
                </t> | 
				
			|||
            </t> | 
				
			|||
        </t> | 
				
			|||
    </template> | 
				
			|||
</odoo> | 
				
			|||
@ -0,0 +1,16 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<odoo> | 
				
			|||
    <data> | 
				
			|||
        <!-- Define the action for the project report --> | 
				
			|||
        <record id="project_report_action" model="ir.actions.report"> | 
				
			|||
            <field name="name">Project Report</field> | 
				
			|||
            <field name="model">project.project</field> | 
				
			|||
            <field name="report_type">qweb-pdf</field> | 
				
			|||
            <field name="report_name">volunteers_donors_management.report_project_details</field> | 
				
			|||
            <field name="report_file">volunteers_donors_management.report_project_details</field> | 
				
			|||
            <field name="binding_model_id" ref="model_project_project"/> | 
				
			|||
            <field name="binding_type">report</field> | 
				
			|||
        </record> | 
				
			|||
    </data> | 
				
			|||
</odoo> | 
				
			|||
 | 
				
			|||
		
		
			
  | 
@ -0,0 +1,16 @@ | 
				
			|||
<?xml version="1.0" ?> | 
				
			|||
<odoo> | 
				
			|||
    <data> | 
				
			|||
 | 
				
			|||
        <record model="ir.module.category" id="volunteers_donors_management_category"> | 
				
			|||
            <field name="name">Volunteers Donors Management</field> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
        <record id="volunteers_donors_management_user" model="res.groups"> | 
				
			|||
            <field name="name">User</field> | 
				
			|||
            <field name="category_id" | 
				
			|||
                   ref="volunteers_donors_management.volunteers_donors_management_category"/> | 
				
			|||
        </record> | 
				
			|||
 | 
				
			|||
    </data> | 
				
			|||
</odoo> | 
				
			|||
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
| 
		 After Width: | Height: | Size: 310 B  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 576 B  | 
| 
		 After Width: | Height: | Size: 733 B  | 
| 
		 After Width: | Height: | Size: 911 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 673 B  | 
| 
		 After Width: | Height: | Size: 878 B  | 
| 
		 After Width: | Height: | Size: 653 B  | 
| 
		 After Width: | Height: | Size: 905 B  | 
| 
		 After Width: | Height: | Size: 839 B  | 
| 
		 After Width: | Height: | Size: 427 B  | 
| 
		 After Width: | Height: | Size: 627 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 988 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 1.5 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 4.4 KiB  | 
| 
		 After Width: | Height: | Size: 589 B  | 
| 
		 After Width: | Height: | Size: 3.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
| 
		 After Width: | Height: | Size: 967 B  | 
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
| 
		 After Width: | Height: | Size: 3.8 KiB  | 
| 
		 After Width: | Height: | Size: 5.0 KiB  | 
| 
		 After Width: | Height: | Size: 57 KiB  | 
| 
		 After Width: | Height: | Size: 56 KiB  | 
| 
		 After Width: | Height: | Size: 56 KiB  | 
| 
		 After Width: | Height: | Size: 59 KiB  | 
| 
		 After Width: | Height: | Size: 1.8 MiB  | 
| 
		 After Width: | Height: | Size: 60 KiB  | 
| 
		 After Width: | Height: | Size: 756 KiB  | 
| 
		 After Width: | Height: | Size: 356 KiB  | 
| 
		 After Width: | Height: | Size: 413 KiB  | 
| 
		 After Width: | Height: | Size: 466 KiB  | 
| 
		 After Width: | Height: | Size: 404 KiB  | 
| 
		 After Width: | Height: | Size: 376 KiB  | 
| 
		 After Width: | Height: | Size: 291 KiB  | 
| 
		 After Width: | Height: | Size: 331 KiB  | 
| 
		 After Width: | Height: | Size: 213 KiB  | 
| 
		 After Width: | Height: | Size: 257 KiB  | 
| 
		 After Width: | Height: | Size: 329 KiB  | 
| 
		 After Width: | Height: | Size: 368 KiB  | 
| 
		 After Width: | Height: | Size: 286 KiB  | 
| 
		 After Width: | Height: | Size: 412 KiB  | 
| 
		 After Width: | Height: | Size: 389 KiB  | 
| 
		 After Width: | Height: | Size: 458 KiB  | 
| 
		 After Width: | Height: | Size: 162 KiB  | 
| 
		 After Width: | Height: | Size: 161 KiB  | 
| 
		 After Width: | Height: | Size: 166 KiB  | 
| 
		 After Width: | Height: | Size: 157 KiB  | 
| 
		 After Width: | Height: | Size: 155 KiB  | 
| 
		 After Width: | Height: | Size: 317 KiB  | 
| 
		 After Width: | Height: | Size: 354 KiB  | 
| 
		 After Width: | Height: | Size: 448 KiB  | 
| 
		 After Width: | Height: | Size: 118 KiB  | 
| 
		 After Width: | Height: | Size: 105 KiB  | 
| 
		 After Width: | Height: | Size: 120 KiB  | 
| 
		 After Width: | Height: | Size: 117 KiB  | 
| 
		 After Width: | Height: | Size: 93 KiB  | 
| 
		 After Width: | Height: | Size: 104 KiB  | 
| 
		 After Width: | Height: | Size: 115 KiB  | 
| 
		 After Width: | Height: | Size: 148 KiB  | 
| 
		 After Width: | Height: | Size: 299 KiB  | 
| 
		 After Width: | Height: | Size: 90 KiB  | 
| 
		 After Width: | Height: | Size: 58 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 55 KiB  | 
| 
		 After Width: | Height: | Size: 50 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 121 KiB  | 
| 
		 After Width: | Height: | Size: 122 KiB  | 
| 
		 After Width: | Height: | Size: 1016 KiB  | 
| 
		 After Width: | Height: | Size: 141 KiB  | 
| 
		 After Width: | Height: | Size: 933 KiB  | 
| 
		 After Width: | Height: | Size: 38 KiB  |