创建模块
python odoo-bin scaffold 模块名称 模块目录名称(即模块放到哪个文件夹下)
https://blog.csdn.net/m0_54852350/article/details/123592113
__manifest__.py内容解释
# -*- coding: utf-8 -*-
{
# 对应模块的名称,注意要小写
'name': "test",
# 关键词
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",
# 描述
'description': """
Long description of module's purpose
""",
# 作者
'author': "My Company",
# 网站
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list
# 类别
'category': 'Uncategorized',
# 版本号
'version': '0.1',
# any module necessary for this one to work correctly
# 本模块所依赖的模块,安装本模块会同时安装依赖的模块
'depends': ['base'],
# always loaded
# 加载的处理文件,总是加载
'data': [
# 'security/ir.model.access.csv',
'views/views.xml',
'views/templates.xml',
],
# only loaded in demonstration mode
# 只加载演示模块
'demo': [
'demo/demo.xml',
],
# 注意,新创建的应用里面没有如下配置,我们可以加上
# 是否是应用程序 :bool型数据,用于说明该模块是否为应用程序 这里设置为True,即可在应用中看到该模块
'application': True,
}