@ -0,0 +1,64 @@ |
|||
.. 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 |
|||
|
|||
Event Management and Catering |
|||
================ |
|||
This module provides a comprehensive Event Management system—distinct from |
|||
Odoo’s default event module—that allows users to manage various types of |
|||
events and assign services to different users. It includes built-in support |
|||
for catering, enabling organizers to handle catering needs directly within |
|||
the event workflow. The module is designed to be extensible, allowing |
|||
additional services to be integrated seamlessly in the future. With the |
|||
Catering service now embedded, users can manage all aspects of event planning, |
|||
including service allocation, from a single, unified interface. |
|||
|
|||
|
|||
Features |
|||
======== |
|||
* Event order creation. |
|||
* Automatically creates service orders. |
|||
* Allocate the services to different users. |
|||
* Integrated with Accounting module. |
|||
* Simple Workflow. |
|||
* Attractive Design. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed |
|||
|
|||
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: (V18) Muhammed Rishad , |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there |
|||
if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import controllers |
|||
from . import models |
|||
from . import reports |
|||
from . import wizard |
@ -0,0 +1,60 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Event Management and Catering', |
|||
'version': '18.0.1.0.0', |
|||
"category": "Industries", |
|||
'summary': """Comprehensive event management with integrated catering |
|||
service.""", |
|||
'description': """This module combines event management and catering |
|||
services, allowing you to manage event types, service orders, and |
|||
invoicing efficiently—all from a single interface in Odoo.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['product', 'account'], |
|||
'data': [ |
|||
'security/security_group.xml', |
|||
'security/ir.model.access.csv', |
|||
'security/security_rule.xml', |
|||
'data/event_management_data.xml', |
|||
'data/ir_sequence_data.xml', |
|||
'reports/event_management_report_templates.xml', |
|||
'reports/event_management_report.xml', |
|||
'views/event_management_views.xml', |
|||
'views/event_management_type_views.xml', |
|||
'views/event_management_catering_views.xml', |
|||
'wizard/event_management_report_view.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'event_management/static/src/css/dashboard.css', |
|||
'event_management/static/src/js/action_manager.js', |
|||
], |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': True, |
|||
} |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import event_management |
@ -0,0 +1,54 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
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('/event_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))) |
@ -0,0 +1,42 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<record id="event_management_type_wedding" model="event.management.type"> |
|||
<field name="name">Wedding</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image1.jpg"/> |
|||
</record> |
|||
<record id="event_management_type_birthday" model="event.management.type"> |
|||
<field name="name">Birthday</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image2.jpeg"/> |
|||
</record> |
|||
<record id="event_management_type_family_events" model="event.management.type"> |
|||
<field name="name">Family Events</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image3.jpeg"/> |
|||
</record> |
|||
<record id="event_management_type_press_conference" model="event.management.type"> |
|||
<field name="name">Press Conference</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image4.jpeg"/> |
|||
</record> |
|||
<record id="event_management_type_seminars" model="event.management.type"> |
|||
<field name="name">Seminars</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image5.jpeg"/> |
|||
</record> |
|||
<record id="event_management_type_conferences" model="event.management.type"> |
|||
<field name="name">Conferences</field> |
|||
<field name="image" type="base64" |
|||
file="event_management/static/img/event_type_image6.jpeg"/> |
|||
</record> |
|||
<!-- Catering Service Product --> |
|||
<record id="catering_service_product" model="product.product"> |
|||
<field name="name">Catering Service</field> |
|||
<field name="type">service</field> |
|||
<field name="image_1920" type="base64" |
|||
file="event_management/static/img/catering_product-image.jpeg"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data noupdate="True"> |
|||
<record id="sequence_event_order" model="ir.sequence"> |
|||
<field name="name">Event Order</field> |
|||
<field name="code">event.order.sequence</field> |
|||
<field name="suffix">%(day)s/%(month)s/%(year)s</field> |
|||
<field name="prefix">EVE-</field> |
|||
<field name="number_increment">1</field> |
|||
<field name="padding">2</field> |
|||
</record> |
|||
<!-- Sequence number for catering service --> |
|||
<record id="sequence_catering_order" model="ir.sequence"> |
|||
<field name="name">Catering Service</field> |
|||
<field name="code">catering.order.sequence</field> |
|||
<field name="suffix">%(day)s/%(month)s/%(year)s</field> |
|||
<field name="prefix">CAT-</field> |
|||
<field name="number_increment">1</field> |
|||
<field name="padding">2</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,7 @@ |
|||
## Module <event_management> |
|||
|
|||
#### 31.05.2025 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
|
|||
- Initial commit for Event Management and Catering |
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import event_catering_work |
|||
from . import event_management |
|||
from . import event_management_catering |
|||
from . import event_management_type |
|||
from . import event_service_line |
@ -0,0 +1,70 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class EventCateringWork(models.Model): |
|||
""" |
|||
This class is for creating catering works. |
|||
it contains fields and functions for the model. |
|||
Methods: |
|||
_onchange_service_id(self): |
|||
calculate value of amount field when change the service_id |
|||
_compute_sub_total(self): |
|||
computes sub_total field |
|||
""" |
|||
_name = 'event.catering.work' |
|||
_description = "Event Catering Work" |
|||
|
|||
service_id = fields.Many2one('product.product', |
|||
string="Services", |
|||
required=True, help="Choose the services") |
|||
quantity = fields.Float(string="Quantity", default=1, |
|||
help="How many quantity consumed") |
|||
amount = fields.Float(string="Amount", help="Amount per quantity") |
|||
sub_total = fields.Float(string="Sub Total", compute="_compute_sub_total", |
|||
readonly=True, help="Shows subtotal") |
|||
currency_id = fields.Many2one('res.currency', |
|||
string='Currency', |
|||
default=lambda self: self.env.user.company_id |
|||
.currency_id.id, |
|||
required=True, help='Currency in which ' |
|||
'payments will be done') |
|||
catering_id = fields.Many2one('event.management.catering', |
|||
string="Catering Id", |
|||
help="Select the catering") |
|||
work_status = fields.Selection([('open', 'Open'), |
|||
('done', 'Done')], |
|||
string="Work Status", default='open', |
|||
help="Shows the current status of catering") |
|||
|
|||
@api.onchange('service_id') |
|||
def _onchange_service_id(self): |
|||
""" Function for calculate amount field when change |
|||
service_id field """ |
|||
self.amount = self.service_id.lst_price |
|||
|
|||
@api.depends('quantity', 'amount') |
|||
def _compute_sub_total(self): |
|||
""" Computes sub_total field when quantity or amount changes """ |
|||
for rec in self: |
|||
rec.sub_total = rec.quantity * rec.amount |
@ -0,0 +1,269 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models, _ |
|||
from odoo.exceptions import UserError, ValidationError |
|||
|
|||
|
|||
class EventManagement(models.Model): |
|||
"""Model for managing different event kind of events""" |
|||
_name = 'event.management' |
|||
_description = "Event Management" |
|||
|
|||
name = fields.Char(string='Name', readonly=True, copy=False, |
|||
help="Show combined name of the event") |
|||
reference = fields.Char(string='Reference', readonly=True, |
|||
help="Reference of the event") |
|||
type_of_event_id = fields.Many2one('event.management.type', |
|||
string="Type", |
|||
required=True, |
|||
help="Different types of events") |
|||
partner_id = fields.Many2one('res.partner', string="Customer", |
|||
required=True, |
|||
help="Select customers for the event.") |
|||
date = fields.Date(string="Date", default=fields.Date.today, required=True, |
|||
help="Date of event creating") |
|||
start_date = fields.Datetime(string="Start Date", |
|||
default=lambda self: fields.datetime.now(), |
|||
required=True, help="Start date of event") |
|||
end_date = fields.Datetime(string="End Date", required=True, |
|||
help="End date of the event") |
|||
service_line_ids = fields.One2many('event.service.line', |
|||
'event_id', |
|||
string="Services", help="Event services") |
|||
state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirmed'), |
|||
('invoice', 'Invoiced'), |
|||
('close', 'Close'), ('cancel', 'Canceled')], |
|||
string="State", default="draft", |
|||
help="States of the Event management record") |
|||
note = fields.Text(string='Terms and Conditions', help="Notes") |
|||
price_subtotal = fields.Float(string='Total', |
|||
compute='_compute_price_subtotal', |
|||
readonly=True, store=True, |
|||
help="Total price of services in service" |
|||
" lines") |
|||
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('res.currency', string='Currency', |
|||
readonly=True, |
|||
default=lambda self: |
|||
self.env.user.company_id.currency_id, |
|||
help="Default currency of company") |
|||
invoice_count = fields.Integer(string='Count of Invoices', |
|||
help="Count of total invoices for the event") |
|||
invoice_ids = fields.Many2many("account.move", |
|||
string='Invoices', copy=False, |
|||
help="Invoices created for each event") |
|||
pending_invoice = fields.Boolean(string="In Voice Pending", |
|||
compute='_compute_pending_invoice', |
|||
help="Does any pending invoice.") |
|||
company_id = fields.Many2one('res.company', string='Company', |
|||
default=lambda self: self.env.company.id) |
|||
catering_on = fields.Boolean(string="Catering Active", default=False, |
|||
help="Shows thw catering is active or not") |
|||
catering_id = fields.Many2one('event.management.catering', |
|||
string="Catering Id", |
|||
help="Corresponding catering in event") |
|||
catering_pending = fields.Integer(string='Catering Pending', |
|||
compute='_compute_catering_pending', |
|||
help="Shows count of catering " |
|||
"works are pending") |
|||
catering_done = fields.Integer(string='Catering Done', |
|||
compute='_compute_catering_done', |
|||
help="Shows how many catering works are " |
|||
"done") |
|||
|
|||
@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 = '%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 |
|||
sequence_number = self.env['ir.sequence'].next_by_code( |
|||
'event.order.sequence') |
|||
values['reference'] = sequence_number |
|||
res = super(EventManagement, self).create(values) |
|||
return res |
|||
|
|||
@api.depends('catering_id.catering_works_ids.work_status') |
|||
def _compute_catering_pending(self): |
|||
""" Computes catering_pending field """ |
|||
for record in self: |
|||
pending = sum( |
|||
1 for line in record.catering_id.catering_works_ids |
|||
if line.work_status == 'open' |
|||
) |
|||
record.catering_pending = pending |
|||
|
|||
@api.depends('catering_id.catering_works_ids.work_status') |
|||
def _compute_catering_done(self): |
|||
for record in self: |
|||
done_count = sum( |
|||
1 for line in record.catering_id.catering_works_ids |
|||
if line.work_status == 'done' |
|||
) |
|||
record.catering_done = done_count |
|||
|
|||
@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.depends('service_line_ids', 'service_line_ids.state') |
|||
def _compute_pending_invoice(self): |
|||
""" Computes pending invoices """ |
|||
pending = 0 |
|||
for lines in self.service_line_ids: |
|||
if lines.invoiced is False and lines.state == "done": |
|||
pending = 1 |
|||
self.pending_invoice = True if pending == 1 else False |
|||
|
|||
def action_event_confirm(self): |
|||
"""Button action to confirm. create catering service |
|||
when confirming event.""" |
|||
catering_line = self.service_line_ids.search([ |
|||
('service', '=', 'catering'), ('event_id', '=', self.id)]) |
|||
if len(catering_line) > 0: |
|||
self.catering_on = True |
|||
self.catering_id = self.env['event.management.catering'].create([{ |
|||
'name': self.env['ir.sequence'].next_by_code( |
|||
'catering.order.sequence'), |
|||
'start_date': catering_line.date_from, |
|||
'end_date': catering_line.date_to, |
|||
'parent_event_id': self.id, |
|||
'event_type_id': self.type_of_event_id.id, |
|||
'catering_id': catering_line.id, |
|||
}]).id |
|||
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')) |
|||
else: |
|||
self.state = "close" |
|||
|
|||
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 |
|||
return None |
|||
|
|||
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_view_catering_service(self): |
|||
""" |
|||
This function returns an action that display existing catering |
|||
service of the event. |
|||
""" |
|||
action = self.env.ref( |
|||
'event_management.event_management_catering_action'). \ |
|||
sudo().read()[0] |
|||
action['views'] = [(self.env.ref( |
|||
'event_management.event_management_catering_view_form').id, 'form')] |
|||
action['res_id'] = self.catering_id.id |
|||
if self.catering_id.id is not False: |
|||
return action |
|||
return False |
@ -0,0 +1,96 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models, _ |
|||
from odoo.exceptions import UserError |
|||
|
|||
|
|||
class EventManagementCatering(models.Model): |
|||
""" |
|||
This class is for creating catering services. |
|||
it contains fields and functions for the model. |
|||
Methods: |
|||
_compute_price_subtotal(self): |
|||
computes price_subtotal field |
|||
action_catering_done(self): |
|||
actions to perform when clicking on the 'Done' button. |
|||
""" |
|||
_name = 'event.management.catering' |
|||
_description = "Event Management Catering" |
|||
|
|||
name = fields.Char(string="Name", readonly=True, help="Name of caterings") |
|||
date = fields.Date(string="Date", default=fields.Date.today, readonly=True, |
|||
help="date of catering created") |
|||
start_date = fields.Datetime(string="Start date", readonly=True, |
|||
help="starting date of catering service") |
|||
end_date = fields.Datetime(string="End date", readonly=True, |
|||
help="end date of catering service") |
|||
catering_works_ids = fields.One2many('event.catering.work', |
|||
'catering_id', |
|||
string="Catering Works", |
|||
help="selected catering works") |
|||
state = fields.Selection([('open', 'Open'), ('done', 'Done')], |
|||
string="State", default="open", |
|||
help="Current state of event") |
|||
note = fields.Text(string="Terms and conditions", |
|||
help="Display terms and condition for this service") |
|||
price_subtotal = fields.Float(string='Total', |
|||
compute='_compute_price_subtotal', |
|||
readonly=True, store=True, |
|||
help="Shows the total price") |
|||
parent_event_id = fields.Many2one('event.management', |
|||
string="Event", |
|||
readonly=True, help="Parent event") |
|||
catering_id = fields.Integer(string="Catering Id", |
|||
help="Catering serial no") |
|||
currency_id = fields.Many2one('res.currency', readonly=True, |
|||
string="Currency", |
|||
default=lambda self: |
|||
self.env.user.company_id.currency_id, |
|||
help="Select currency") |
|||
event_type_id = fields.Many2one('event.management.type', |
|||
string="Event Type", readonly=True, |
|||
help="Select the type of event") |
|||
image = fields.Image(related="event_type_id.image") |
|||
|
|||
@api.depends('catering_works_ids.quantity', 'catering_works_ids.amount') |
|||
def _compute_price_subtotal(self): |
|||
""" Computes price_subtotal field """ |
|||
for record in self: |
|||
subtotal = sum( |
|||
line.quantity * line.amount for line in |
|||
record.catering_works_ids |
|||
) |
|||
record.price_subtotal = subtotal |
|||
|
|||
def action_catering_done(self): |
|||
""" Function for the 'Done' button to change the state to 'Done'. """ |
|||
for items in self.catering_works_ids: |
|||
if items.work_status == 'open': |
|||
raise UserError(_("Catering works are pending")) |
|||
for items in self.sudo().parent_event_id.service_line_ids: |
|||
if items.id == self.sudo().catering_id: |
|||
items.sudo().write({ |
|||
'amount': self.price_subtotal, |
|||
'state': 'done', |
|||
'related_product_id': self.env.ref( |
|||
'event_management.catering_service_product').id}) |
|||
self.state = "done" |
@ -0,0 +1,63 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
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 the 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="Count of Events", |
|||
compute='_compute_event_count', |
|||
help="Count of total events") |
|||
|
|||
def _compute_event_count(self): |
|||
""" Compute event count """ |
|||
for records in self: |
|||
events = self.env['event.management'].search_count([ |
|||
('type_of_event_id', '=', records.id)]) |
|||
records.event_count = events |
|||
|
|||
def _get_action(self, action_xml_id): |
|||
""" Pass 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, |
|||
} |
|||
action_context = literal_eval(action['context']) |
|||
context = {**action_context, **context} |
|||
action['context'] = context |
|||
return action |
|||
|
|||
def get_event_type_action_event(self): |
|||
"""Event management action """ |
|||
return self._get_action( |
|||
'event_management.event_management_action') |
@ -0,0 +1,70 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
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 Management Line" |
|||
|
|||
service = fields.Selection( |
|||
[('catering', 'Catering')], string="Services", required=True, |
|||
help="List of the service that automatically adds to selection while" |
|||
" install service modules", ondelete={'catering': 'cascade'}) |
|||
event_id = fields.Many2one('event.management', string="Event", |
|||
help="Name of the event") |
|||
date_from = fields.Datetime(string="Start Date", required=True, |
|||
help="Start date of service") |
|||
date_to = fields.Datetime(string="Date to", required=True, |
|||
help="End date of service") |
|||
amount = fields.Float(string="Amount", readonly=True, help="Amount") |
|||
state = fields.Selection([('done', 'Done'), ('pending', 'Pending')], |
|||
string="State", default="pending", |
|||
readonly=True, help="States of the each" |
|||
" service in service line") |
|||
currency_id = fields.Many2one('res.currency', string='Currency', |
|||
readonly=True, |
|||
default=lambda self: |
|||
self.env.user.company_id.currency_id, |
|||
help="Default currency of the company") |
|||
invoiced = fields.Boolean(string="Invoiced", readonly=True, |
|||
help="Is this service invoiced") |
|||
related_product_id = fields.Many2one('product.product', |
|||
string="Related Product", |
|||
help="Select the related service " |
|||
"product") |
|||
_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 if end date less than start date |
|||
if yes: Show a validation error""" |
|||
for rec in self: |
|||
if rec.date_to < rec.date_from: |
|||
raise ValidationError(_('"Date to" cannot be set before ' |
|||
'"Start Date".\n\n' |
|||
'Check the "Date from" and "Date to" ' |
|||
'of the "%s" service' % rec.service)) |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import report_event_management |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Event management report action --> |
|||
<record id="report_event_management_action" model="ir.actions.report"> |
|||
<field name="name">Event Management Report</field> |
|||
<field name="model">event.management</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">event_management.report_event_management</field> |
|||
<field name="report_file">event_management.report_event_management</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,97 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Pdf report template --> |
|||
<template id="report_event_management"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<h2> |
|||
<span> |
|||
<center>Event Report</center> |
|||
</span> |
|||
</h2> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<br/> |
|||
<div> |
|||
<span>Date:</span> |
|||
<span t-esc="today_date"/> |
|||
</div> |
|||
<br/> |
|||
<div> |
|||
<span t-if="docs2['date_from']"> |
|||
<b>From:</b> |
|||
<span style="margin-left:3px;margin-right:17px;margin-bottom:3px" |
|||
t-esc="docs2['date_from']"/> |
|||
</span> |
|||
<span t-if="docs2['date_to']"> |
|||
<b>To:</b> |
|||
<span style="margin-left:3px;margin-right:17px;margin-bottom:3px" |
|||
t-esc="docs2['date_to']"/> |
|||
</span> |
|||
<span t-if="docs2['partner_id']"> |
|||
<b>Customer:</b> |
|||
<span style="margin-left:3px;margin-bottom:3px" |
|||
t-esc="docs2['partner_id'][1]"/> |
|||
</span> |
|||
</div> |
|||
<br/> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<table class="table table-sm"> |
|||
<thead> |
|||
<tr style="text-align: center;"> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Sl.no</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Name</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Type</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Customer</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Register Date</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">Start Date</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">End Date</th> |
|||
<th style="border: solid 1px black; font-weight: bold;text-align: center;">State</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="docs" t-as="l"> |
|||
<tr style="text-align: center; font-size: 14px;"> |
|||
<td style="border: solid 1px black;"> |
|||
<t t-esc="l_index + 1"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['event']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['type']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['partner']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['date']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['start_date']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="l['end_date']"/> |
|||
</td> |
|||
<td style="border: solid 1px black;"> |
|||
<span t-esc="{'draft': 'Draft', 'confirm': 'Confirmed', 'cancel': 'Cancelled', 'invoice': 'Invoiced', 'close': 'Closed'} |
|||
[l['state']]"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div class="oe_structure"/> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,72 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Techno Solutions(<https://www.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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
import pytz |
|||
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): |
|||
""" Get values for the report""" |
|||
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 += """AND e.partner_id = '%s' """ % \ |
|||
(form_data['partner_id'][0]) |
|||
if form_data['date_from']: |
|||
where += """AND e.start_date >= '%s' """ % (form_data['date_from']) |
|||
if form_data['date_to']: |
|||
where += """AND e.end_date <= '%s' """ % (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 += """AND e.type_of_event_id IN {} """.format(event_ids) |
|||
if form_data['event_state']: |
|||
where += """AND e.state = '%s'""" % (form_data['event_state']) |
|||
self.env.cr.execute(""" |
|||
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 %s order by e.date""" % where) |
|||
rec = self.env.cr.dictfetchall() |
|||
return { |
|||
'docs': rec, |
|||
'docs2': form_data, |
|||
'today_date': fields.datetime.strftime( |
|||
pytz.UTC.localize(fields.datetime. |
|||
now()).astimezone(pytz.timezone(self.env. |
|||
user.tz)), |
|||
"%d-%m-%Y %H:%M:%S") |
|||
} |
|
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<!-- Category event management --> |
|||
<record id="event_management.module_category_event_management" |
|||
model="ir.module.category"> |
|||
<field name="name">Event Management</field> |
|||
<field name="sequence">19</field> |
|||
</record> |
|||
<!-- User Groups --> |
|||
<record id="group_event_catering_caterer" model="res.groups"> |
|||
<field name="name">Catering Manager</field> |
|||
<field name="category_id" |
|||
ref="event_management.module_category_event_management"/> |
|||
</record> |
|||
<record id="group_event_catering_manager" model="res.groups"> |
|||
<field name="name">Event Manager</field> |
|||
<field name="category_id" |
|||
ref="event_management.module_category_event_management"/> |
|||
<field name="users" |
|||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/> |
|||
<field name="implied_ids" |
|||
eval="[(4, ref('group_event_catering_caterer'))]"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,49 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<!-- Manager see all events rule --> |
|||
<record id="event_mngr_see_all_events" model="ir.rule"> |
|||
<field name="name">Event Manager see all Events</field> |
|||
<field name="model_id" |
|||
ref="event_management.model_event_management"/> |
|||
<field name="domain_force">[]</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('event_management.group_event_catering_manager'))]"/> |
|||
</record> |
|||
<!-- Multi company restricted rule for event records --> |
|||
<record id="event_management_rule_company" model="ir.rule"> |
|||
<field name="name">Event Management Rule Company</field> |
|||
<field name="model_id" ref="model_event_management"/> |
|||
<field name="domain_force"> |
|||
[('company_id', 'in', company_ids)] |
|||
</field> |
|||
</record> |
|||
<!-- Rule to show only the records of their own for Catering managers --> |
|||
<record id="event_catering_rule_own_event_manager" model="ir.rule"> |
|||
<field name="name">event.catering.rule.own.event.manager</field> |
|||
<field name="model_id" |
|||
ref="event_management.model_event_management"/> |
|||
<field name="domain_force">[('create_uid','=',user.id)]</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('event_management.group_event_catering_caterer'))]"/> |
|||
</record> |
|||
<!-- Rule to show only the records of their own for Catering managers --> |
|||
<record id="event_catering_rule_own_catering_manager" model="ir.rule"> |
|||
<field name="name">event.catering.rule.own.catering.manager</field> |
|||
<field name="model_id" |
|||
ref="event_management.model_event_management_catering"/> |
|||
<field name="domain_force">[('create_uid','=',user.id)]</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('event_management.group_event_catering_caterer'))]"/> |
|||
</record> |
|||
<!-- Rule to show only the records of their own for Event managers --> |
|||
<record id="event_catering_rule_all_catering_manager" model="ir.rule"> |
|||
<field name="name">event.catering.rule.all.catering.manager</field> |
|||
<field name="model_id" |
|||
ref="event_management.model_event_management_catering"/> |
|||
<field name="domain_force">[]</field> |
|||
<field name="groups" |
|||
eval="[(4, ref('event_management.group_event_catering_manager'))]"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1021 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 655 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 112 KiB |