def test_yadisk_connection(self, cr, uid, ids, context=None):

        res = {}

        context = dict(context or {})

        yadisk_obj = self.pool.get('yadisk.odoo.connector')
        yadisk_data = yadisk_obj.browse(cr, uid, ids, context=context)

        ya_username = yadisk_data.yadisk_user
        ya_passwd = yadisk_data.yadisk_pass

        disk = YaDisk(ya_username, ya_passwd)

        #_logger.warning("Yandex Disk: %s", disk )

        try:
            result = disk.df()

        except Exception, e:
             error = tools.ustr(e)
             result = False
Exemple #2
0
    def test_yadisk_connection(self, cr, uid, ids, context=None):

        res = {}

        context = dict(context or {})

        yadisk_obj = self.pool.get('yadisk.odoo.connector')
        yadisk_data = yadisk_obj.browse(cr, uid, ids, context=context)

        ya_username = yadisk_data.yadisk_user
        ya_passwd = yadisk_data.yadisk_pass

        disk = YaDisk(ya_username, ya_passwd)

        #_logger.warning("Yandex Disk: %s", disk )

        try:
            result = disk.df()

        except Exception, e:
            error = tools.ustr(e)
            result = False