보고서 사용자 지정하기

Odoo comes with a powerful and easy-to-use reporting framework. The engine allows you to create new reports, such as tax reports, balance sheets, and income statements with specific groupings and layouts.

중요

Activate the developer mode to access the accounting report configuration.

To create a new report, go to Accounting ‣ Configuration ‣ Accounting Reports. From here, create either a root report or a variant.

  • Consider saving modified reports as report variants to keep their root reports intact.

  • To access an existing report’s management interface from the report itself, click on the (gears) icon.

루트 보고서

루트 보고서는 일반이자 중립적인 회계 보고서라고 할 수 있습니다. 이는 국내용 회계 버전을 구축하는 모델 역할을 합니다. 보고서에 루트 보고서가 없으면 해당 보고서 자체가 루트 보고서로 간주됩니다.

Example

벨기에 및 미국에서 세금계산서는 모두 동일한 일반 버전을 기본으로 사용하고 이를 국내 규정에 맞게 조정합니다.

Creating a menu item is required to access a new root report. To do so, open the report’s configuration, click Action, Create Menu Item, and refresh the page. The report is now available under Accounting ‣ Reporting.

참고

국가에 있는 세무 당국에서 특정 유형의 신규 보고서를 요구하는 경우와 같이, 새로운 루트 보고서를 작성해야 하는 경우는 드뭅니다.

세부선택

변형은 루트 보고서의 국가별 버전이므로 항상 루트 보고서를 참조합니다. 변형 생성을 하려면 새 보고서를 생성할 때 루트 보고서 필드에서 일반 (루트) 보고서를 선택하세요.

When a root report is opened from the Accounting app’s Reporting menu, all of its variants are displayed in the report variant selector in the top right corner of the view.

Example

VAT Report (BE) is a variant of the root Generic Tax report.

변형 선택 사항 보고

명세

After creating a report (either root or variant), the next step is to fill it with lines. To create a new line, click on Add a line. To modify an existing line, click on the line itself and edit the popup. All lines require a Name and can have an optional Code which allows using the line’s value in formulas.

엔진 줄 옵션

표현식

Each line can contain one or multiple expressions. Expressions can be seen as sub-variables needed by a report line. To create an expression, click on Add a line within a line’s popup.

When creating an expression, you must enter a Label used to refer to that expression. The label must be unique among the expressions of each report line. Both the Computation Engine and the Formula fields must also be completed. The computation engine defines how the formula(s) and subformula(s) are interpreted. It is possible to mix expressions using different computation engines under the same line if needed.

참고

엔진에 따라 :guilabel:`하위 수식`이 필요할 수도 있습니다.

Odoo Domain computation engine

When using the Odoo Domain computation engine, a formula is interpreted as an Odoo domain targeting account.move.line objects.

하위 수식을 사용하면 도메인과 일치하는 이동 줄이 표현식 값을 계산하는 방법을 정의할 수 있습니다.

sum

결과는 작업 줄에서 일치하는 모든 잔액의 합계입니다.

sum_if_pos

이 금액이 양수이면 결과는 일치하는 작업 줄에 있는 모든 잔액의 합계가 됩니다. 그렇지 않으면 ‘0’입니다.

sum_if_neg

이 금액이 음수인 경우 결과는 일치하는 작업 줄에 있는 의 모든 잔액의 합계가 됩니다. 그렇지 않으면 ‘0’입니다.

count_rows

The result is the number of sub-lines of this expression. If the parent line has a group-by value, this will correspond to the number of distinct grouping keys in the matched move lines. Otherwise, it will be the number of matched move lines.

To reverse the sign of the result, put a - sign at the beginning of the subformula.

내역 보고서 내의 표현식 라인

Tax Tags computation engine

When using the Tax Tags computation engine, the contents of the Formula field are matched to tax tags. If such tags do not exist when creating the expression, they will be created.

표현식을 평가할 때 표현식 계산은 대략 다음과 같이 표현할 수 있습니다: (`+` **태그가 있는 작업 줄 금액) - (`-` **태그가 있는 작업 줄 금액).

Example

If the Formula is set to tag_name, the engine matches tax tags +tag_name and -tag_name, creating them if necessary. To exemplify further: two tags are matched by the formula. If the formula is A, it will require (and create, if needed) tags +A and -A.

Aggregate Other Formulas computation engine

The Aggregate Other Formulas computation engine performs arithmetic operations on the amounts obtained from other expressions. Formulas here are composed of references to expressions separated by one of the four basic arithmetic operators (addition +, subtraction -, division /, and multiplication *). To refer to an expression, type in its parent line’s code followed by a period . and the expression’s label (ex. code.label).

다음은 **하위 수식**에 대한 내용입니다:

if_above(CUR(amount))

산술 표현식의 값이 제공된 한도보다 큰 경우에만 반환됩니다. 그렇지 않은 경우, 결과는 `0`이 됩니다.

if_below(CUR(amount))

산술 표현식의 값이 제공된 한도보다 작은 경우에만 반환됩니다. 그렇지 않은 경우, 결과는 `0`이 됩니다.

if_between(CUR1(amount1), CUR2(amount2))

산술 표현식의 값이 제공된 범위 사이에 있는 경우에만 반환됩니다. 그렇지 않은 경우, 가장 가까운 한도로 되돌아갑니다.

if_other_expr_above(LINE_CODE.EXPRESSION_LABEL, CUR(amount))

산술 표현식의 값은 제공된 줄 코드와 표현식 레이블로 표시된 표현식의 값이 제공된 한도보다 큰 경우에만 반환됩니다. 그렇지 않은 경우, 결과는 `0`이 됩니다.

if_other_expr_below(LINE_CODE.EXPRESSION_LABEL, CUR(amount))

제공된 줄 코드와 표현식 레이블로 표시된 표현식의 값이 제공된 한도보다 작은 경우에만 산술 표현식의 값이 반환됩니다. 그렇지 않은 경우, 결과는 `0`이 됩니다.

`CUR’은 대문자로 된 통화 코드이고, ‘amount’는 해당 통화로 표시되는 한도 금액입니다.

‘cross_report’ 하위 수식으로 다른 보고서에 있는 표현식과 일치시킬 수도 있습니다.

Prefix of Account Codes computation engine

The Prefix of Account Codes computation engine is used to match amounts made on accounts using the prefixes of these accounts’ codes as variables in an arithmetic expression.

Example

21
산술 표현식에는 다음과 같이 접두사가 하나만 있을 수도 있습니다.

Example

21 + 10 - 5
이 공식은 코드가 ‘21’과 ‘10’으로 시작하는 계정에서 작업 줄에 있는 잔액을 더하고 접두사 ‘5’가 있는 계정의 잔액을 뺍니다.

하위 접두사를 선택하지 않을 수도 있습니다.

Example

21 + 10\(101, 102) - 5\(57)
이 수식은 이전 예시와 동일한 방식으로 사용하나, 접두사 ‘101’, ‘102’, ‘57’을 무시합니다.

‘C’ 및 ‘D’ 접미사를 사용하여 대변 및 차변 에 ‘하위 필터’ 를 적용할 수 있습니다. 이 경우, 계정은 접두사가 일치하고 동시에 이 계정에서 진행 작업 줄의 총 잔액이 대변/차변 인 경우에만 적용됩니다.

Example

‘210001’ 계정의 잔액은 -42이고 ‘210002’ 계정 잔액은 25입니다. 수식 ‘21D’와 일치하는 계정은 ‘210002’ 뿐이므로 25를 반환합니다. 대변 잔액이므로, ‘210001’은 일치하지 않습니다.

접두사를 빼고 ‘C’ 및 ‘D’ 접미어를 사용할 수 있습니다.

Example

21D + 10\(101, 102)C - 5\(57)
이 공식은 계정 작업 줄에 있는 잔액을 더하는 것으로 만약 코드가 ‘21’로 시작하는 경우에는 차변 (D)이 되고 만약 10`인 경우에는 대변(`C)이 되지만, 접두어 101, `102`의 경우에는 무시하며,접두어 `5`가 있는 계정의 경우에는 접두어 `57`을 무시하고 잔액을 차감합니다.

접두사 C 또는 `D`를 접미사로 사용하지 않고 일치시키려면 `()`로 비워두어 제외시킵니다.

Example

21D\()
이 수식은 잔액 기호에 관계없이 코드가 ‘21D’로 시작하는 계정을 일치시킵니다.

코드 접두사를 계정을 활용하는 방법 외에 계정 태그 를 사용하여 매칭을 시키는 방법도 있습니다. 이 기능은 예를 들어 표준화된 계정과목표가 없는 국가에서 회사마다 다른 용도로 동일한 접두사를 사용하는 경우에 특히 유용합니다.

Example

tag(25)
This formula matches accounts whose associated tags contain the one with ID 25.

If the tag you reference is defined in a data file, an XMLID can be used instead of the ID.

Example

tag(my_module.my_tag)
이 수식은 계정의 연결 태그에 my_module.my_tag 표시된 태그가 있는 경우 일치됩니다.

태그와 함께 산술 표현식을 사용할 수도 있으며, 접두사를 선택하여 결합할 수도 있습니다.

Example

tag(my_module.my_tag) + tag(42) + 10
*my_module.my_tag*로 태그가 연결된 계정의 잔액은, 태그에 연결된 계정 중 ID가 *42*이고 코드 접두사 ‘10’이 있는 계정의 잔액과 합산됩니다.

‘C’ 및 ‘D’ 접미어는 태그와 같은 방식으로 사용할 수 있습니다.

Example

tag(my_module.my_tag)C
이 수식은 my_module.my_tag 태그와 차변 잔액이 있는 계정을 일치시킵니다.

태그에서도 접두사를 사용하지 않을 수 있습니다.

Example

tag(my_module.my_tag)\(10)
이 수식은 my_module.my_tag 태그에 ‘10’으로 시작하지 않는 코드가 있는 계정과 일치시킵니다.

External Value computation engine

The External Value computation engine is used to refer to manual and carryover values. Those values are not stored using account.move.line, but with account.report.external.value. Each of these objects directly points to the expression it impacts, so very little needs to be done about their selection here.

다음은 **수식**에 대한 내용입니다:

sum

결과가 반드시 해당 기간 중 모든 외부 값의 합계여야 하는 경우.

most_recent

결과가 반드시 해당 기간 중 가장 최근인 외부 값의 합계여야 하는 경우.

또한 **하위 수식**은 두 가지 방법으로 사용할 수 있습니다.

rounding=X

‘X’를 숫자로 변경할 경우, 금액을 X 소수점 이하 자릿수로 반올림하라는 뜻입니다.

editable

이 표현식을 직접 편집할 수 있다는 의미이며, 보고서에 아이콘 표시로 연결되어 사용자가 작업할 수 있게 됩니다.

참고

보고서에서 현재 선택된 ‘date_to’에 수기 값이 생성됩니다.

두 하위 공식을 `;`로 구분하여 같이 사용할 수 있습니다.

Example

editable;rounding=2
This subformula shows the correct way to mix both behaviors.

Custom Python Function computation engine

The Custom Python Function computation engine is a means for developers to introduce custom computation of expressions on a case-by-case basis. The Formula is the name of a python function to call, and the Subformula is a key to fetch in the dictionary returned by this function. Use this computation engine only if making a custom module.

보고서에는 불확정 숫자 열이 표시될 수 있습니다. 각 열은 줄**에 선언되어 있는 **표현식**에서 값을 가져옵니다. 열의 :guilabel:`expression_label` 필드는 값이 표시되는 표현식의 라벨을 표시합니다. 해당 필드에 **표현식**이 없는 줄이 있으면 이 열에는 아무 것도 표시되지 않습니다. 열이 여러 개 있어야 하는 경우 서로 다른 **표현식 라벨을 사용해야 합니다.

보고서의 열

회계 보고서의 옵션 탭에 있는 기간 비교 기능을 사용하면, 기간마다 모든 열이 반복됩니다.

Line grouping

Non-standard grouping is possible by adding or using existing fields on the Journal Item model, provided that the fields are related and non-stored.

참고

Grouping lines requires the report to have explicit report lines that can be edited. The deferred reports, for example, do not support grouping lines as they use dynamic lines that are generated.

Create a new field on journal item

To create a non-stored, related field in the Journal Item model, first go to Accounting ‣ Journal Items, and click the (bug) icon, then click Fields. Click New to create a new field, and complete the following fields:

  • Field Name: a technical name for the field

  • Field Label: the label to be displayed for the field

  • Field Type: the type of field that this related field should point to

  • Stored: Leave this field unchecked as only non-stored fields can be used to group lines.

  • Related Model: If the field type is one2many, many2many, or many2one, select the model of the original field to group by.

  • Related Field Definition: the technical path to the field you want to group by

    Example

    To group by the sales team of the commercial partner, set the related field definition to move_id.team_id.

Group lines

To group lines, go to the Lines tab of the desired report, click on the line you want to group, and edit the Group by field. Enter the technical name (Field Name) of the field to use as the grouping key.

To find a list of all the model’s fields and their technical names, go to Accounting ‣ Journal Items, and click the (bug) icon, then click Fields. The technical name of each field is listed in the Field Name column.