Skip to Content
Menu
This question has been flagged
3 Replies
27878 Views

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
Author 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
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?).

Avatar
Discard
Author

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'

Author

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

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.

Best Answer

Its an old question. Maybe helpful for new developers 
https://www.odoo.com/documentation/17.0/developer/reference/backend/module.html

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 25
232
2
Jul 25
946
4
Jul 25
794
1
Jul 25
111
2
Jul 25
231