1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/appointment_crm/controllers/calendar_view.py
2024-12-10 09:04:09 +07:00

16 lines
665 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.appointment.controllers.calendar_view import AppointmentCalendarView
from odoo.http import request
from odoo.osv.expression import AND
class AppointmentCrmCalendarView(AppointmentCalendarView):
def _get_staff_user_appointment_invite_domain(self, appointment_type):
domain = super()._get_staff_user_appointment_invite_domain(appointment_type)
if 'default_opportunity_id' in request.env.context:
domain = AND([domain, [('opportunity_id', '=', request.env.context['default_opportunity_id'])]])
return domain