Skip to Content
Menu
This question has been flagged
3811 Rodiniai

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
rugs. 23
6578
1
liep. 20
5308
3
saus. 20
13119
0
gruod. 23
8448
0
kov. 15
4155