odoo documentation
2015-07-28 09:55
281 查看
-->建立模型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个保留字段:
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
相关文章推荐
- 在编码时如何使用\r与\n,两者的区别
- simpleAdapter和 ListView的item的定义
- Spring MVC+Mybatis+Maven+Velocity+Mysql
- UVA 514 Rails(栈)
- 字符串训练------UVA 409题目 Excuses, Excuses!
- Android系统下载管理DownloadManager功能介绍及使用示例
- VS2013 编译程序时报无法加载PDB文件错误解决方案
- Android中的Selector的用法
- Android中的ClassLoader与dex文件加密实现分析
- 导入(批量增加)
- HDU-1232 畅通工程 (并查集、判断图中树的棵数)
- 装饰者设计模式
- 【算法学习】【图像增强】【Retinex】White Patch Retinex 程序解读
- 多重继承
- VB中API函数的调用
- 中国最早论坛聚合门户:大旗网突然关站
- 深入理解DIP、IoC、DI以及IoC容器
- 暑假- Trie树-(A - Shortest Prefixes)
- 利用Python编写linux自动备份脚本
- linux内核__get_free_page,kmalloc,vmalloc的区别,内核对内存的管理