'Return the actions of the given kinds for records\' model. The
returned actions\' context contain an object to manage processing.'

def _get_actions(self, records, kinds):

    if ('__action_done' not in self._context):
        self = self.with_context(__action_done={})
    domain = [('model', '=', records._name), ('kind', 'in', kinds)]
    actions = self.with_context(active_test=True).search(domain)
    return actions.with_env(self.env)
