'Return the dependencies of ``self`` as tuples ``(model, field, path)``,
where ``path`` is an optional list of field names.'

def resolve_deps(self, model):

    model0 = model
    result = []
    for dotnames in self.depends:
        if (dotnames == self.name):
            _logger.warning('Field    %s    depends    on    itself;    please    fix    its    decorator    @api.depends().', self)
        (model, path) = (model0, dotnames.split('.'))
        for (i, fname) in enumerate(path):
            field = model._fields[fname]
            result.append((model, field, path[:i]))
            model = model0.env.get(field.comodel_name)
    for (mname, fnames) in model0._depends.iteritems():
        model = model0.env[mname]
        for fname in fnames:
            field = model._fields[fname]
            result.append((model, field, None))
    for (model, field, path) in list(result):
        for inv_field in model._field_inverses[field]:
            inv_model = model0.env[inv_field.model_name]
            inv_path = (None if (path is None) else (path + [field.name]))
            result.append((inv_model, inv_field, inv_path))
    return result
