(self)
return self.env.ref('mail.mail_activity_data_todo', raise_if_not_found=False) \
            or self.env['mail.activity.type'].search([('res_model', '=', self._name)], limit=1) \
            or self.env['mail.activity.type'].search([('res_model', '=', False)], limit=1)
Define a default fallback activity type when requested xml id wasn't found.

        Can be overriden to specify the default activity type of a model.
        It is only called in in activity_schedule() for now.
Define a default fallback activity type when requested xml id wasn't found.
Define a default fallback activity type when requested xml id wasn t found .
def _default_activity_type(self):
        """Define a default fallback activity type when requested xml id wasn't found.

        Can be overriden to specify the default activity type of a model.
        It is only called in in activity_schedule() for now.
        """
        return self.env.ref('mail.mail_activity_data_todo', raise_if_not_found=False) \
            or self.env['mail.activity.type'].search([('res_model', '=', self._name)], limit=1) \
            or self.env['mail.activity.type'].search([('res_model', '=', False)], limit=1)
def _default_activity_type ( self ) : return self . env . ref ( 'mail.mail_activity_data_todo' , raise_if_not_found = False ) or self . env [ 'mail.activity.type' ] . search ( [ ( 'res_model' , '=' , self . _name ) ] , limit = 1 ) or self . env [ 'mail.activity.type' ] . search ( [ ( 'res_model' , '=' , False ) ] , limit = 1 )