Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
27942 Представления

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?

Аватар
Отменить
Автор Лучший ответ

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

Аватар
Отменить
Лучший ответ

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'

Автор

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.

Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
4
июл. 25
836
1
июл. 25
156
2
июл. 25
222
1
июл. 25
1402
2
июл. 25
232