コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3394 ビュー

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'".

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 23
6168
1
7月 20
4920
3
1月 20
12625
0
12月 23
7987
0
3月 15
3840