Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3666 Zobrazení

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...]

Avatar
Zrušit
Nejlepší odpověď

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'

 

Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
bře 20
3603
1
bře 15
4100
1
lis 22
2238
1
lis 19
2598
2
čvc 18
3461