모델, 모듈 및 앱

모델을 통해 데이터베이스의 논리적 구조와 데이터를 저장하거나 구성 및 조작하는 방법을 정합니다. 즉, 모델은 다른 테이블과 연결할 수 있는 정보의 테이블입니다. 일반적으로 모델은 판매 주문, 연락처 또는 품목 과 같은 비즈니스적인 개념을 나타냅니다.

Modules and apps contain various elements, such as models, views, data files, web controllers, and static web data.

참고

All apps are modules. Larger, standalone modules are typically referred to as apps, whereas other modules usually serve as add-ons to said apps.

추천 기능

스튜디오를 사용하여 새로 모델이나 앱을 생성하는 경우 최대 14개 기능을 추가하여 생성 프로세스 속도를 높일 수 있습니다. 해당 기능은 일반적으로 일부 표준 기능과 함께 사용되는 필드, 기본 설정 및 화면과 함께 번들로 제공됩니다. 대부분의 기능을 추후에 추가할 수 있지만, 처음부터 추가해 놓으면 모델 생성 프로세스가 훨씬 쉬워집니다. 또한 이러한 기능은 함께 사용하면 경우에 따라 더욱 편리하게 사용할 수 있습니다.

Example

Creating a model with the 사진 and 파이프라인 단계 features enabled adds the image in the card layout of the Kanban view.

사진 및 파이프라인 단계 기능이 조합된 칸반 보기

연락처 상세 정보

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

양식 보기에 있는 연락처 정보 기능

사용자 배정

사용자 할당 을 선택하면 연락처 모델에 연결된 다대일 필드양식 보기 에 추가되며, 다음의 도메인: 공유 사용자가 설정되지 않음 을 선택하면 사내 사용자 만 선택할 수 있게 됩니다. 또한, 사용자 아바타를 표시할 수 있도록 many2one_avatar_user 위젯을 사용합니다.또한 목록 보기 <studio/views/multiple-records/list>`에 :guilabel:`담당자 필드가 추가됩니다.

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.

참고

파이프라인 단계 기능은 나중에 추가할 수 있습니다.

태그

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.

참고

사진 기능은 나중에 추가할 수 있습니다.

명세

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.

참고

이 기능은 다중 회사 환경에서 작업하는 경우에만 유용합니다.

사용자 지정 정렬

Selecting Custom Sorting adds to the List view a drag handle icon to manually reorder records.

Example

목록 보기에 있는 사용자 지정 정렬 기능

대화 메시지

메시지창 을 선택하면 양식 보기 에 메시지창 기능(메시지 보내기, 메모 기록, 활동 예약)이 추가됩니다.

참고

메시지창 기능은 나중에 스테이지에서 추가할 수 있습니다.

Example

양식 보기에 있는 메시지창 기능

보관

Selecting Archiving adds to the 양식 and 목록 views the Archive action and hides archived records from searches and views by default.

내보내기 및 가져오기 사용자 지정

스튜디오에서 사용자 지정 작업을 할 경우 studio_customization 이라는 새로운 모듈이 데이터베이스에 추가됩니다. 스튜디오 내보내기 기능을 사용하면 이 모듈을 ZIP 파일로 내보낼 수 있습니다. 그런 이 모듈을 다른 Odoo 데이터베이스로 가져올 수 있습니다. 이 기능은 예를 들어 새 모듈을 설정하거나 교육 목적으로 활용할 때 유용할 수 있습니다.

참고

이러한 방식으로 사용자 지정된 항목을 내보내고 가져오기를 할 때, 표준 Odoo 내보내기 및 가져오기 함수를 사용하지 않고도 합리적인 방식으로 데이터를 가져올 수 있습니다. 예를 들어 모듈에 고객과 판매주문서 정보가 있을 경우 판매주문서를 생성하기 위해서는 고객이 필요하므로 고객이 먼저 생성됩니다.

내보내기 사용자 지정

To export customizations, click the (Toggle Studio) button on the main Odoo dashboard, then Export, then either:

데이터 내보내기 환경설정

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.

사전 설정 을 클릭하면 데이터베이스에 있는 전체 모듈 목륵을 확인할 수 있으며 여기에는 스튜디오를 통해 수정된 레코드및 스튜디오로 제작한 모든 사용자 지정 모델이 포함되어 있습니다. 이러한 모델 중에서 하나를 내보내도록 설정하려면 모델을 클릭하여 열고 필요한 내용대로 변경합니다.

다음 옵션 중 해당되는 항목에 표시하세요:

  • 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.

참고

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.

스튜디오 내보내기 창에서:

  • 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.

내보내기 버튼을 클릭하여 ZIP 파일을 다운로드합니다.

데이터 및 데모 데이터를 모두 내보내기로 선택하기

가져오기 사용자 지정

경고

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:

  1. 대상 데이터베이스에 연결합니다.

  2. Click the (Toggle Studio) button on the main Odoo dashboard, then Import.

  3. Upload the exported ZIP file. If demo data should be imported, tick Load demo data.

  4. 설치 를 클릭합니다.