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.

3

How to define the category in my developed module?

By
Yannick Vaucher
on 2/14/13, 9:48 AM 3,631 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?

4

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 2/14/13, 10:34 AM

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

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'

Camptocamp SA
on 2/14/13, 10:55 AM

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

Camptocamp SA
on 2/14/13, 10:57 AM

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.

Camptocamp SA, Guewen Baconnier - Software Developer, Camptocamp
on 2/14/13, 11:28 AM
2

Yannick Vaucher

--Yannick Vaucher--
1699
| 5 7 9
Lausanne, Switzerland
--Yannick Vaucher--
Yannick Vaucher
On 2/14/13, 11:14 AM

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

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: 2/14/13, 9:48 AM
Seen: 3631 times
Last updated: 9/22/16, 5:18 AM