会計の翻訳

警告

このチュートリアルでは、Odoo でモジュールを構築する方法についての知識が必要です ( :doc:`../tutorials/server_framework_101`を参照してください)。

インストール手順

On installing the account module, the localization module corresponding to the country code of the company is installed automatically. In case of no country code set or no localization module found, the l10n_generic_coa (US) localization module is installed by default. Check post init hook for details.

例えば、l10n_ch は会社が Switzerland を国としている場合にインストールされます。

ローカライズモジュールの構築

基本的な l10n_XX モジュールの構造は、以下の :file:`__manifest__.py`ファイルで記述できます:

{
    "name": "COUNTRY - Accounting",
    "version": "1.0.0",
    "category": "Accounting/Localizations/Account Charts",
    "license": "LGPL-3",
    "depends": [
        "account",
    ],
    "data": [
        "data/other_data.xml",
        "views/xxxmodel_views.xml",
    ],
    "demo": [
        "demo/demo_company.xml",
    ]
}

ワークツリーは次のようになっているはずです

l10n_xx
├── data
│   ├── template
│   │   ├── account.account-xx.csv
│   │   ├── account.group-xx.csv
│   │   └── account.tax.group-xx.csv
│   └── other_data.xml
├── views
│   └── xxxmodel_views.xml
├── demo
│   └── demo_company.xml
├── models
│   ├── template_xx.py
│   └── __init__.py
├── __init__.py
└── __manifest__.py

最初のファイル models/template_xx.py では、いくつかの基本フィールドと共にアカウントのチャート名を設定します。

勘定科目表

アカウントタグ

タグはアカウントをソートする方法です。 例えば、 複数行の財務報告を作成したいとしますが、code に従って口座をディスパッチするルールを見つけることはできません。 解決策は、必要なアカウントをフィルタリングするために、各レポート行ごとに1つのタグを使用することです。

data/account_account_tag_data.xml ファイルにタグを追加します。

アカウント

明らかに、 アカウントのチャートアカウント なしでは存在できません。 data/account.account.template.csv で指定する必要があります。

警告

  • asset_cash account_type の使用は避けてください! 実際、銀行口座と現金口座はローカライズモジュールのインストール時に直接作成され、その後、アカウントにリンクされます。 ournal .

  • 一般的な場合には、payable/receivable 型の 1 つのアカウントだけが十分です。 ただし、PoS債権口座も定義する必要があります。

  • あまりにも多くのアカウントを作成しないでください:200-300は十分です。 しかし、ほとんどの場合、CoAがその後のほとんどの企業に最小限の適応を必要とするような良いバランスを見つけようとしています。

勘定グループ

口座グループでは、口座のチャートの階層構造を説明できます。 フィルタは、レポートで有効にする必要がありますし、ジャーナルエントリに脱色すると、アカウントの両親が表示されます。

接頭辞*start*/*end*で動作するので、コードが*start*と*end*の間の何かで始まるすべてのアカウントには、この ``accountがあります。 親グループとしてのroup。さらに、口座グループは親口座グループを持つだけでなく、階層を形成することもできます。

税金

税金を追加するには、まず税金グループを指定する必要があります。 税率ごとに1つの税金グループしか必要ありません。 0%を除いて、しばしば免除される、0%ではなく、被験者を区別する必要があります。 を選択します。このモデルには、namecountry の2つの必須フィールドのみがあります。 data/template/account.tax.group-xx.csv ファイルを作成し、グループを一覧表示します。

これで、 data/template/account.tax-xx.csv ファイルから税金を追加できます。 購入/販売であることを最初に定義した税は、製品のデフォルトの購入/販売税にもなります。

税レポート

Enterprise feature

税レポートは、 Invoicing (account) アプリで宣言されていますが、 Accounting (account_accountant) がインストールされている場合にのみアクセスできます。

前のセクションでは、 invoice_repartition_line_ids または refund_repartition_line_ids の項目に気づき、おそらくそれらについて何も理解していないでしょう。 良いお知らせ:あなたはこの不明瞭さについて一人ではありません。悪いニュース:あなたは少しそれを理解する必要があります。トピックは複雑です。確かに:

accounting_localization/tax_report.dot
> Graph not rendered because `dot` is not installed

The simple version is that, in the tax template, you indicate in the invoice/refund repartition lines whether the base or a percentage of the tax needs to be reported in which report line (through the minus/plus_report_line_ids fields). It becomes clear also when you check the tax configuration in the Odoo interface (or check the docs Tax References, Tax Repartition References).

したがって、税金を適切に設定したら、 data/account_tax_report_data を追加する必要があります。 `account.report`のレコードを含むml`ファイル。 税レポートと見なされるには、`root_report_id を正しく指定する必要があります。

<odoo>
    <record id="tax_report" model="account.report">
        <field name="name">Tax Report</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.XX"/>
    </record>

    ...
</odoo>

char@@0char@@1char@@2char@@3char@@4char@@5char@@6char@@7char@@8char@@9char@@10

会計ポジション

data/template/account.fiscal.position-xx.csv ファイルで会計位置を指定します。

最終ステップ

最後に、デモ会社を追加することができますので、ローカライズはデモモードで簡単にテストできます。

会計レポート

Enterprise feature

関連項目

レポーティング

会計レポートは別のモジュール l10n_XX_reports を介して追加する必要があります。これは enterial repository に移動します。

Basic :file:`__manifest__.py`ファイルは以下のようになります:

{
    "name": "COUNTRY - Accounting Reports",
    "category": "Accounting/Localizations/Reporting",
    "version": "1.0.0",
    "license": "OEEL-1",
    "depends": [
        "l10n_XX", "account_reports"
    ],
    "data": [
        "data/balance_sheet.xml",
        "data/profit_and_loss.xml",
    ],
    "auto_install": True,
}

財務報告の機能概要はここにあります: レポーティング

いくつかの良い例:

ここでフィールドの意味を確認できます:

If you gave a root_report_id to your report, it is now available in its variant selector. If not, you still need to add a menu item for it. A default menu item can be created from the form view of the report by clicking on Actions ‣ Create Menu Item. You will then need to refresh the page to see it. Alternatively, to create a dedicated section for a totally new report in the Reporting menu, you need to create a new ir.ui.menu record (usually in the main l10n_XX module) and a new ir.actions.client (usually in the new report XML file) that calls the account.report with the new report id. Then, set the new menu as parent_id field in the action model.