How to order legal types by id with name_search() method?
I tried _order='id' but it doesn't work, it works only with _order='id desc', but I want to order ascendent by id... Can someone know how to implement name_search() method here?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How to order legal types by id with name_search() method?
I tried _order='id' but it doesn't work, it works only with _order='id desc', but I want to order ascendent by id... Can someone know how to implement name_search() method here?
How about 'id asc'?
def _name_search(self, name='', args=None, operator='ilike', limit=100, name_get_uid=None):
result_ids = self._search([], order='id asc', limit=limit, access_rights_uid=name_get_uid)
return self.browse(result_ids).name_get()
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
0
heinäk. 17
|
4183 | ||
|
2
syysk. 15
|
8725 | ||
|
1
heinäk. 15
|
6274 | ||
|
2
tammik. 25
|
8362 | ||
why can't i find my model "id" ?
Ratkaistu
|
|
1
huhtik. 23
|
3483 |