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

Module: Discuss

Entity: mail.activity

Compute Method: _compute_phone

Inputs Method Outputs
call_activities = self.filtered(
            lambda activity: activity.id
            and activity.res_model
            and activity.res_id
            and activity.activity_category == 'phonecall',
        )
(self - call_activities).phone = False
phone_numbers_by_activity = call_activities._get_phone_numbers_by_activity()
for activity in call_activities:
            activity.phone = phone_numbers_by_activity.get(activity, False)

Back to entity