模型、模组和应用程序

模型决定数据库的逻辑结构、数据的存储、整理和操作方式。换言之,模型是可以与其他表格链接的信息表。模型通常代表一个业务概念,例如*销售订单*、联系人*或*产品

模块和应用程序包含各种元素,如模型、视图、数据文件、网站控制器和静态网站数据。

備註

所有应用程序都是模块。较大的独立模块通常称为应用程序,其他模块则通常用作应用程序的附加组件。

建议功能

使用Studio创建新模型或应用程序时,您可以选择添加多达14个功能,以加快创建过程。这些功能将字段、默认设置和视图捆绑在一起,通常用于实现标准功能。多数上述功能可在之后添加,但提前添加可使模型创建过程更容易。此外,在某些情况下,上述功能会相互作用,以提高实用性。

Example

使用启用的:ref:`studio/models-modules-apps/suggested-features/picture`和:ref:`studio/models-modules-apps/suggested-features/pipeline-stages`功能创建模型时,会在 :ref:`Kanban view <studio/views/multiple-records/kanban>`的卡布局中添加图片。

看板视图中图片和管道阶段功能组合

聯絡方法

Selecting Contact details adds to the Form view a Many2One field linked to the Contact model and two of its Related Fields: Phone and Email. The Contact field is also added to the List view, and the Map view is activated.

Example

表单视图中的联系人详细信息功能

使用者分配

Selecting User assignment adds to the Form view a Many2One field linked to the Contact model, with the following Domain: Share User is not set to only allow the selection of Internal Users. In addition, the many2one_avatar_user widget is used to display the user’s avatar. The Responsible field is also added to the List view.

Example

表单视图中的用户分配功能

日期及日曆

Selecting Date & Calendar adds to the Form view a Date field and activates the Calendar view.

日期範圍及甘特圖

Selecting Date range & Gantt adds to the Form view two Date fields next to each other: one to set a start date, the other to set an end date, using the daterange widget, and activates the Gantt view.

管道階段

Selecting Pipeline stages activates the Kanban view, adds several fields such as Priority and Kanban State, and three stages: New, In Progress, and Done. The Pipeline status bar and the Kanban State field are added to the Form view. The Color field is added to the List view.

備註

:guilabel:`Pipeline stages`功能可以之后添加。

標籤

Selecting Tags adds to the 表單 and 清單 views a Tags field, creating a Tag model with preconfigured access rights in the process.

圖片

Selecting Picture adds to the top-right of the Form view an Image field.

備註

:guilabel:`图片`功能可以之后添加。

明細列表

Selecting Lines: adds to the Form view a Lines field inside a Tab component.

備註

Selecting Notes adds to the Form view an Html field using the full width of the form.

金錢價值

Selecting Monetary value adds to the 表單 and 清單 views a Monetary field. The 圖形 and 樞紐分析表 views are also activated.

備註

视图中添加或隐藏*币种*字段。

公司

Selecting Company adds to the 表單 and 清單 views a Many2One field linked to the Company model.

備註

该功能仅适用于多公司环境。

自訂排序

选择:guilabel:`自定义排序`会向:ref:`List view <studio/views/multiple-records/list>`添加拖动手柄图标,用于手动完成记录。

Example

列表视图中的自定义排序功能

聊天視窗

选择:guilabel:`聊天窗口`会向:ref:`Form view <studio/views/general/form>`添加聊天窗口功能(发送信息、记录笔记和计划活动)。

備註

:guilabel:`聊天窗口`功能可以之后添加。

Example

表单视图中的聊天窗口功能

正在封存

选择:guilabel:归档`会向:ref:`studio/views/general/form and :ref:`studio/views/multiple-records/list`视图添加:guilabel:`归档`动作,并在默认情况下,从搜索和视图中隐藏已存档的记录。

导出和导入自定义项

使用Studio进行任何自定义时,会向数据库添加名为:guilabel:`Studio customize`的新模块。

要导出自定义项,转到:menuselection:主仪表板-->Studio-->自定义项-->导出,下载包含所有自定义项的压缩文件。

要向另一数据库导入并安装自定义项,连接至目标数据库,转到:menuselection:主仪表板-->Studio-->自定义项-->导入,在点击:guilabel:`导入`按钮前上传导出的压缩文件。

警告

在导入之前,确保目标数据库具有与源数据库相同的应用程序和模块。Studio不会将基础模块添加为导出模块的依赖项。