Odoo Help


"Add Item" should be sorted by product description first not "Internal Reference", how do I change this?

Powrrr Play
on 12/11/13, 3:56 PM 1,329 views

When creating a new Sales Order, I am then clicking on "Add an Item". The product list default is sorted by "Internal Reference".

When I click on "Add an Item" I must have my product list sorted by Name (Description). People think of a name and description and can not think of product codes/internal reference. Same thing with "Create: Order Lines". I need to see this list sorted by Name (description) first, then product/internal reference.

How do I change this setting in openerp to make this my system wide default view when creating sales orders?

On 12/12/13, 3:09 AM

Sorting order defined in model definition in python file. For porduct.product model the definition are (look at product addons module on product.py

    _order = 'default_code,name_template'

To change the definition, you must create new module and create new product.py file and inherit the

class product_product

class product_product(osv.osv):
          _inherit = 'product.product'
          _order = 'name_template'

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 12/11/13, 3:56 PM
Seen: 1329 times
Last updated: 3/16/15, 8:10 AM