您的位置:首页 > 其它

odoo documentation

2015-07-28 09:55 281 查看
-->建立模型model

class MinimalModel(models.Model):
_name='test.model'


The most important attribute is _name which is required and defines the name forthe model in the Odoo system。

Model Fields(模型字段):

Fields are used to define what the model can store and where. Fields aredefined as attributes on the model class:

例:name=field.Char(requird=True)

注意:5个保留字段:

id
(
Id
)the unique identifier for a record in its model
create_date
(
Datetime
)creation date of the record
create_uid
(
Many2one
)user who created the record
write_date
(
Datetime
)last modification date of the record
write_uid
(
Many2one
)user who last modified the record
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: