diff --git a/event_management/README.rst b/event_management/README.rst new file mode 100755 index 000000000..cb5ac7645 --- /dev/null +++ b/event_management/README.rst @@ -0,0 +1,65 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Event Management +================ +Event management is a core module which can manage any type of events. +The user can selectively download and install different service modules to extend the scope of this module. +The new service will be automatically get attached to this core Event management module. +It is different from Odoo's event module. +Here you can manage different types of events and allocate services to different users. + +Note: Presently we have released the service “Event Catering” under this module. New services are being developed by our team. + +Configuration +============= +* No additional configuration required + +Features +======== +* Event order creation. +* Automatically creates service orders. +* Allocate the services to different users. +* Integrated with Accounting module. +* Simple Workflow. +* Attractive Design. + +Installation +============ + - www.odoo.com/documentation/14.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +`Cybrosys Techno Solutions `__ + +Credits +======= +* Developer: (V14) Mohammed Dilshad Tk , Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@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 + +Further information +=================== +HTML Description: ``__ diff --git a/event_management/__init__.py b/event_management/__init__.py new file mode 100755 index 000000000..a8f3cbdf9 --- /dev/null +++ b/event_management/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from . import controllers +from . import models +from . import report +from . import wizard diff --git a/event_management/__manifest__.py b/event_management/__manifest__.py new file mode 100755 index 000000000..5b5563fe4 --- /dev/null +++ b/event_management/__manifest__.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +{ + 'name': 'Event Management', + 'version': '14.0.1.0.0', + "category": "Industries", + 'summary': """Event management is a core module which can manage any + type of events in odoo 14.""", + 'description': """Event management module use to manage different service + modules to extend the scope of this module. The new service will be + automatically get attached to this core Event management module. It is + different from Odoo's event module. Here you can manage different types of + events and allocate services to different users.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['account'], + 'data': ['security/event_management_groups.xml', + 'security/event_management_security.xml', + 'security/ir.model.access.csv', + 'data/event_management_data.xml', + 'views/assets.xml', + 'views/event_management_views.xml', + 'views/event_management_type_views.xml', + 'views/dashboard_action.xml', + 'report/event_management_templates.xml', + 'report/event_management_reports.xml', + 'wizard/event_management_report_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + "event_management/static/src/css/event_dashboard.css", + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/event_management/controllers/__init__.py b/event_management/controllers/__init__.py new file mode 100755 index 000000000..b080a62e1 --- /dev/null +++ b/event_management/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from . import event_management diff --git a/event_management/controllers/event_management.py b/event_management/controllers/event_management.py new file mode 100755 index 000000000..aeba2622a --- /dev/null +++ b/event_management/controllers/event_management.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +import json +from odoo import http +from odoo.http import content_disposition, request +from odoo.http import serialize_exception as _serialize_exception +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + """Controller Class for xlsx report""" + + @http.route('/xlsx_reports', type='http', auth='user', + methods=['POST'], csrf=False) + def get_report_xlsx(self, model, options, output_format, report_name): + """Method for passing data to xlsx report""" + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + options = json.loads(options) + try: + if output_format == 'xlsx': + response = request.make_response( + None, + headers=[('Content-Type', 'application/vnd.ms-excel'), ( + 'Content-Disposition', + content_disposition(report_name + '.xlsx'))]) + report_obj.get_xlsx_report(options, response) + return response + except Exception as err: + exception = _serialize_exception(err) + error = { + 'code': 200, + 'message': 'Odoo Server Error', + 'data': exception + } + return request.make_response(html_escape(json.dumps(error))) diff --git a/event_management/data/event_management_data.xml b/event_management/data/event_management_data.xml new file mode 100755 index 000000000..8833e512f --- /dev/null +++ b/event_management/data/event_management_data.xml @@ -0,0 +1,50 @@ + + + + + + Wedding + + + + + Birthday + + + + + Family Events + + + + + Press Conference + + + + + Seminars + + + + + Conferences + + + + + Event Order + event.order.sequence + %(day)s/%(month)s/%(year)s + EVE- + 1 + 2 + + + diff --git a/event_management/doc/RELEASE_NOTES.md b/event_management/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..3ac940f9d --- /dev/null +++ b/event_management/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 09.11.2023 +#### Version 14.0.1.0.0 +#### Add +- Initial commit for Event Management diff --git a/event_management/models/__init__.py b/event_management/models/__init__.py new file mode 100755 index 000000000..e0f5142b9 --- /dev/null +++ b/event_management/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from . import event_management +from . import event_management_type +from . import event_service_line diff --git a/event_management/models/event_management.py b/event_management/models/event_management.py new file mode 100755 index 000000000..3d5cf3887 --- /dev/null +++ b/event_management/models/event_management.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import UserError, ValidationError + + +class EventManagement(models.Model): + """Model for managing Event Management""" + _name = 'event.management' + _description = 'Event Management' + + name = fields.Char(string="Name", readonly=True, copy=False, + help="Name of the event management") + ref = fields.Char(string="Ref", readonly=True, help="Event Management " + "Reference") + type_of_event_id = fields.Many2one('event.management.type', + string="Type", + required=True, help="Type of the event") + partner_id = fields.Many2one('res.partner', string="Customer", + required=True, help="Client") + date = fields.Date(string="Date", default=fields.Date.today, required=True, + help="Current Date") + start_date = fields.Datetime(string="Start date", + default=lambda self: fields.datetime.now(), + required=True, help="Start date of the event" + " management") + end_date = fields.Datetime(string="End date", required=True, + help="End date of the event management") + service_line_ids = fields.One2many(comodel_name='event.service.line', + inverse_name='event_id', + string="Services", + help="Services of the event. " + "Automatically adds when " + "service modules are downloaded.") + state = fields.Selection(selection= + [('draft', 'Draft'), ('confirm', 'Confirmed'), + ('invoice', 'Invoiced'), ('close', 'Close'), ('cancel', 'Canceled')], + string="State", default="draft", help="stages of" + " the event") + note = fields.Text(string="Terms and conditions", help="Note for the event") + price_subtotal = fields.Float(string='Total', + compute='_compute_price_subtotal', store=True, + help="Sub total price") + image = fields.Binary(string="Image", attachment=True, + help="This field holds the image used as image for " + "the event, limited to 1080x720px.") + currency_id = fields.Many2one(comodel_name='res.currency', readonly=True, + default=lambda self: + self.env.user.company_id.currency_id, + help="Default currency is currency of the " + "company", string="Currency") + invoice_count = fields.Integer(string="Invoice Count", help="Count of " + "the invoices") + invoice_ids = fields.Many2many(comodel_name="account.move", copy=False, + string="Invoices", help="Corresponding " + "invoices") + pending_invoice = fields.Boolean(string="Invoice Pending", + compute='_compute_pending_invoice', + help="Is invoice Pending") + + @api.depends('service_line_ids', 'service_line_ids.state') + def _compute_pending_invoice(self): + """Computes the invoices""" + self.pending_invoice = any( + line.state == 'done' and not line.invoiced for line in + self.service_line_ids) + + @api.depends('service_line_ids', 'service_line_ids.amount') + def _compute_price_subtotal(self): + """ Computes price total """ + total = 0 + for items in self.service_line_ids: + total += items.amount + self.price_subtotal = total + + @api.model + def create(self, values): + """Create method for sequencing and checking dates while creating""" + if values['start_date'] >= values['end_date']: + raise UserError(_('Start date must be less than End date')) + name = f"%s-%s-%s" % ( + self.env['res.partner'].browse(values['partner_id'] + ).name, + self.env['event.management.type'].browse( + values['type_of_event_id']).name, values['date']) + values['name'] = name + values['ref'] = self.env['ir.sequence'].next_by_code( + 'event.order.sequence') + return super(EventManagement, self).create(values) + + def action_event_confirm(self): + """Button action to confirm""" + self.state = "confirm" + + def action_event_cancel(self): + """Button action to cancel""" + self.state = "cancel" + + def action_event_close(self): + """Button action to close""" + pending = 0 + for lines in self.service_line_ids: + if lines.invoiced is False: + pending = 1 + if pending == 1: + raise ValidationError(_('You can close an event only when all ' + 'services is Done and Invoiced')) + self.state = "close" + + def action_view_invoice_event(self): + """Button action to View the related invoice""" + invoices = self.mapped('invoice_ids') + action = self.env.ref('account.action_move_out_invoice_type' + ).sudo().read()[0] + if len(invoices) > 1: + action['domain'] = [('id', 'in', invoices.ids)] + elif len(invoices) == 1: + action['views'] = [ + (self.env.ref('account.view_move_form').id, 'form')] + action['res_id'] = invoices.ids[0] + else: + action = {'type': 'ir.actions.act_window_close'} + return action + + def action_event_invoice_create(self): + """Button action to create related invoice""" + product_line = [] + payment_list = [] + for line in self.service_line_ids: + if line.invoiced is False and line.state == "done": + product_line.append({'product_id': line.related_product_id, + 'price_unit': line.amount}) + line.invoiced = True + if len(product_line) > 0: + partner = self.partner_id + for records in product_line: + product_id = records['product_id'] + if product_id.property_account_income_id.id: + income_account = product_id.property_account_income_id.id + elif product_id.categ_id.property_account_income_categ_id.id: + income_account = product_id.categ_id. \ + property_account_income_categ_id.id + else: + raise UserError( + _('Please define income account for' + ' this product: "%s" (id:%d).') % ( + product_id.name, product_id.id)) + inv_line_data = { + 'name': self.name, + 'account_id': income_account, + 'price_unit': records['price_unit'], + 'quantity': 1, + 'product_id': product_id.id, + 'product_uom_id': product_id.uom_id.id, + } + payment_list.append((0, 0, inv_line_data)) + inv_data = { + 'move_type': 'out_invoice', + 'ref': self.name, + 'bank_partner_id': partner.property_account_payable_id.id, + 'partner_id': partner.id, + 'payment_reference': self.name, + 'company_id': self.env.user.company_id.id, + 'invoice_line_ids': payment_list, + } + inv_id = self.env['account.move'].create(inv_data) + result = { + 'view_type': 'form', + 'res_model': 'account.move', + 'res_id': inv_id.id, + 'view_id': False, + 'view_mode': 'form', + 'type': 'ir.actions.act_window' + } + self.state = "invoice" + all_invoice_ids = self.invoice_ids.ids + all_invoice_ids.append(inv_id.id) + self.update({'invoice_ids': all_invoice_ids, + 'invoice_count': self.invoice_count + 1}) + return result diff --git a/event_management/models/event_management_type.py b/event_management/models/event_management_type.py new file mode 100755 index 000000000..7664a09f9 --- /dev/null +++ b/event_management/models/event_management_type.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from ast import literal_eval +from odoo import fields, models + + +class EventManagementType(models.Model): + """Model for managing the Event types""" + _name = 'event.management.type' + _description = 'Event Management Type' + + name = fields.Char(string="Name", help="Name of event type") + image = fields.Binary(string="Image", attachment=True, + help="This field holds the image used as " + "image for the event, limited to 1080x720px.") + event_count = fields.Integer(string="# of Events", + compute='_compute_event_count', + help="Count of event") + + def _compute_event_count(self): + """Computes the count of event """ + for records in self: + records.event_count = self.env['event.management'].search_count([ + ('type_of_event_id', '=', records.id)]) + + def _get_action(self, action_xml_id): + """ Passes the values to Event management kanban """ + action = self.env['ir.actions.actions']._for_xml_id(action_xml_id) + if self: + action['display_name'] = self.display_name + context = { + 'search_default_type_of_event_id': [self.id], + 'default_type_of_event_id': self.id, + } + context = {**literal_eval(action['context']), **context} + action['context'] = context + return action + + def get_event_type_action_event(self): + """Event type action """ + return self._get_action('event_management.event_management_action') diff --git a/event_management/models/event_service_line.py b/event_management/models/event_service_line.py new file mode 100755 index 000000000..9b1f80e29 --- /dev/null +++ b/event_management/models/event_service_line.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class EventServiceLine(models.Model): + """Model to manage the service lines of the event management""" + _name = 'event.service.line' + _description = 'Event Service Line' + + service = fields.Selection([('', '')], string="Services", + required=True, help="Name of service") + event_id = fields.Many2one('event.management', string="Event", + help="Name of the events") + date_from = fields.Datetime(string="Date from", required=True, + help="Start date of service") + date_to = fields.Datetime(string="Date to", required=True, + help="End date of the service") + amount = fields.Float(string="Amount", readonly=True, help="Total amount " + "of a service") + state = fields.Selection([('done', 'Done'), ('pending', 'Pending')], + string="State", default="pending", + readonly=True, help="Stages of the events") + currency_id = fields.Many2one('res.currency', readonly=True, + default=lambda self: + self.env.user.company_id.currency_id, + help="Currency of current company", + string="Currency") + invoiced = fields.Boolean(string="Invoiced", readonly=True, + help="Is this service invoiced") + related_product_id = fields.Many2one('product.product', + string="Related Product", + help="List of related Products") + _sql_constraints = [('event_supplier_unique', 'unique(event_id, service)', + 'Duplication Of Service In The Service Lines ' + 'Is not Allowed')] + + @api.constrains('date_from', 'date_to') + def _check_date_to_date_from(self): + """ Checking is end date less than start date""" + for rec in self: + if rec.date_to < rec.date_from: + raise ValidationError(_("Date to cannot be set before " + "`Date from` Check the 'Date from' and " + "'Date to' of the '%s' service" + % rec.service)) diff --git a/event_management/report/__init__.py b/event_management/report/__init__.py new file mode 100755 index 000000000..27ebc8a1d --- /dev/null +++ b/event_management/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: MOHAMMED DILSHAD TK (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +from . import event_management_report diff --git a/event_management/report/event_management_report.py b/event_management/report/event_management_report.py new file mode 100755 index 000000000..d7647a792 --- /dev/null +++ b/event_management/report/event_management_report.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class ReportHotelManagement(models.AbstractModel): + """Class for fetch and carry off pdf data to template""" + _name = "report.event_management.report_event_management" + _description = "Event Management Report" + + @api.model + def _get_report_values(self, docids, data=None): + """ Gets report values """ + form_data = data['form'] + where = '1=1' + if form_data['date_from'] and form_data['date_to'] \ + and form_data['date_from'] > form_data['date_to']: + raise ValidationError(_('From Date must be less than To Date')) + if form_data["partner_id"]: + where += f"""AND e.partner_id = '{form_data['partner_id'][0]}'""" + if form_data['date_from']: + where += f"""AND e.date>='{form_data['date_from']}'""" + if form_data['date_to']: + where += f"""AND e.date <= '{form_data['date_to']}'""" + if form_data['type_event_ids']: + event_list = data['event_types'] + event_ids = f"({event_list[0]})" if len(event_list) == 1 else tuple( + event_list) + where += f"""AND e.type_of_event_id IN {event_ids}""" + if form_data['event_state']: + where += f"""AND e.state = '{form_data['event_state']}'""" + self.env.cr.execute(f""" + SELECT e.name as event, t.name as type, r.name as partner, + e.state, e.date, + e.start_date, e.end_date + from event_management e inner join + res_partner r on e.partner_id = r.id + inner join event_management_type t on + e.type_of_event_id = t.id + where {where} order by e.date""") + return { + 'docs': self.env.cr.dictfetchall(), + 'docs2': form_data, + 'today_date': fields.Datetime.now() + } diff --git a/event_management/report/event_management_reports.xml b/event_management/report/event_management_reports.xml new file mode 100755 index 000000000..cee9d463f --- /dev/null +++ b/event_management/report/event_management_reports.xml @@ -0,0 +1,11 @@ + + + + + Event Management Report + event.management + qweb-pdf + event_management.report_event_management + event_management.report_event_management + + diff --git a/event_management/report/event_management_templates.xml b/event_management/report/event_management_templates.xml new file mode 100755 index 000000000..4174df0a9 --- /dev/null +++ b/event_management/report/event_management_templates.xml @@ -0,0 +1,95 @@ + + + + + diff --git a/event_management/security/event_management_groups.xml b/event_management/security/event_management_groups.xml new file mode 100755 index 000000000..deb03041d --- /dev/null +++ b/event_management/security/event_management_groups.xml @@ -0,0 +1,17 @@ + + + + + Event Management + 19 + + + + Event Manager + + + + diff --git a/event_management/security/event_management_security.xml b/event_management/security/event_management_security.xml new file mode 100755 index 000000000..428752d70 --- /dev/null +++ b/event_management/security/event_management_security.xml @@ -0,0 +1,11 @@ + + + + + Event Manager see all Events + + [] + + + diff --git a/event_management/security/ir.model.access.csv b/event_management/security/ir.model.access.csv new file mode 100755 index 000000000..62e1c4776 --- /dev/null +++ b/event_management/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_event_management_event_manager,access.event.management.event_management,model_event_management,event_management.group_event_manager,1,1,1,1 +access_event_service_line_event_manager,access.event.service.line.event_manager,model_event_service_line,event_management.group_event_manager,1,1,1,1 +access_event_management_type_event_manager,access.event.management.type.event_manager,model_event_management_type,event_management.group_event_manager,1,1,1,1 +access_event_management_report_event_manager,access.event.management.report.event_manager,model_event_management_report,event_management.group_event_manager,1,1,1,1 diff --git a/event_management/static/description/assets/icons/check.png b/event_management/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/event_management/static/description/assets/icons/check.png differ diff --git a/event_management/static/description/assets/icons/chevron.png b/event_management/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/event_management/static/description/assets/icons/chevron.png differ diff --git a/event_management/static/description/assets/icons/cogs.png b/event_management/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/event_management/static/description/assets/icons/cogs.png differ diff --git a/event_management/static/description/assets/icons/consultation.png b/event_management/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/event_management/static/description/assets/icons/consultation.png differ diff --git a/event_management/static/description/assets/icons/ecom-black.png b/event_management/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/event_management/static/description/assets/icons/ecom-black.png differ diff --git a/event_management/static/description/assets/icons/education-black.png b/event_management/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/event_management/static/description/assets/icons/education-black.png differ diff --git a/event_management/static/description/assets/icons/hotel-black.png b/event_management/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/event_management/static/description/assets/icons/hotel-black.png differ diff --git a/event_management/static/description/assets/icons/license.png b/event_management/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/event_management/static/description/assets/icons/license.png differ diff --git a/event_management/static/description/assets/icons/lifebuoy.png b/event_management/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/event_management/static/description/assets/icons/lifebuoy.png differ diff --git a/event_management/static/description/assets/icons/manufacturing-black.png b/event_management/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/event_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/event_management/static/description/assets/icons/pos-black.png b/event_management/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/event_management/static/description/assets/icons/pos-black.png differ diff --git a/event_management/static/description/assets/icons/puzzle.png b/event_management/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/event_management/static/description/assets/icons/puzzle.png differ diff --git a/event_management/static/description/assets/icons/restaurant-black.png b/event_management/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/event_management/static/description/assets/icons/restaurant-black.png differ diff --git a/event_management/static/description/assets/icons/service-black.png b/event_management/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/event_management/static/description/assets/icons/service-black.png differ diff --git a/event_management/static/description/assets/icons/trading-black.png b/event_management/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/event_management/static/description/assets/icons/trading-black.png differ diff --git a/event_management/static/description/assets/icons/training.png b/event_management/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/event_management/static/description/assets/icons/training.png differ diff --git a/event_management/static/description/assets/icons/update.png b/event_management/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/event_management/static/description/assets/icons/update.png differ diff --git a/event_management/static/description/assets/icons/user.png b/event_management/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/event_management/static/description/assets/icons/user.png differ diff --git a/event_management/static/description/assets/icons/wrench.png b/event_management/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/event_management/static/description/assets/icons/wrench.png differ diff --git a/event_management/static/description/assets/misc/categories.png b/event_management/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/event_management/static/description/assets/misc/categories.png differ diff --git a/event_management/static/description/assets/misc/check-box.png b/event_management/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/event_management/static/description/assets/misc/check-box.png differ diff --git a/event_management/static/description/assets/misc/compass.png b/event_management/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/event_management/static/description/assets/misc/compass.png differ diff --git a/event_management/static/description/assets/misc/corporate.png b/event_management/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/event_management/static/description/assets/misc/corporate.png differ diff --git a/event_management/static/description/assets/misc/customer-support.png b/event_management/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/event_management/static/description/assets/misc/customer-support.png differ diff --git a/event_management/static/description/assets/misc/cybrosys-logo.png b/event_management/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/event_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/event_management/static/description/assets/misc/features.png b/event_management/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/event_management/static/description/assets/misc/features.png differ diff --git a/event_management/static/description/assets/misc/logo.png b/event_management/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/event_management/static/description/assets/misc/logo.png differ diff --git a/event_management/static/description/assets/misc/pictures.png b/event_management/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/event_management/static/description/assets/misc/pictures.png differ diff --git a/event_management/static/description/assets/misc/pie-chart.png b/event_management/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/event_management/static/description/assets/misc/pie-chart.png differ diff --git a/event_management/static/description/assets/misc/right-arrow.png b/event_management/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/event_management/static/description/assets/misc/right-arrow.png differ diff --git a/event_management/static/description/assets/misc/star.png b/event_management/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/event_management/static/description/assets/misc/star.png differ diff --git a/event_management/static/description/assets/misc/support.png b/event_management/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/event_management/static/description/assets/misc/support.png differ diff --git a/event_management/static/description/assets/misc/whatsapp.png b/event_management/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/event_management/static/description/assets/misc/whatsapp.png differ diff --git a/event_management/static/description/assets/modules/1.png b/event_management/static/description/assets/modules/1.png new file mode 100755 index 000000000..49e3b5934 Binary files /dev/null and b/event_management/static/description/assets/modules/1.png differ diff --git a/event_management/static/description/assets/modules/2.jpg b/event_management/static/description/assets/modules/2.jpg new file mode 100755 index 000000000..43123c0e2 Binary files /dev/null and b/event_management/static/description/assets/modules/2.jpg differ diff --git a/event_management/static/description/assets/modules/3.png b/event_management/static/description/assets/modules/3.png new file mode 100755 index 000000000..a428db2e1 Binary files /dev/null and b/event_management/static/description/assets/modules/3.png differ diff --git a/event_management/static/description/assets/modules/4.png b/event_management/static/description/assets/modules/4.png new file mode 100755 index 000000000..50a1ff4b8 Binary files /dev/null and b/event_management/static/description/assets/modules/4.png differ diff --git a/event_management/static/description/assets/modules/5.png b/event_management/static/description/assets/modules/5.png new file mode 100755 index 000000000..730fb36f4 Binary files /dev/null and b/event_management/static/description/assets/modules/5.png differ diff --git a/event_management/static/description/assets/modules/6.png b/event_management/static/description/assets/modules/6.png new file mode 100755 index 000000000..a0a3c01c6 Binary files /dev/null and b/event_management/static/description/assets/modules/6.png differ diff --git a/event_management/static/description/assets/screenshots/1.png b/event_management/static/description/assets/screenshots/1.png new file mode 100755 index 000000000..b4af43f28 Binary files /dev/null and b/event_management/static/description/assets/screenshots/1.png differ diff --git a/event_management/static/description/assets/screenshots/2.png b/event_management/static/description/assets/screenshots/2.png new file mode 100755 index 000000000..facbb7f85 Binary files /dev/null and b/event_management/static/description/assets/screenshots/2.png differ diff --git a/event_management/static/description/assets/screenshots/3.png b/event_management/static/description/assets/screenshots/3.png new file mode 100755 index 000000000..b9dfe9cf6 Binary files /dev/null and b/event_management/static/description/assets/screenshots/3.png differ diff --git a/event_management/static/description/assets/screenshots/4.png b/event_management/static/description/assets/screenshots/4.png new file mode 100755 index 000000000..11ed9628f Binary files /dev/null and b/event_management/static/description/assets/screenshots/4.png differ diff --git a/event_management/static/description/assets/screenshots/5.png b/event_management/static/description/assets/screenshots/5.png new file mode 100755 index 000000000..c55c43a09 Binary files /dev/null and b/event_management/static/description/assets/screenshots/5.png differ diff --git a/event_management/static/description/assets/screenshots/6.png b/event_management/static/description/assets/screenshots/6.png new file mode 100755 index 000000000..2c249ad4f Binary files /dev/null and b/event_management/static/description/assets/screenshots/6.png differ diff --git a/event_management/static/description/assets/screenshots/7.png b/event_management/static/description/assets/screenshots/7.png new file mode 100755 index 000000000..3357f9c31 Binary files /dev/null and b/event_management/static/description/assets/screenshots/7.png differ diff --git a/event_management/static/description/assets/screenshots/8.png b/event_management/static/description/assets/screenshots/8.png new file mode 100755 index 000000000..9431d45da Binary files /dev/null and b/event_management/static/description/assets/screenshots/8.png differ diff --git a/event_management/static/description/assets/screenshots/9.png b/event_management/static/description/assets/screenshots/9.png new file mode 100755 index 000000000..2515688a8 Binary files /dev/null and b/event_management/static/description/assets/screenshots/9.png differ diff --git a/event_management/static/description/assets/screenshots/hero.gif b/event_management/static/description/assets/screenshots/hero.gif new file mode 100755 index 000000000..3e8a58f8f Binary files /dev/null and b/event_management/static/description/assets/screenshots/hero.gif differ diff --git a/event_management/static/description/banner.png b/event_management/static/description/banner.png new file mode 100755 index 000000000..fef6e8d7c Binary files /dev/null and b/event_management/static/description/banner.png differ diff --git a/event_management/static/description/icon.png b/event_management/static/description/icon.png new file mode 100755 index 000000000..18c068724 Binary files /dev/null and b/event_management/static/description/icon.png differ diff --git a/event_management/static/description/index.html b/event_management/static/description/index.html new file mode 100755 index 000000000..4f3fecb5c --- /dev/null +++ b/event_management/static/description/index.html @@ -0,0 +1,758 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + +
+
+
+

+ Event Management +

+

+ A Module For Managing Different Kind Of Events +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Event management is a core module which can manage any type of events. + The user can selectively download and install different service modules + to extend the scope of this module. The new service will be + automatically + get attached to this core Event management module. It is different from + Odoo's event module. Here you can manage different types of events and + allocate services to different users. Note: Presently we have released + the service 'Event Catering' under this module. New services are being + developed by our team. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ +
+ + Event Order. + + + + Can create new Event management orders. + +
+
+
+ +
+ + Automatically service orders. + + + + Service orders are automatically created on confirming event orders. + +
+
+
+ +
+ + Integrated with Accounting Module. + + + + Can create and view invoices based on services. + +
+
+
+ +
+ + Informative Dashboard + + + Event type related order count is visible and can see the event order + related to each type on clicking the type from Dashboard. + +
+
+
+ +
+ + Event Types. + + + User can configure new Event types and can delete the old ones. + Can configure types from the Dashboard itself. + +
+
+
+ +
+ + Reports + + + Event Management Report in Pdf and Xlsx is available. + +
+
+ +
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Event Management Dashboard View +

+

+ Dashboard view with all the event types and related order counts +

+ +
+
+

+ Event order Kanban view +

+

+ Kanban view with Event type image and Event reference. +

+ +
+
+

+ Event order Tree view +

+

+ Several details including Customer, Start and End date, State + etc. +

+ +
+
+

+ Event order Form view +

+

+ In form view user can add the details of order and the services to be provided.The user only able to add services to service lines + only if service modules are downloaded(after install automatically add to order line). +

+ +
+
+

+ Event Management Report +

+

+ Can print pdf and xlsx report with several details including + Customer, Event type, + State and also based on Dates. +

+ +
+
+

+ Pdf Report +

+

+ Pdf report with the Event order details based on the details + from Report wizard. +

+ +
+
+

+ Excel Report +

+

+ Excel report with the Event order details based on the details + from Report wizard. +

+ +
+
+

+ Event Type Form view +

+

+ Configure different Event type with name and Image. +

+ +
+
+

+ Event Type Tree view +

+

+ Tree view of Event type. +

+ +
+ +
+
+ + + +
+
+

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

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/event_management/static/img/event_type_image1.jpg b/event_management/static/img/event_type_image1.jpg new file mode 100755 index 000000000..208cf6045 Binary files /dev/null and b/event_management/static/img/event_type_image1.jpg differ diff --git a/event_management/static/img/event_type_image2.jpeg b/event_management/static/img/event_type_image2.jpeg new file mode 100755 index 000000000..c74b7c25f Binary files /dev/null and b/event_management/static/img/event_type_image2.jpeg differ diff --git a/event_management/static/img/event_type_image3.jpeg b/event_management/static/img/event_type_image3.jpeg new file mode 100755 index 000000000..c63d5de66 Binary files /dev/null and b/event_management/static/img/event_type_image3.jpeg differ diff --git a/event_management/static/img/event_type_image4.jpeg b/event_management/static/img/event_type_image4.jpeg new file mode 100755 index 000000000..e60d88943 Binary files /dev/null and b/event_management/static/img/event_type_image4.jpeg differ diff --git a/event_management/static/img/event_type_image5.jpeg b/event_management/static/img/event_type_image5.jpeg new file mode 100755 index 000000000..777a7eeba Binary files /dev/null and b/event_management/static/img/event_type_image5.jpeg differ diff --git a/event_management/static/img/event_type_image6.jpeg b/event_management/static/img/event_type_image6.jpeg new file mode 100755 index 000000000..686b70056 Binary files /dev/null and b/event_management/static/img/event_type_image6.jpeg differ diff --git a/event_management/static/img/event_type_image7.png b/event_management/static/img/event_type_image7.png new file mode 100755 index 000000000..7931ddc80 Binary files /dev/null and b/event_management/static/img/event_type_image7.png differ diff --git a/event_management/static/src/css/event_dashboard.css b/event_management/static/src/css/event_dashboard.css new file mode 100755 index 000000000..f7461404d --- /dev/null +++ b/event_management/static/src/css/event_dashboard.css @@ -0,0 +1,12 @@ +.style_event { + text-align: center; + flex: none !important; + background: none !important; + box-shadow: none !important; +} +.style_event_type { + text-align: center; + flex: none !important; + background: none !important; + box-shadow: none !important; +} diff --git a/event_management/static/src/js/action_manager.js b/event_management/static/src/js/action_manager.js new file mode 100755 index 000000000..f801a529d --- /dev/null +++ b/event_management/static/src/js/action_manager.js @@ -0,0 +1,30 @@ +odoo.define('event_management.action_manager', function (require) { +"use strict"; +/** + * The purpose of this file is to add the actions of type + * 'ir_actions_xlsx_download' to the ActionManager. + */ +var ActionManager = require('web.ActionManager'); +var framework = require('web.framework'); +var session = require('web.session'); +ActionManager.include({ _executeXlsxReportDownloadAction: function (action) { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + }, + _handleAction: function (action, options) { + if (action.report_type === 'xlsx') { + return this._executeXlsxReportDownloadAction(action, options); + } + return this._super.apply(this, arguments); + +}, + }); +}); diff --git a/event_management/views/assets.xml b/event_management/views/assets.xml new file mode 100755 index 000000000..c10fef816 --- /dev/null +++ b/event_management/views/assets.xml @@ -0,0 +1,11 @@ + + + +