Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3333 Näkymät

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 23
6119
1
heinäk. 20
4887
3
tammik. 20
12577
0
jouluk. 23
7940
0
maalisk. 15
3819