Skip to Content
Menu
This question has been flagged
2 Replies
5616 Views

Dears:

my domain filter is ('id', 'in', [15331, 15332, 15386]) 

use self.env['mrp.production'].search(domain) 

result is  15386, 15331, 15332....this result is not mind ...how can i get my want result is [15331 15332 15386]

orders is show ===> 15386, 15331, 15332.

Production = self.env["mrp.production"]
domain = ["!", ("state", "in", ("done", "cancel")), ("id", "in", [15331, 15332, 15386])]
orders = Production.search(domain)

Avatar
Discard
Best Answer

Try like this:

orders = Production.search(domain, order='id asc, state desc')

Avatar
Discard
Author Best Answer

Dear Zbik

Thank your anser!!

But, i want fixed this id...when user input the order name ...(i get this order id is 152113 153321 150921 14992 162321)

if use order='id asc' 

the orders result ..is error....i need fixed it... orders = 152113 153321 150921 14992 162321



Avatar
Discard