Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Partner phonecalls schedule

Entity: res.partner

Compute Method: _compute_phonecall_available

Inputs Method Outputs
"""Know if a partner is available to call right now."""
Attendance = self.env["resource.calendar.attendance"]
for one in self:
            domain = [
                ("calendar_id", "in", one.phonecall_calendar_ids.ids)
            ] + one._phonecall_available_domain()
            found = Attendance.search(domain, limit=1)
            one.phonecall_available = bool(found)

Back to entity