Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6012 Widoki

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)

Awatar
Odrzuć
Najlepsza odpowiedź

Try like this:

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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



Awatar
Odrzuć