필드 및 위젯

필드에서 데이터베이스의 모델을 구조화합니다. 모델을 테이블이나 스프레드시트라고 가정한다면, 필드는 레코드에 데이터가 저장되는 열 (즉, 행)입니다. 또한 필드는 내부에 저장되는 데이터의 유형을 정의합니다. 데이터가 표시되고 형식이 지정되는 방식은 해당 위젯에 의해 정의됩니다.

기술적인 관점에서 Odoo에는 15가지 유형의 필드가 있습니다. 그러나 일부 필드 유형의 경우에는 다른 기본 위젯에서 두 번 이상 사용할 수 있으므로 스튜디오에서는 20가지의 필드 중에서 선택할 수 있습니다.

New Fields can only be added to the 양식 and 목록 views. On other views, you can only add Existing Fields (fields already on the model).

Simple fields

Simple fields contain basic values, such as text, numbers, files, etc.

참고

Non-default widgets, when available, are presented as bullet points below.

Text (char)

The Text field is used for short text containing any character. One text line is displayed when filling out the field.

  • Badge: displays the value inside a rounded shape, similar to a tag. The value cannot be edited on the UI, but a default value can be set.

  • Copy to Clipboard: users can copy the value by clicking a button.

  • E-mail: the value becomes a clickable mailto link.

  • Image: displays an image using a URL. The value cannot be edited manually, but a default value can be set.

    참고

    이는 이미지 필드 를 직접 선택하는 것과 다르게 작동하며, 텍스트 필드를 이미지 위젯과 같이 사용할 경우 Odoo에서 이미지가 저장되지 않기 때문입니다. 예를 들어, 디스크 공간을 절약하려는 경우 유용하게 활용할 수 있습니다.

  • Phone: the value becomes a clickable tel link.

    Tick Enable SMS to add an option to send an SMS directly from Odoo next to the field.

  • URL: the value becomes a clickable URL.

Example

Examples of Text fields with different widgets

Multiline Text (text)

The Multiline Text field is used for longer text containing any type of character. Two text lines are displayed on the UI when filling out the field.

  • Copy to Clipboard: users can copy the value by clicking a button.

Example

Examples of Multiline Text fields with different widgets

Integer (integer)

The Integer field is used for all integer numbers (positive, negative, or zero, without a decimal).

  • Percentage Pie: displays the value inside a percentage circle, usually for a computed value. The value cannot be edited on the UI, but a default value can be set.

  • Progress Bar: displays the value next to a percentage bar, usually for a computed value. The field cannot be edited manually, but a default value can be set.

  • Handle: displays a drag handle icon to order records manually in List view.

Example

Examples of Integer fields with different widgets

Decimal (float)

The Decimal field is used for all decimal numbers (positive, negative, or zero, with a decimal).

참고

Decimal numbers are displayed with two decimals after the decimal point on the UI, but they are stored in the database with more precision.

  • Monetary: it is similar to using the Monetary field. It is recommended to use the later as it offers more functionalities.

  • Percentage: displays a percent character % after the value.

  • Percentage Pie: displays the value inside a percentage circle, usually for a computed value. The field cannot be edited manually, but a default value can be set.

  • Progress Bar: displays the value next to a percentage bar, usually for a computed value. The field cannot be edited manually, but a default value can be set.

  • Time: the value must follow the hh:mm format, with a maximum of 59 minutes.

Example

Examples of Decimal fields with different widgets

Monetary (monetary)

The Monetary field is used for all monetary values.

참고

처음으로 화폐 필드를 추가할 때 모델에 기존에 사용하는 필드가 없으면 통화 필드를 추가하라는 메시지가 표시됩니다. Odoo에서는 통화 필드를 추가하도록 제안합니다. 추가하면 화폐 필드를 다시 추가합니다.

Example

Example of a Monetary field along with its Currency field

Html (html)

The Html field is used to add text that can be edited using the Odoo HTML editor.

  • Multiline Text: disables the Odoo HTML editor to allow editing raw HTML.

Example

Examples of Html fields with different widgets

Date (date)

The Date field is used to select a date on a calendar.

  • Remaining Days: the remaining number of days before the selected date is displayed (e.g., In 5 days), based on the current date.

Example

Examples of Date fields with different widgets

Date & Time (datetime)

날짜 및 시간 필드는 달력의 날짜와 시계의 시간을 선택하는 데 사용합니다. 시간을 설정하지 않으면 사용자의 현재 시간이 자동으로 적용됩니다.

  • Date: used to record the time without displaying it on the UI.

  • Remaining days: displays the remaining number of days before the selected date (e.g., In 5 days), based on the current date and time.

Example

Examples of Date & Time fields with different widgets

Checkbox (boolean)

The Checkbox field is used when a value should only be true or false, indicated by checking or unchecking a checkbox.

  • Button: displays a radio button. The widget works without switching to the edit mode.

  • Toggle: displays a toggle button. The widget works without switching to the edit mode.

Example

Examples of Checkbox fields with different widgets

Selection (selection)

The Selection field is used when users should select a single value from a group of predefined values.

  • Badge: displays the value inside a rounded shape, similar to a tag. The value cannot be edited on the UI, but a default value can be set.

  • Badges: displays all selectable values simultaneously inside rectangular shapes, organized horizontally.

  • 우선순위: 별표 기호를 값 대신 사용하며 예를 들어 중요성이나 만족도 수준을 나타내는 데 사용할 수 있습니다. 우선순위 필드 를 선택하는 것과 동일한 효과를 있으나, 후자의 경우 4개의 우선순위 값이 이미 사전에 지정되어 있습니다.

  • Radio: displays all selectable values at the same time as radio buttons.

    By default, radio buttons are organized vertically. Tick display horizontally to switch the way they are displayed.

Example

Examples of Selection fields with different widgets

Priority (selection)

우선순위 필드는 별 3개로 등급 시스템을 표시하여 중요도나 만족도 수준을 나타내는 데 사용할 수 있습니다. 이 필드 유형은 선택 필드 <studio/fields/simple-fields/selection>`로, 기본값을 :guilabel:`우선순위 위젯으로 하여 우선순위 값 4개가 사전 지정되어 있습니다. 따라서, 배지, 배지들, 라디오선택 위젯은 선택 항목에서 설명한 것과 같은 효과를 가져오게 됩니다.

값을 추가하거나 삭제하여 사용할 수 있는 별 개수를 변경하려면 값 수정 을 클릭합니다. 첫 번째 값은 별 0개 (즉, 선택하지 않음)가 되므로 예를 들어 값이 4개인 경우에는 별 3개로 평가하는 시스템이 됩니다.

Example

Example of a Priority field

File (binary)

The File field is used to upload any type of file, or sign a form (Sign widget).

  • Image: users can upload an image file, which is then displayed in Form view. This has the same effect as using the Image field.

  • PDF Viewer: users can upload a PDF file, which can be then browsed from the Form view.

  • Sign: users can electronically sign the form. This has the same effect as selecting the Sign field.

Example

Examples of File fields with different widgets

Image (binary)

이미지 필드는 이미지를 업로드하고 양식 보기 에 표시하는 데 사용됩니다. 이 필드 유형은 기본적으로 이미지 위젯이 선택되어 있는 파일 필드 <studio/fields/simple-fields/file>`입니다. 따라서 :guilabel:`파일, PDF 뷰어서명 위젯은 파일 에 설명된 내용과 효과가 동일합니다.

To change the display size of uploaded images, select Small, Medium, or Large under the Size option.

Sign (binary)

전자 서명 필드는 양식에 전자 서명을 하는 데 사용합니다. 이 필드 유형은 파일 필드 이며 기본값으로 전자 서명 위젯이 선택되어 있습니다. 따라서 파일, 이미지PDF 뷰어 위젯은 :ref:`파일 <studio/fields/simple-fields/file> 에 설명된 내용과 동일하게 작동합니다.

사용자가 서명을 직접 써야 할 때 자동 옵션을 사용할 수 있게 하려면 다음 내용 자동 완성 필드에서 선택합니다 (텍스트관련 필드 모델만 해당). 선택한 필드의 데이터를 사용하여 서명이 자동으로 생성됩니다.

Relational fields

Relational fields are used to link and display the data from records on another model.

참고

Non-default widgets, when available, are presented as bullet points below.

Many2One (many2one)

다대일 필드는 편집 중인 레코드에 다른 레코드 (다른 모델의 레코드)를 연결하는 데 사용됩니다. 연결되면 편집 중인 레코드에 다른 모델의 레코드 이름이 표시됩니다.

Example

On the Sales Order model, the Customer field is a Many2One field pointing at the Contact model. This allows many sales orders to be linked to one contact (customer).

Diagram showing a many2one relationship

  • To prevent users from creating a new record in the linked model, tick Disable creation.

  • To prevent users from opening records in a pop-up window, tick Disable opening.

  • To help users only select the right record, click on Domain to create a filter.

  • Badge: displays the value inside a rounded shape, similar to a tag. The value cannot be edited on the UI.

  • Radio: displays all selectable values at the same time as radio buttons.

One2Many (one2many)

The One2Many field is used to display the existing relations between a record on the current model and multiple records from another model.

Example

You could add a One2Many field on the Contact model to look at one customer’s many sales orders.

Diagram showing a one2many relationship

참고

일대다 필드를 사용하려면 두 모델이 이미 다대일 필드 를 사용하여 연결되어 있어야 합니다. 일대다 관계는 독립적으로는 존재하지 않습니다. 기존 다대일 관계에 역방향으로 검색이 진행됩니다.

Lines (one2many)

The Lines field is used to create a table with rows and columns (e.g., the lines of products on a sales order).

열을 수정하려면 필드를 클릭한 다음 목록 보기 편집 을 클릭합니다. 사용자가 줄 추가 를 클릭할 때 나타나는 양식을 편집하려면 대신 양식 보기 편집 을 클릭합니다.

Example

Example of a Lines field

Many2Many (many2many)

다대다 필드는 다른 모델에 있는 복수의 레코드를 현재 모델에 있는 복수의 레코드에 연결하는 데 사용합니다. 다대다 필드는 다대일 필드 와 같이 guilabel:만들기 비활성화, 열기 비활성화, 도메인 기능을 사용할 수 있습니다.

Example

작업 모델에서 배정 대상 필드는 연락처 모델과 연결되어 있는 다대다 필드입니다. 이를 통해 한 명의 사용자를 여러 개의 작업에 배정하고 여러 명의 사용자를 하나의 작업에 배정할 수 있습니다.

Diagram showing many2many relationships
  • Checkboxes: users can select several values using checkboxes.

  • Tags: users can select several values appearing in rounded shapes, also known as tags. This has the same effect as selecting the Tags field.

Tags (many2many)

태그 필드는 다른 모델에 있는 여러 가지의 값을 나타내기 위해 사용하며, 원 모양으로 표시하여 *태그*라고 지칭합니다. 이 필드 유형의 기본값은 태그 위젯이 기본적으로 선택되어 있는 다대다 필드 <studio/fields/relational-fields/many2many>`입니다. 따라서, :guilabel:`체크박스다대다 위젯은 다대다 항목에서 설명된 것과 동일한 효과를 가져오게 됩니다.

To display tags with different background colors, tick Use colors.

Example

Example of a Tags field

속성

  • 표시하지 않음: UI에서 필드를 표시할 필요가 없으면 표시하지 않음 을 선택합니다. 상황에 따라 필수 필드만 표시되게 하여 UI를 깔끔하게 정리할 수 있습니다.

    Example

    On the Form view of the Contact model, the Title field only appears when Individual is selected, as that field would not be helpful for a Company contact.

    참고

    The Invisible attribute also applies to Studio. To view hidden fields inside Studio, click on a view’s View tab and tick Show Invisible Elements.

  • Required: If a field should always be completed by the user before being able to proceed, tick Required.

  • Read only: If users should not be able to modify a field, tick Read only.

    참고

    You can choose to apply these three properties only for specific records by clicking on Conditional and creating a filter.

  • Label: The Label is the field’s name on the UI.

    참고

    This is not the same name as used in the PostgreSQL database. To view and change the latter, activate the Developer mode, and edit the Technical Name.

  • 도움말 도구 설명: 이 항목의 목적에 대해 기재하려면 도움말 도구 설명 아래에 설명 내용을 작성합니다. 제목 위에 마우스를 가져가면 도구 설명 상자 안에 표시됩니다.

  • Placeholder: To provide an example of how a field should be completed, write it under Placeholder. It is displayed in light gray in lieu of the field’s value.

  • Widget: To change the default appearance or functionality of a field, select one of the available widgets.

  • Default value: To add a default value to a field when a record is created, use Default value.

  • Limit visibility to groups: To limit which users can see the field, select a user access group.