字典更新序列元素#0的长度为10; 2是必需的

时间:2015-03-31 18:07:02

标签: python openerp-7 odoo openerp-8 odoo-8

我只想要来自res.users的sucursal,而且我不知道如何得到它。

def _user_sucursal(self, cr, uid, ids, field, arg, context = None):
    suc = self.pool.get('res.users')
    ids = suc.search (cr, uid, [])
    res = suc.read(cr, uid, ids, ['id'],['sucursal_u'], context)
    res = [(r['id'], r['sucursal']) for r in res] 
    return res

0 个答案:

没有答案