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

Change department order in v7?

By
Sean Samborski
on 4/10/14, 2:10 AM 803 views

Is it possible to change the department order in v7? By default, it sorts according to creation (I assume by ID). That's really messy when you add departments at a later date that are children of other departments. I think it would be much easier to read and more efficient if the order was determined by the parent-child relationship. Ie, all children are directly displayed under their parent.

The only sort option I have is by company, and that doesn't seem accurate. For example, under company sort, children will often appear above the parent for some reason. Even if the children are created after the parent. Example:

Logistics / Development Logistics

Even more confusing is sometimes they're still broken up like:

Logistics / Development Sales Logistics

I can't find any kind of setting or filter to make default that will sort in any kind of logical manner.

 

[EDIT: Any update to this issue?]

 

[EDIT: Second request for an update???? 100 vies, one has to be OpenERP...]

1

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 8/2/14, 3:59 PM

You are correct - the default sort order is ID.

The default sort order of a module is part of the Python definition.  You would just write a new module that adds the _order clause as follows:

from openerp.osv import fields, osv

class hr_department(osv.osv):
    _inherit = 'hr.department'
    
    _order = 'name'

 

Thanks, Ray. I think the change in the forums kind of stopped updating me on some of my old questions.

Elephante, Sean Samborski
on 8/27/14, 1:26 PM

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

1 follower(s)

Stats

Asked: 4/10/14, 2:10 AM
Seen: 803 times
Last updated: 3/16/15, 8:10 AM