Odoo中文网|Odoo实施培训

 找回密码
 立即注册
搜索
热搜: Odoo OpenERP 实施
查看: 8572|回复: 0

model的含义

[复制链接]

68

主题

96

帖子

456

积分

中级会员

Rank: 3Rank: 3

积分
456
发表于 2019-1-2 15:48:50 | 显示全部楼层 |阅读模式
  • _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 父级记录排序字段

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|技术支持|开发手册|Odoo中文网-远鼎旗下odoo培训网站 ( 苏ICP备15039516号 )

GMT+8, 2024-3-29 15:12 , Processed in 0.012612 second(s), 10 queries , Xcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表