Models, modules, and apps¶
Models determine the logical structure of a database and how data is stored, organized, and manipulated. In other words, a model is a table of information that can be linked with other tables. A model usually represents a business concept, such as a sales order, contact, or product.
Modules and apps contain various elements, such as models, views, data files, web controllers, and static web data.
Ghi chú
All apps are modules. Larger, standalone modules are typically referred to as apps, whereas other modules usually serve as add-ons to said apps.
Suggested features¶
Khi bạn tạo một mô hình hoặc ứng dụng mới bằng Studio, bạn có thể chọn thêm tối đa 14 tính năng để tăng tốc quá trình tạo. Các tính năng này kết hợp các trường, thiết lập mặc định và chế độ xem thường được sử dụng cùng nhau để cung cấp một số chức năng chuẩn. Hầu hết các tính năng này có thể được thêm vào sau, nhưng việc thêm chúng ngay từ đầu giúp quá trình tạo mô hình dễ dàng hơn nhiều. Hơn nữa, các tính năng này tương tác với nhau trong một số trường hợp để tăng tính hữu ích của chúng.
Example
Creating a model with the Hình ảnh and Giai đoạn chu trình features enabled adds the image in the card layout of the Kanban view.

Chi tiết liên hệ¶
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

Phân công người dùng¶
Khi chọn Phân công người dùng, hệ thống sẽ thêm vào Chế độ xem biểu mẫu một Trường Many2One liên kết với mô hình Liên hệ, với Miền sau: Người dùng chia sẻ chưa được cài đặt
để chỉ cho phép chọn Người dùng nội bộ. Ngoài ra, tiện ích many2one_avatar_user được sử dụng để hiển thị ảnh đại diện người dùng. Trường Người phụ trách cũng được thêm vào Chế độ xem danh sách.
Example

Ngày & lịch¶
Selecting Date & Calendar adds to the Form view a Date field and activates the Calendar view.
Phạm vi ngày & gantt¶
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.
Giai đoạn chu trình¶
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.
Ghi chú
The Pipeline stages feature can be added at a later stage.
Hình ảnh¶
Selecting Picture adds to the top-right of the Form view an Image field.
Ghi chú
The Picture feature can be added at a later stage.
Chi tiết¶
Selecting Lines: adds to the Form view a Lines field inside a Tab component.
Ghi chú¶
Selecting Notes adds to the Form view an Html field using the full width of the form.
Giá trị tiền tệ¶
Selecting Monetary value adds to the Biểu mẫu and Danh sách views a Monetary field. The Biểu đồ and Pivot views are also activated.
Ghi chú
A Currency field is added and hidden from the view.
Công ty¶
Selecting Company adds to the Biểu mẫu and Danh sách views a Many2One field linked to the Company model.
Ghi chú
This is only useful if you work in a multi-company environment.
Sắp xếp tùy chỉnh¶
Selecting Custom Sorting adds to the List view a drag handle icon to manually reorder records.
Example

Chatter¶
Selecting Chatter adds to the Form view Chatter functionalities (sending messages, logging notes, and scheduling activities).
Ghi chú
The Chatter feature can be added at a later stage.
Example

Đang lưu trữ¶
Selecting Archiving adds to the Biểu mẫu and Danh sách views the Archive action and hides archived records from searches and views by default.
Export and import customizations¶
Khi bạn thực hiện bất kỳ tùy chỉnh nào với Studio, một phân hệ mới có tên studio_customization
sẽ được thêm vào cơ sở dữ liệu của bạn. Bạn có thể xuất phân hệ này dưới dạng tệp ZIP bằng chức năng Xuất studio. Sau đó, phân hệ này có thể được nhập vào một cơ sở dữ liệu Odoo khác. Điều này có thể hữu ích, ví dụ như khi thiết lập một phân hệ mới hoặc phục vụ mục đích đào tạo.
Ghi chú
Exporting and importing customizations in this way, rather than using the standard Odoo export and import functions, means data is imported in a logical way. For example, if the module contains customers and sales orders, the customers are created first, since these are required for the sales orders to be created.
Export customizations¶
To export customizations, click the (Toggle Studio) button on the main Odoo dashboard, then Export, then either:
download all Studio customizations by clicking the Export button; or
choose what data to export by clicking Configure data and demo data to export.
Configure data to export¶
To select specific models to export, click New on the Studio Export screen, then start typing the name of the relevant model or select it from the list.
Mẹo
Click Preset to see a list of all models in your database with records that have been modified using Studio and all custom models created using Studio. To configure one of these models for export, click on the model to open it and make the required changes.
Tick the following options as relevant:
Demo: if the exported records should be considered as demo data when imported.
Attachments: if attachments related to exported records should be included in the export.
Updatable: if the exported records should be able to be updated during a module update.
If necessary, edit the Domain to determine which of the model's records should be exported. To do so, click the Edit Domain button or (Modify filter) then Edit Domain, as appropriate. Proceed to make any required changes.
After configuring a model for export, click Studio Export to return to the main screen. To download a ZIP file with the customizations for all the listed models, click Export.
Ghi chú
It is not necessary to select one or more models as all listed models will be included in the export. To remove a model from the export, select it and click the Actions button then Delete.
In the Studio Export window:
leave the checkboxes unticked to export only the customizations done with Studio.
tick Include Data to include data from the selected models in the export.
tick Include Demo Data to include data from the selected models that is flagged as demo data. Ticking this option also ticks Include Data.
Click the Export button to download the ZIP file.

Import customizations¶
Cảnh báo
Before importing, make sure the destination database is on the same Odoo version and contains the same apps and modules as the source database. Studio does not add the underlying modules as dependencies of the exported module.
To import and install Studio customizations in another Odoo database:
Connect to the destination database.
Click the (Toggle Studio) button on the main Odoo dashboard, then Import.
Upload the exported ZIP file. If demo data should be imported, tick Load demo data.
Click Install.