Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to change the order of partner list ?

By
Anne-Sylvie Burri
on 4/30/13, 12:05 PM 743 views

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

0

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/30/13, 12:15 PM

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 :-)

J.-M. Burri - Bureau ing.-conseils informatique, Anne-Sylvie Burri
on 5/2/13, 6:35 AM

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

Francesco OpenCode
on 5/2/13, 6:37 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/30/13, 12:05 PM
Seen: 743 times
Last updated: 3/16/15, 8:10 AM