Help

4

How to define the category in my developed module?

Avatar
Yannick Vaucher

Questions about the category option in __openerp__.py are:

What is the list of valid category names?

Why should I put a specific category in my module?

Can I put multiple categories?

Avatar
Discard
2 Answers
7
Avatar
Daniel Reis
Best Answer

The module category list is loaded from the file server/openerp/addons/base/module/module_data.xml.

You can also see it querying the ir_module_category Postgres table. This is what I found:

seq name
=== ================================
1   Customer Relationship Management
2   Sales Management
3   Project Management
4   Knowledge Management
5   Warehouse Management
6   Manufacturing
7   Invoicing & Payments
8   Accounting & Finance
9   Purchase Management
10  Human Resources
11  Extra Tools
12  Marketing
13  Point of Sale
14  Advanced Reporting

And since the category_id is a many2one field, no, you can't have more than one category for a module. Choose the most representative one (under which top menu will most of the menu options be?).

3 Comments
Avatar
Discard
Avatar
Camptocamp SA
-

Daniel, Your answer is good, about where to find the list of category. However, you will find many modules, even in example that are registered in their __openerp__.py with multiple category. eg. any localization module.

'category': 'Localization/Account Charts'

Avatar
Camptocamp SA
-

For v6.1 those modules are tagged in multiple categories to be available on apps.openerp.com on multiple tags.

Avatar
Guewen Baconnier
-

When you use a category which does not exist in your addon's manifest, it will be added in ir_module_category.

The module category could also be used for creating 'applications' (with security groups linked to the category). It can be interesting to approach this point.

2
Avatar
Yannick Vaucher
Best Answer

Just for curiosity, here is the number of official module per category in addons.

  5                                  
 15  Accounting & Finance            
  1  Association                     
  2  Authentication                  
  7  Customer Relationship Management
  2  Generic Modules/Accounting      
 17  Hidden                          
 14  Hidden/Dependency               
 11  Human Resources                 
  4  Knowledge Management            
  4  Localization                    
 39  Localization/Account Charts     
  1  Localization/Payroll            
  1  Managing vehicles and contracts 
  6  Manufacturing                   
  4  Marketing                       
  1  Point Of Sale                   
  1  Portal                          
  9  Project Management              
  5  Purchase Management             
  2  Reporting                       
 13  Sales Management                
  1  Social Network                  
  2  Specific Industry Applications  
 34  Tools                           
  1  Uncategorized                   
  4  Warehouse Management

We can see some other category not listed in server/openerp/addons/base/module/module_data.xml

Here is the little command I did to get that information grep -rni category */__openerp__.py | cut -d":" -f4 | cut -d"," -f1 | tr -d "[',\"]" | sort | uniq -c

Avatar
Discard