0

我只想要 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
4

0 回答 0