Odoo中文网|Odoo实施培训
标题:
model的含义
[打印本页]
作者:
磨叽什么
时间:
2019-1-2 15:48
标题:
model的含义
_auto = False 是否在后台创建数据表
_register = False
_abstract = True 是否是抽象模型
_transient = False 是否是临时模型
_name = None 模型名称
_description = None 模型描述
_custom = False 是否自定义模型
_inherit = None 被继承的模型名称
_inherits = {} 继承关系
_table = None 模型对应的数据表的名称,默认值是_name的值中将.转换成_
_sql_constraints = [] SQL约束
_rec_name = None 在其他模型中引用此模型时显示的字段,默认是name
_order = 'id' 记录排序
_parent_name = 'parent_id' 关联父级记录的字段
_parent_store = False 值为True时会计算parent_left和parent_right
_parent_order = False 父级记录排序字段
欢迎光临 Odoo中文网|Odoo实施培训 (http://www.chinaodoo.net/)
Powered by Discuz! X3.2