Skip to Content
Menú
This question has been flagged
3303 Vistes

def _sel_warehouse(self, cr, uid, context=None): obj = self.pool.get('stock.warehouse') ids = obj.search(cr, uid, []) res = obj.read(cr, uid, ids, ['id','name'], context) res = [(r['id'],r['name']) for r in res] return res

This is the closest code that I found but it lacks the flexibility of a sql query. Is there any other approach or do I have to add some line of code to get the desired output? Ex. query that I would like to use "select name from stock_location where usage = 'internal'".

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de set. 23
6091
1
de jul. 20
4853
3
de gen. 20
12552
0
de des. 23
7923
0
de març 15
3812