Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3493 Представления

Hi everybody !

I would like to change the sort of my partner list. I created a new field named "x_nom". How can I define that partner must be sort by this field ?

Many thanks in advance.

JMB

Аватар
Отменить
Лучший ответ

Go to you inherit class and type:

class res_partner(osv.osv):

  _inherit = "res.partner"
  _order = "x_nom asc"

res_partner()

If you want invert the x_nom order you can use desc (descendent) insted asc (ascendent)

_order = "x_nom desc"
Аватар
Отменить
Автор

Thanks !!! It works perfectly :-)

If the answer is the correct one, please set it as correct with the check near the answer. Thanks