磨叽什么 发表于 2018-11-15 10:16:38

odoo 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 父级记录排序字段

磨叽什么 发表于 2018-11-15 10:17:40

良心贴,赞一个:):):):):):):):):)
页: [1]
查看完整版本: odoo model 详解