id: bded1c85bef647b3a26614532808d4eb
parent_id: 
item_type: 1
item_id: c466f7d48f7c493b8ed588d196e66004
item_updated_time: 1764345576761
title_diff: "[{\"diffs\":[[1,\"OpenERP 模块开发\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":12}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>OpenERP 模块开发</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"application-data:2525275\\\" content=\\\"6692893/s30/578886c0-4694-4680-9331-1d0c80c6d391/app.yinxiang.com\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"13304\\\"></a>\\\r\\\n<h1>OpenERP 模块开发</h1>\\\r\\\n\\\r\\\n<div>\\\n<span style=\\\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\\\"><div style=\\\"box-sizing: border-box; font-family: sans-serif;\\\"><div style=\\\"box-sizing: border-box; font-variant: normal; line-height: 1.4; font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; color: rgb(51, 51, 51); word-wrap: break-word;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;\\\"><div style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box; overflow: hidden; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; line-height: 1.6; word-wrap: break-word; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;\\\"><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\">简介</h2><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">OpenERP 采用 <a href=\\\"http://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">三层架构</a>。 应用层本身被设计成核心和多个附加的模块，这些模块可以安装，不用OpenERP创建一个特殊的配置。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">OpenERP的核心和其他不同的模块都是用 <a href=\\\"http://python.org/\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">Python</a> 写的。 模块的功能通过XML-RPC（或是NET-RPC，这取决于服务器端的配置）显示出来。模块也采用OpenERP ORM在关系型数据库（PostgreSQL）中来持久化数据。当模块安装好后通过提供XML文件就可以在数据库中插入数据。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">尽管使用模块是构建一个复杂应用的简单方式，在OpenERP中模块同样可以扩展系统。事实上，模块也被称为addons（它们有时也被称为plugins）。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">在OpenERP的典型配置中，以下模块是必须的：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">base: 最基本的模块。它无论何种情况下都必须安装，被认为是OpenERP核心的一部分。定义了 <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>ir.property<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>res.company<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>res.request<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>res.currency<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>res.users<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, <tt style=\\\"box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0, 0, 0, 0.0392157);\\\"><span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span>res.partner<span style=\\\"font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;letter-spacing:-0.2em;\\\"> </span></tt>, 等等。</li><li style=\\\"box-sizing:border-box;\\\">crm: 客户关系管理和供应商关系管理。</li><li style=\\\"box-sizing:border-box;\\\">sale: 销售管理。</li><li style=\\\"box-sizing:border-box;\\\">mrp: 制造资源管理。</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">通过使用Python, XML files，依赖OpenERP的ORM和它的延伸机制，新的模块可以很容易快速的写出。OpenERP的开源特性和它众多的模块也为新模块的开发提供很多的例子。</p><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E6%A8%A1%E5%9D%97%E7%BB%93%E6%9E%84\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1;\\\"></a>模块结构</h2><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E6%A8%A1%E5%9D%97\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>模块</h3><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ol style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\"><p style=\\\"box-sizing:border-box;margin-top:16px;margin-bottom:16px;\\\">介绍</p></li><li style=\\\"box-sizing:border-box;\\\"><dl style=\\\"box-sizing:border-box;margin-top:0px;margin-bottom:16px;padding:0px;\\\"><dt style=\\\"box-sizing:border-box;padding:0px;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold;\\\">文件和文件夹结构</dt><dd style=\\\"box-sizing:border-box;margin-left:0px;padding:0px 16px;margin-bottom:16px;\\\"><ol style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;list-style-type:lower-roman;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\"><p style=\\\"box-sizing:border-box;margin-top:16px;margin-bottom:16px;\\\">__openerp__.py</p></li><li style=\\\"box-sizing:border-box;\\\"><p style=\\\"box-sizing:border-box;margin-top:16px;margin-bottom:16px;\\\">__init__.py</p></li><li style=\\\"box-sizing:border-box;\\\"><dl style=\\\"box-sizing:border-box;margin-top:0px;margin-bottom:16px;padding:0px;\\\"><dt style=\\\"box-sizing:border-box;padding:0px;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold;\\\">XML 文件</dt><dd style=\\\"box-sizing:border-box;margin-left:0px;padding:0px 16px;margin-bottom:16px;\\\"><ol style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;list-style-type:lower-alpha;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">操作</li><li style=\\\"box-sizing:border-box;\\\">菜单</li><li style=\\\"box-sizing:border-box;\\\">报表</li><li style=\\\"box-sizing:border-box;\\\">向导</li></ol></dd></dl></li></ol></dd></dl></li><li style=\\\"box-sizing:border-box;\\\"><p style=\\\"box-sizing:border-box;margin-top:16px;margin-bottom:16px;\\\">配置文件</p></li></ol></blockquote><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E6%A8%A1%E5%9D%97---%E6%96%87%E4%BB%B6%E5%92%8C%E6%96%87%E4%BB%B6%E5%A4%B9%E7%BB%93%E6%9E%84\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>模块 - 文件和文件夹结构</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">所有模块都应放到 server/addons 文件夹下。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">按下面步骤创建新模块：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing: border-box; padding: 0px 0px 0px 2em; margin-top: 0px; margin-bottom: 0px;\\\"><li style=\\\"background-color: rgb(255, 255, 255); box-sizing: border-box;\\\">在 server/addons 文件夹下面创建模块子文件夹</li><li style=\\\"background-color: rgb(255, 255, 255); box-sizing: border-box;\\\">创建模块定义文件: <strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">__openerp__.py</strong></li><li style=\\\"box-sizing: border-box;\\\"><span style=\\\"-evernote-highlight:true;background-color:rgb(255, 250, 165);\\\">创建定义 <strong style=\\\"box-sizing: border-box; font-weight: bold;\\\">objects</strong> 的 <strong style=\\\"box-sizing: border-box; font-weight: bold;\\\">Python</strong> 文件</span></li><li style=\\\"box-sizing: border-box;\\\"><span style=\\\"-evernote-highlight:true;background-color:rgb(255, 250, 165);\\\">创建包括(初始数据, 视图, 菜单, 演示数据)的 <strong style=\\\"box-sizing: border-box; font-weight: bold;\\\">.xml 文件</strong></span></li><li style=\\\"background-color: rgb(255, 255, 255); box-sizing: border-box;\\\">创建包含 <strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">reports</strong>, <strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">wizards</strong> 及 <strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">workflows</strong> 的 xml文件(可选)</li></ul></blockquote><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E6%A8%A1%E5%9D%97---%E6%96%87%E4%BB%B6%E5%92%8C%E7%9B%AE%E5%BD%95---xml-%E6%96%87%E4%BB%B6\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>模块 - 文件和目录 - XML 文件</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">模块目录里的XML文件用于修改数据库结构，他们有很多的用途，我们可以列出来：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">初始化，实例化（demonstration）数据声明（declaration）</li><li style=\\\"box-sizing:border-box;\\\">视图声明</li><li style=\\\"box-sizing:border-box;\\\">报表声明</li><li style=\\\"box-sizing:border-box;\\\">向导声明</li><li style=\\\"box-sizing:border-box;\\\">工作流声明</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">OpenERP XML文件主要结构的更多细节在 <a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#id7\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">:ref:`xml-serialization`</a> 部分，如果你想学习更多关于*初始化* 和 <em style=\\\"box-sizing:border-box;\\\">示例数据</em> XML文件，可以查看这里。 下面的部分只是关于特定的XML文件，如 following section are only related to XML specific to <em style=\\\"box-sizing:border-box;\\\">actions, menu entries, *操作、菜单、报表、向导</em> 和 <em style=\\\"box-sizing:border-box;\\\">工作流</em> 定义。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#python-%E6%A8%A1%E5%9D%97%E6%8F%8F%E8%BF%B0%E6%96%87%E4%BB%B6-__init__py\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Python 模块描述文件 __init__.py</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">** __init__.py 文件**</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">这个文件就像任何的Python模块中一样，在程序的开始运行。它负责导入程序所需的Python文件。</p><dl style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px;\\\"><dt style=\\\"box-sizing:border-box;padding:0px;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold;\\\">所以，如果你想创建一个“module.py”文件，它包括你的对象的描述，在这种情况下，你需要在__init__.py文件中写一行：</dt><dd style=\\\"box-sizing:border-box;margin-left:0px;padding:0px 16px;margin-bottom:16px;\\\">import module</dd></dl><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#openerp-%E6%A8%A1%E5%9D%97%E6%8F%8F%E8%BF%B0%E6%96%87%E4%BB%B6-__openerp__py\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>OpenERP 模块描述文件 __openerp__.py</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">在已经创建的模块目录中，我们需要添加这样一个文件__openerp__.py。这个文件必须是Python的格式书写，用于：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">1.确定所需的XML文件，server在进行初始化时将从语法上分析这些文件。 2.确定该创建模块的依赖模块。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">这个文件包括下面的值：</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">name</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">(英文) 模块名称。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">version</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块版本号， 2 位 (1.2 或 2.0).</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">description</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的描述，包含模块的使用文档。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">author</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块编者</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">website</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的网址</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">license</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的许可证（默认是GPL）</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">depends</strong></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">init</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .xml files to load when the server is launched with the &quot;--init=module&quot; argument. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">data</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .xml files to load when the server is launched with the &quot;--update=module&quot; launched. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">demo</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .xml files to provide demo data. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">installable</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">True或是False，决定这个模块是否可安装。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">images</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .png files to provide screenshots, used on <a href=\\\"http://apps.openerp.com/\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;margin-top:0px;margin-bottom:0px;\\\">http://apps.openerp.com</a>.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">active</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">True或是False（默认是False），决定这个模块在数据库创建时是否安装。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">test</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .yml files to provide YAML tests.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">Example</strong></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">以product模块中的__openerp__.py为例：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Products &amp; Pricelists<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Open<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Generic Modules/Inventory Control<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>base<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>account<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>init_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>demo_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_demo.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_data.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_report.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_wizard.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n                    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>pricelist_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>\\\n}\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">放置在init_xml中的文件必须要么是和工作流定义相关，要么是安装软件时装载数据相关，或是和示例数据相关。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">update_xml中的文件涉及到视图，报表和向导。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E5%AF%B9%E8%B1%A1\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>对象</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">所有OpenERP的资源都是对象，如menus，actions，reports，invoices，partners... OpenERP通过数据库的对象关系映射(ORM,object relational mapping of a database)来控制信息存储。OpenERP的对象名是层次结构的，例如：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">account.transfer : a money transfer</li><li style=\\\"box-sizing:border-box;\\\">account.invoice : an invoice</li><li style=\\\"box-sizing:border-box;\\\">account.invoice.line : an invoice line</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">总之，第一个单词是模块的名字：account，stock，sale</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">ORM的其他优点有：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">simpler relations : invoice.partner.address[0].city</li><li style=\\\"box-sizing:border-box;\\\">objects have properties and methods: invoice.pay(3400 EUR),</li><li style=\\\"box-sizing:border-box;\\\">inheritance, high level constraints, ...</li></ul></blockquote><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal;\\\"><span style=\\\"line-height: 1.6;\\\">操作一个对象比很多表要容易些。</span></div><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal;\\\"><br/></div><div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">Note：</p><p style=\\\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; font-size: 15px;\\\"><i>The Physical Database Model of OpenERP</i></p></div><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/images/pom_3_0_3.png\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\" target=\\\"_blank\\\"><img src=\\\":/f959faf42daf4cb1971c48f840a44438\\\" type=\\\"image/png\\\" data-filename=\\\"pom_3_0_3.png\\\" alt=\\\"images/pom_3_0_3.png\\\" height=\\\"1067\\\" style=\\\"box-sizing:border-box;border:0px;max-width:100%;cursor: default;cursor: default;\\\" width=\\\"858\\\"/></a><p style=\\\"box-sizing:border-box;margin-top:0px;margin-bottom:16px;\\\"><em style=\\\"box-sizing:border-box;\\\">The Physical Objects Model of [OpenERP version 3.0.3]</em></p></div><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#postgresql\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>PostgreSQL</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">OpenERP的ORM是在PostgreSQL上构造的。在OpenERP上通过对象接口或是直接使用SQL语句查询一个对象是可行的。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">在PostgreSQL数据库中直接进行读写是非常危险的，因为可能会漏掉重要的步骤如约束检查或是工作流的修改。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#pre-installed-data\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Pre-Installed Data</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">PostgreSQL表中的数据可以使用XML文件来进行插入或更新，使得于OpenERP对象数据一致。OpenERP XML文件的主要结构是：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;?<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">xml</span><span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\"> version</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.0<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>?&gt;\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n  &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>model.name_1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>id_name_1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n      &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>field1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n        &quot;field1 content&quot;\\\n      &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n      &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>field2<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n        &quot;field2 content&quot;\\\n      &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n      (...)\\\n    &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>model.name_2<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>id_name_2<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n        (...)\\\n    &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n    (...)\\\n  &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><span style=\\\"-evernote-highlight:true;background-color:rgb(255, 250, 165);\\\">Fields content are strings that must be encoded as <em style=\\\"box-sizing: border-box;\\\">UTF-8</em> in XML files.</span></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">让我们回顾一下另一个例子（base模块中的base_demo.xml）：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res.company<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>main_company<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Tiny sprl&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>partner_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>main_partner<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>currency_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>EUR<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n</pre></div><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res.users<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>user_admin<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>login<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;admin&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>password<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;admin&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Administrator&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>signature<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Administrator&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>action_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>action_menu_admin<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>menu_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>action_menu_admin<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>address_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>main_address<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>groups_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>[(6,0,[group_admin])]<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>company_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>main_company<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">上面的这个record定义了admin user：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">明确定义了login，password等 * ref属性用于在records之间建立关系</li></ul></blockquote><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>company_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">ref</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>main_company<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">字段company_id是一个从user object到company object的many-to-one的关系，main_company是相关联的id。</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing: border-box; padding: 0px 0px 0px 2em; margin-top: 0px; margin-bottom: 0px;\\\"><li style=\\\"box-sizing: border-box;\\\"><span style=\\\"-evernote-highlight:true;background-color:rgb(255, 250, 165);\\\">eval字段使得XML中有很多python代码：</span><span style=\\\"background-color: rgb(255, 255, 255);\\\">这里的groups_id字段是many2many的。“[(6,0,[group_admin])]”的意思是：移除与当前用户相关的所有groups，使用list[group_admin]作为新的相关groups（并且group_admin is the id of another record）。</span></li><li style=\\\"background-color: rgb(255, 255, 255); box-sizing: border-box;\\\">Search字段是当你不知道它的XML id时，用来查找相关记录（record）。当你查找所需记录时可以特别指定一个查找标准。这个标准相对于预定义的查找方法最好是一个相同形式元祖的列表（The criteria is a list of tuples of the same form than for the predefined search method.）。如果有很多查找记录，程序自动选择任意一个（第一个）：</li></ul></blockquote><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>partner_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">search</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>[]<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res.partner<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">这是个在demo数据中使用search的典型例子。在这里我们并不是真正想知道是哪个partner，所以我们给出了一个空的list。注意model属性是在一般情况下必须要写的。</p><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#record-tag\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Record Tag</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">Description</strong></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><span style=\\\"background-color: rgb(255, 255, 255);\\\">T新数据的添加是通过record标签实现的。它利用一个必备的属性：model。Model是一个对象名称，可以用来实现插入数据。r</span><span style=\\\"-evernote-highlight:true;background-color:rgb(255, 250, 165);\\\">ecord标签内还有一个可选择的属性：id。如果使用了这个属性，那么在相同文件中，这个名字可以代替新创建的资源ID</span><span style=\\\"background-color: rgb(255, 255, 255);\\\">。</span></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">record标签中包含field标签。他们指出record的字段值（record’s fields value）。如果这个field没有详细说明，那么它会使用默认值。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">Example</strong></p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir.actions.report.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>l0<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>model<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account.invoice&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Invoices List&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>report_name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account.invoice.list&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>report_xsl<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account/report/invoice.xsl&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>report_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account/report/invoice.xml&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n</pre></div><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#field-tag\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Field tag</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">field标签包含的属性如下所示：</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">name : （必须有的）field name</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">eval : （可选）将指定值进行添加的python表达式</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">ref : 这个文件中涉及到已定义的id</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">model ：用于查找的model</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">search ：查询</p><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#function-tag\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Function tag</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">一个功能标签包含其他的功能标签。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">model ：（必须有的）要调用的model</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">name ：（必需）function的名称</p><dl style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px;\\\"><dt style=\\\"box-sizing:border-box;padding:0px;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold;\\\">eval</dt><dd style=\\\"box-sizing:border-box;margin-left:0px;padding:0px 16px;margin-bottom:16px;\\\">eval ：估值（evaluate）要调用的方法的参数列表，不计cr和uid</dd></dl><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">Example</strong></p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">function</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir.ui.menu<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>search<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>[[('name','=','Operations')]]<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n</pre></div><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#getitem-tag\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Getitem tag</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">得到该标签最近子节点估值的子集</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">type ：（必需）int 或 list</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">index ：（必需）int or string</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">Example</strong></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">Evaluates to the first element of the list of ids returned by the function node</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">getitem</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">index</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>0<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">type</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>list<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">function</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir.ui.menu<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>search<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>[[('name','=','Operations')]]<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">getitem</span>&gt;\\\n</pre></div><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#i18n\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>i18n</h4><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E6%94%B9%E8%BF%9B%E7%BF%BB%E8%AF%91\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>改进翻译</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">翻译由“Launchpad Web interface”管理。在这里你会找到可译项目的清单。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">请在问问题前阅读 <a href=\\\"https://answers.launchpad.net/rosetta/+faqs\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">FAQ</a></p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">和之前4.2.x的版本不同，现在翻译都是通过模块来做。所以和之前整个系统中有一个特殊i18n文件夹不同的是，现在每一个模块都有自己的i18n文件夹。此外，OpenERP可以处理.po文件作为导入导出格式。当我们安装或是更新一个模块时，安装语言的翻译文件可以自动装入系统中。OpenERP也可以产生一个.tgz文件归档，里面包括为每个选中模块组织很好的.po文件。</p><table style=\\\"background-color: rgb(255, 255, 255); font-size: inherit; font-weight: inherit; font-style: inherit; font-variant: inherit; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; margin-top: 0px; margin-bottom: 16px; display: block; width: 100%; overflow: auto; word-break: normal;\\\"><tbody style=\\\"box-sizing:border-box;\\\" valign=\\\"top\\\"><tr style=\\\"box-sizing:border-box;border-top-width:1px;border-top-style:solid;border-top-color:rgb(204, 204, 204);background-color:rgb(255, 255, 255);\\\"><td style=\\\"box-sizing:border-box;padding:6px 13px;border:1px solid rgb(221, 221, 221);\\\">[1]</td><td style=\\\"box-sizing:border-box;padding:6px 13px;border:1px solid rgb(221, 221, 221);\\\"><a href=\\\"http://www.gnu.org/software/autoconf/manual/gettext/PO-Files.html#PO-Files\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">http://www.gnu.org/software/autoconf/manual/gettext/PO-Files.html#PO-Files</a></td></tr></tbody></table><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#process\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Process</h4><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#defining-the-process\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Defining the process</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">通过界面（interface）或是模块recorder来定义进程。然后放置生成的XML文件在自己的模块中。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#views\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Views</h4><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#technical-specifications---architecture---views\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Technical Specifications - Architecture - Views</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">视图是一种在客户端显示对象的方式。他们指示客户端如何在屏幕上显示对象数据。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><span style=\\\"-evernote-highlight:true;background-color: rgb(255, 250, 165);\\\">视图有两种表现形式：</span></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing: border-box; padding: 0px 0px 0px 2em; margin-top: 0px; margin-bottom: 0px;\\\"><li style=\\\"box-sizing: border-box;\\\"><span style=\\\"-evernote-highlight:true;background-color: rgb(255, 250, 165);\\\">表单视图</span></li><li style=\\\"box-sizing: border-box;\\\"><span style=\\\"-evernote-highlight:true;background-color: rgb(255, 250, 165);\\\">列表视图</span></li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">Lists是tree views中的特殊情形。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">同一个对象有几种视图：首先定义的视图样式（tree，form，…）将会做为它默认的样式。那样的话，当你双击一个菜单项时，就有一个默认的tree view和一个特定的view显示差不多的信息。例如，products针对product变量有几种视图。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">视图都是在XML文件中进行描述的。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">如果一个对象没有定义视图，那么这个对象可以自己产生一个视图来显示它自己。这会限制开发者的工作，但是会导致较少的人们自己的视图设计（ergonomic views）。</p><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#usage-example\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>Usage example</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">当我们打开一张发票时，接下来是在客户端上的操作：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">一个动作请求打开发票（它给出了一个对象的数据（account.invoice）,视图，域（例如仅仅是还未付款的发票））</li><li style=\\\"box-sizing:border-box;\\\">客户端请求server，什么样的视图由发票对象定义，哪些数据要显示。</li><li style=\\\"box-sizing:border-box;\\\">客户端通过视图显示表单</li></ul></blockquote><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/images/arch_view_use.png\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\" target=\\\"_blank\\\"><img src=\\\":/428c1a67ac3f43c9b550be71d447895e\\\" type=\\\"image/png\\\" data-filename=\\\"arch_view_use.png\\\" alt=\\\"images/arch_view_use.png\\\" height=\\\"372\\\" style=\\\"box-sizing:border-box;border:0px;max-width:100%;cursor: default;cursor: default;\\\" width=\\\"312\\\"/></a></div><h5 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#to-develop-new-objects\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.1;\\\"></a>To develop new objects</h5><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">对新对象的设计限制到最低限度：创建对象并且有选择的创建视图来显示他们。PostgreSQL的table数据不用手写，因为对象会自动创建它们（除非它们已经存在）。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#reports\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Reports</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">OpenERP使用一个非常灵活和强大的报表系统。报表以PDF或是HTML的形式生成。报表是以数据层和表现层分开的原理进行设计的。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">关于报表更多的细节在 <a href=\\\"http://openobject.com/wiki/index.php/Developers:Developper%27s_Book/Reports\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">Reporting</a> 章节。</p><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#wizards\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Wizards</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">这里有个描述向导的.xml文件的例子：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;?<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">xml</span><span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\"> version</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.0<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>?&gt;\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">wizard</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">string</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Employee Info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>hr.employee<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>employee.info.wizard<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>wizard_employee_info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">向导的声明是通过使用wizard标签。想要知道更多关于向导XML文件的信息可以查看“Add A New Wizard”部分。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">或者你可以在菜单中通过使用下面的XML entry添加向导。</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;?<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">xml</span><span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\"> version</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.0<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>?&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">wizard</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">string</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Employee Info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>hr.employee<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>employee.info.wizard<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>wizard_employee_info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n     &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">menuitem</span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Human Resource/Employee Info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">action</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>wizard_employee_info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">type</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>wizard<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n             <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>menu_wizard_employee_info<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n     &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n</pre></div><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#workflow\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Workflow</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">通过对象和视图，我们可以很简单的定义新的表单，lists/trees和它们间的交互。但是这还不够：你还得定义这些对象间的动态关系。 .. i18n: A few examples: ..</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">举个例子：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">在一般的情况下，一个已确定的销售订单必须生成一张发货单。</li><li style=\\\"box-sizing:border-box;\\\">只是在确认发货单已付款的前提下，才会开出运送清单。</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">工作流使用图表描述这些交互，一个或几个工作流相关到对象。工作流是非必须的；一些对象就没有工作流。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">下面的工作流用于销售订单的例子。在一定的条件下，它必须产生发货单和出货。</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/images/arch_workflow_sale.png\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\" target=\\\"_blank\\\"><img src=\\\":/b860988f4bd34459ac2bfe524d982ca4\\\" type=\\\"image/png\\\" data-filename=\\\"arch_workflow_sale.png\\\" alt=\\\"images/arch_workflow_sale.png\\\" height=\\\"623\\\" style=\\\"box-sizing:border-box;border:0px;max-width:100%;cursor: default;cursor: default;\\\" width=\\\"514\\\"/></a></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">在这张图表中节点代表着要做的动作。</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">创建发票</li><li style=\\\"box-sizing:border-box;\\\">取消销售订单</li><li style=\\\"box-sizing:border-box;\\\">生成装货单, ...</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">上面的箭头代表条件：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">1.等待订单获得批准 2.发票支付 3.点击取消按钮，。。。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">方格样式的节点代表其他的工作流：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">发票</li><li style=\\\"box-sizing:border-box;\\\">发货</li></ul></blockquote><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#openerp-%E6%A8%A1%E5%9D%97%E6%8F%8F%E8%BF%B0%E6%96%87%E4%BB%B6--__openerp__py\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1;\\\"></a>OpenERP 模块描述文件 : __openerp__.py</h2><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E4%B8%80%E8%88%AC%E6%A8%A1%E5%9D%97\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>一般模块</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">在已创建模块的目录下，你必须添加一个__openerp__.py文件。这个文件必须在Python的格式下，负责：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ol style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">确定所需的XML文件，server在进行初始化时将从语法上分析这些文件。</li><li style=\\\"box-sizing:border-box;\\\">1.确定已创建模块的依赖。</li></ol></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">这个文件包括下面的值：</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">name</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">(英文)名称.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">version</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">版本</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">description</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">描述</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">author</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的作者</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">website</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的网站</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">license</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">模块的授权协议(默认AGPL).</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">depends</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">列出该模块所依赖的其他模块，因为base模块包括模块必须的视图，报表等数据，所以base模块应该在其他所有模块的依赖中。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">init_xml</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .xml files to load when the server is launched with the &quot;--init=module&quot; argument. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">update_xml</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">List of .xml files to load when the server is launched with the &quot;--update=module&quot; launched. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">installable</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">True或是False，决定这个模块是否可安装。</blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">active</strong></p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\">True或是False（默认是False），决定这个模块在数据库创建时是否安装。</blockquote><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E7%A4%BA%E4%BE%8B\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>示例</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">以product模块中的__openerp__.py为例：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Products &amp; Pricelists<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Open<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Generic Modules/Inventory Control<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>base<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>account<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>init_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>demo_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_demo.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_data.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_report.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_wizard.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>product_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>pricelist_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>\\\n}\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">放置在init_xml中的文件必须要么是和工作流相关，要么是安装软件时装载数据相关，或是和示例数据相关。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">update_xml中的文件涉及到视图，报表和向导。</p><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#profile-%E6%A8%A1%E5%9D%97\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Profile 模块</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">一个profile的目的是在数据库创建后直接使用一组模块来初始化OpenERP。这个profile是一种特殊的模块，它不包含代码，只是 <em style=\\\"box-sizing:border-box;\\\">依赖于其他的模块</em> 。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">为了创建一个新的profile，你需要在server/addons里建一个新目录（可以给它取名为profile_modulename）。在新目录里放一个空的__init__.py文件和__openerp__.py。这个文件的结构是：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>''Name of the Profile'',</span>\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>''Version String''<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>''Author Name''<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Profile<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>List of the modules to install <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">with</span> the profile<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>demo_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">False</span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n}\\\n</pre></div><h4 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.4; font-size: 1.25em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E7%A4%BA%E4%BE%8B-1\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>示例</h4><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">我们以文件server/bin/addons/profile_manufacturing/__openerp__.py中的代码为例，它对应着OpenERP中的manufacturing industry profile。</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Manufacturing industry profile<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Open<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Profile<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>mrp<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>crm<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>sale<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>delivery<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>demo_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:[],\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">False</span>,\\\n     <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>:<span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n}\\\n</pre></div><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9D%97\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1;\\\"></a>创建模块</h2><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#getting-the-skeleton-directory\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Getting the skeleton directory</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">你可以从其他任意模块中复制文件__openerp__.py和__init__.py到一个新目录来创建一个新模块。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">Ubuntu中一个例子：</p><pre style=\\\"box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 85%; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1.45; padding: 16px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); word-wrap: normal;\\\">\\\n$ cd ~/workspace/stable/stable_addons_5.0/\\\n$ mkdir travel\\\n$ sudo cp ~/workspace/stable/stable_addons_5.0/hr/__openerp__.py ~/workspace/stable/stable_addons_5.0/travel\\\nsudo cp ~/workspace/stable/stable_addons_5.0/hr/__init__.py ~/workspace/stable/stable_addons_5.0/travel\\\n</pre><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">你如果想修改这个目录，你需要设置自己的权限在这个目录上:</p><pre style=\\\"box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 85%; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1.45; padding: 16px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); word-wrap: normal;\\\">\\\n$ sudo chown -R `whoami` travel\\\n</pre><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">进入新模块的目录，里面有个框架结构，你仍需要去更改模块定义里面的东西。</p><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#changing-the-default-definition\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Changing the default definition</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">为了更改模块“travel”里面的默认设置，我们需要进入“travel”目录，编辑__openerp__.py文件。</p><pre style=\\\"box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 85%; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1.45; padding: 16px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); word-wrap: normal;\\\">\\\n$ cd travel\\\n$ gedit __openerp__.py\\\n</pre><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">文件里面类似下面：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Human Resources<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Tiny<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Generic Modules/Human Resources<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>website<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>http://www.openerp.com<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>description<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;&quot;&quot;</span></span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  Module for human resource management. You can manage:</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  * Employees and hierarchies</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  * Work hours sheets</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  * Attendances and sign in/out system</span>\\\n\\\n<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  Different reports are also provided, mainly for attendance statistics.</span><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;&quot;&quot;</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>Tiny<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>website<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>http://www.openerp.com<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>base<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>process<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>],\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>init_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: [],\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: [\\\n      <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>security/hr_security.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n      <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>security/ir.model.access.csv<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n      <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>hr_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n      <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>hr_department_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n      <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>process/hr_process.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>\\\n  ],\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>demo_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>hr_demo.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>hr_department_demo.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>],\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">False</span>,\\\n  <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>certificate<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>0086710558965<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>,\\\n}\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">你可能会更改任意你觉得正确的东西，像下面这样：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n{\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Travel agency module<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>version<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>1.1<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>author<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Tiny<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>category<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Generic Modules/Others<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>website<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>http://www.openerp.com<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>description<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>A module to manage hotel bookings and a few other useful features.<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>depends<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>base<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>init_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>update_xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> : [<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>travel_view.xml<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>],\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>active<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>,\\\n    <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>installable<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>: <span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">True</span>\\\n}\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">注意“active”字段变成了true。</p><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#changing-the-main-module-file\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Changing the main module file</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">现在你需要更新travel.py脚本以满足你自己的模块的需要。我们建议你遵循Flash教程，或是从20minutes教程页面来下载travel agent模块。</p><pre style=\\\"box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 85%; margin-top: 0px; margin-bottom: 16px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1.45; padding: 16px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(247, 247, 247); word-wrap: normal;\\\">\\\nThe documentation below is overlapping the two next step in this wiki tutorial,\\\nso just consider them as a help and head towards the next two pages first...\\\n</pre><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">travel.py文件应该看起来是这样：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\"><span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">from</span> osv <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">import</span> osv, fields\\\n\\\n<span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">class</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">travel_hostel</span>(<span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">osv.osv</span>):\\\n       _name <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">=</span> <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>travel.hostel<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>\\\n       _inherit <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">=</span> <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>res.partner<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>\\\n       _columns <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">=</span> {\\\n       <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>rooms_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: fields.one2many(<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>travel.room<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>hostel_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>Rooms<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>),\\\n       <span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>quality<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>: fields.char(<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span>Quality<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">'</span></span>, <span style=\\\"box-sizing:border-box;color:rgb(51, 51, 51);\\\">size</span><span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">=</span><span style=\\\"box-sizing:border-box;color:rgb(0, 134, 179);\\\">16</span>),\\\n       }\\\n       _defaults <span style=\\\"box-sizing:border-box;color:rgb(167, 29, 93);\\\">=</span> {\\\n       }\\\ntravel_hostel()\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">理想情况下，你会拷贝那些代码几次来创建你所需要的实体（travel_airport, travel_room, travel_flight）。这就是你的对象的数据库结构，但是你真的不需要担心数据库端。当你安装模块时，这个文件会为你创建系统架构。</p><h3 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.43; font-size: 1.5em; position: relative; font-weight: bold;\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#customizing-the-view\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1.2;\\\"></a>Customizing the view</h3><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">接下来你可以编辑视图。编辑custom_view.xml文件，像这样：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res.groups<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>group_compta_user<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n            &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;grcompta&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res.groups<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>group_compta_admin<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n            &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;grcomptaadmin&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">menuitem</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>Administration<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">groups</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>admin,grcomptaadmin<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>\\\n                    <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">icon</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>terp-stock<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>menu_admin_compta<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">data</span>&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">openerp</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">就像你看到的，这是个accounting系统的例子。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">定义视图就是定义访问你的模块时的用户界面。这里定义的这些字段已经是一个完整的界面。然而，由于做这个的复杂性，我们建议，再一次，从链接<a href=\\\"http://www.openerp.com/download/modules/5.0/%E4%B8%8B%E8%BD%BDtravel\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;\\\">http://www.openerp.com/download/modules/5.0/下载travel</a> agent模块。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">下次你可以使用其他的文件来定义不同的视图，并且在你的basic/admin视图中分开它们。</p><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#action-creation\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1;\\\"></a>Action creation</h2><h2 style=\\\"font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 1em; margin-bottom: 16px; line-height: 1.225; font-size: 1.75em; position: relative; font-weight: bold; padding-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(238, 238, 238);\\\"><a href=\\\"https://github.com/buke/openerp-doc/blob/master/6.1/i18n/zh_hans/source/developer/03_modules_1.rst#linking-events-to-action\\\" style=\\\"box-sizing:border-box;background:transparent;color:rgb(65, 131, 196);text-decoration:none;position:absolute;top:0px;left:0px;display:block;padding-right:6px;padding-left:30px;margin-left:-30px;line-height:1;\\\"></a>Linking events to action</h2><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">可用类型的事件是：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">client_print_multi</strong> (print from a list or form)</li><li style=\\\"box-sizing:border-box;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">client_action_multi</strong> (action from a list or form)</li><li style=\\\"box-sizing:border-box;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">tree_but_open</strong> (double click on the item of a tree, like the menu)</li><li style=\\\"box-sizing:border-box;\\\"><strong style=\\\"box-sizing:border-box;font-weight:bold;\\\">tree_but_action</strong> (action on the items of a tree)</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">从事件到动作的映射是：</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir.values<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir_open_journal_period<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>key2<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;tree_but_open&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>model<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account.journal.period&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Open Journal&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>value<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>'ir.actions.wizard,%d'%action_move_journal_line_form_select<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>object<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>True<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">如果你双击journal/period (object: account.journal.period),将会打开一个选中的向导(id=”action_move_journal_line_form_select”).</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">只是当用户点击特定的对象时，你可以使用res_id字段来允许这个动作。</p><div style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-bottom: 16px;\\\"><pre style=\\\"box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:85%;margin-top:0px;margin-bottom:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;background-color:rgb(247, 247, 247);word-wrap:normal;word-break:normal;\\\">\\\n&lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">model</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir.values<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">id</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>ir_open_journal_period<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>key2<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;tree_but_open&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>model<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;account.journal.period&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>name<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>&gt;Open Journal&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span>&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>value<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>'ir.actions.wizard,%d'%action_move_journal_line_form_select<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>res_id<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>3<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n    &lt;<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">field</span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">name</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>object<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span> <span style=\\\"box-sizing:border-box;color:rgb(121, 93, 163);\\\">eval</span>=<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\"><span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span>True<span style=\\\"box-sizing:border-box;color:rgb(223, 80, 0);\\\">&quot;</span></span>/&gt;\\\n&lt;/<span style=\\\"box-sizing:border-box;color:rgb(99, 163, 92);\\\">record</span>&gt;\\\n</pre></div><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">当用户点击account.journal.period n°3时，这个动作将会触发。</p><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;\\\">当你声明向导，报表或是菜单时，ir.values的创建会自动由下面的标签完成：</p><blockquote style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; color: rgb(119, 119, 119); border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);\\\"><ul style=\\\"box-sizing:border-box;padding:0px;margin-top:0px;margin-bottom:0px;padding-left:2em;\\\"><li style=\\\"box-sizing:border-box;\\\">&lt;wizard... /&gt;</li><li style=\\\"box-sizing:border-box;\\\">&lt;menuitem... /&gt;</li><li style=\\\"box-sizing:border-box;\\\">&lt;report... /&gt;</li></ul></blockquote><p style=\\\"font-size: 16px; font-weight: normal; font-style: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;\\\">所以一般不需要自己加映射。</p></div></div></div></div></div></div></div></div></div></div></div><br/></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":166136}]"
metadata_diff: {"new":{"id":"c466f7d48f7c493b8ed588d196e66004","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348822831,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:03:56.370Z
created_time: 2025-11-28T21:03:56.370Z
type_: 13