class BaseModel(object):
""" Base class for OpenERP models. OpenERP models are created by inheriting from this class' subclasses: * :class:`Model` for regular database-persisted models 常用数据库模型 * :class:`TransientModel` for temporary data, stored in the database but
automatically vacuumed every so often 临时模型 * :class:`AbstractModel` for abstract super classes meant to be shared by
multiple inheriting model 抽象模型 不保存 The system automatically instantiates every model once per database. Those
instances represent the available models on each database, and depend on
which modules are installed on that database. The actual class of each
instance is built from the Python classes that create and inherit from the
corresponding model. Every model instance is a "recordset", i.e., an ordered collection of
records of the model. Recordsets are returned by methods like
:meth:`~.browse`, :meth:`~.search`, or field accesses. Records have no
explicit representation: a record is represented as a recordset of one
record. To create a class that should not be instantiated, the _register class
attribute may be set to False.
"""
__metaclass__ = MetaModel
_auto = True # create database backend
_register = False # Set to false if the model shouldn't be automatically discovered.
_name = None
_columns = {}
_constraints = []
_custom = False
_defaults = {}
_rec_name = None
_parent_name = 'parent_id'
_parent_store = False
_parent_order = False
_date_name = 'date'
_order = 'id'
_sequence = None
_description = None
_needaction = False
_translate = True # set to False to disable translations export for this model # dict of {field:method}, with method returning the (name_get of records, {id: fold})
# to include in the _read_group, if grouped on this field
_group_by_full = {} # Transience
_transient = False # True in a TransientModel # structure:
# { 'parent_model': 'm2o_field', ... }
_inherits = {} # Mapping from inherits'd field name to triple (m, r, f, n) where m is the
# model from which it is inherits'd, r is the (local) field towards m, f
# is the _column object itself, and n is the original (i.e. top-most)
# parent model.
# Example:
# { 'field_name': ('parent_model', 'm2o_field_to_reach_parent',
# field_column_obj, origina_parent_model), ... }
_inherit_fields = {} _table = None
_log_create = False
_sql_constraints = [] # model dependencies, for models backed up by sql views:
# {model_name: field_names, ...}
_depends = {} CONCURRENCY_CHECK_FIELD = '__last_update'

最新文章

  1. #英文#品读中国城市个性——上海人的精明&头啖汤
  2. JAVA常见面试题之Forward和Redirect的区别
  3. jQuery对表格的操作及其他应用
  4. 学习Find函数和select
  5. HDU 5773 The All-purpose Zero 求LIS
  6. ed编辑器使用
  7. 解决Unable to resolve superclass的问题
  8. Google Code Pretiffy 代码 着色 高亮 开源 javascript(JS)库
  9. 用C++ 设计一个不能被继承的类
  10. (转)AspNetPager查询分页问题(点击页码,不再是查询后的数据集)viewstate解决
  11. vs2012 boost配置
  12. LINUX下使用crontab进行RMAN备份实验
  13. 搭建Linux3.4.2内核编辑环境
  14. android 焦点问题
  15. 排序算法(二)Sort with Swap(0,*)
  16. java开发中中文编码问题
  17. windows 64位环境下php执行环境部署配置
  18. ubuntu 12.04启用休眠
  19. OSX11.12安装任何来源的软件,在终端中输入
  20. 学习笔记之HTML 教程 | 菜鸟教程

热门文章

  1. Linux 指令查询帮助
  2. php数组的快速排序
  3. [JZOJ 5778] 没有硝烟的战争
  4. 进程通信类型 管道是Linux支持的最初Unix IPC形式之一
  5. 关于Unity中的物理
  6. 20.multi_case01
  7. 零基础入门学习python--第二章 用Python设计第一个游戏
  8. [NOIP2019模拟赛]HC1147 时空阵
  9. 洛谷P4514 上帝造题的七分钟
  10. WPF 多语言