---
title: "Accounting"
description: "Księga główna i raporty. Każda aplikacja jest modułem na jednym modelu danych."
canonical: "https://obop.dev/pl/apps/accounting/"
lang: "pl"
---

# Accounting

## Do czego służy

A chart of accounts, journals, tax rates, journal entries with debit and credit lines, fiscal periods and bank statement lines. Nothing is computed for you: balancing and tax amounts are the responsibility of whoever enters them. Posting and closing need approval.

## Co pakiet robi, a czego nie robi

Chart of accounts, journals, tax rates, journal entries with debit and credit lines, fiscal years and periods, and bank statement lines. Amounts are money fields in minor currency units and tax rates are numbers in basis points (2000 means 20.00 percent). Nothing is computed: balancing of debits and credits, tax amounts and entry numbers are the responsibility of whoever enters them. Posting an entry and closing a period or fiscal year need a human approval and the stricter accounting.approver group; agents may only propose them.

## Modele

### `accounting_account`

An account of the chart of accounts

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.manager`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `code` | text | `none` | nie | `accounting.user` | jawnie | Account code as used in the chart, for example 400000 |
| `name` | text | `none` | nie | `accounting.user` | jawnie | Account name, for example Trade receivables |
| `account_type` | select (asset_receivable, asset_cash, asset_current, asset_fixed, liability_payable, liability_current, liability_non_current, equity, income, income_other, expense, expense_direct_cost) | `none` | nie | `accounting.user` | jawnie | Type of account: asset_receivable, asset_cash, asset_current, asset_fixed, liability_payable, liability_current, liability_non_current, equity, income, income_other, expense, expense_direct_cost |
| `reconcile` | bool | `none` | nie | `accounting.user` | jawnie | Whether open items on this account can be reconciled (receivable, payable, bank clearing) |
| `deprecated` | bool | `none` | nie | `accounting.user` | jawnie | Whether the account is closed to new postings |
| `note` | longtext | `none` | nie | `accounting.user` | jawnie | Internal remarks about how the account is used |

### `accounting_journal`

A journal that groups entries of one kind (sales, purchases, bank, cash, miscellaneous)

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.manager`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nie | `accounting.user` | jawnie | Journal name, for example Customer invoices |
| `code` | text | `none` | nie | `accounting.user` | jawnie | Short code used in entry numbers, for example INV |
| `kind` | select (sale, purchase, cash, bank, general) | `none` | nie | `accounting.user` | jawnie | What the journal records: sale, purchase, cash, bank, general |
| `default_account_id` | ref → accounting_account | `none` | nie | `accounting.user` | jawnie | Default account for entries of this journal (the bank account for a bank journal) |
| `currency` | text | `none` | nie | `accounting.user` | jawnie | ISO 4217 currency code of the journal, for example EUR; empty means the company currency |
| `active` | bool | `none` | nie | `accounting.user` | jawnie | Whether the journal can still receive entries |

### `accounting_tax`

A tax rate that entry lines can refer to

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.manager`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nie | `accounting.user` | jawnie | Tax name, for example VAT 20% sales |
| `rate_bp` | number | `none` | nie | `accounting.user` | jawnie | Rate in basis points: 2000 means 20.00 percent, 550 means 5.50 percent |
| `scope` | select (sales, purchases, none) | `none` | nie | `accounting.user` | jawnie | Where the tax applies: sales, purchases, none |
| `price_included` | bool | `none` | nie | `accounting.user` | jawnie | Whether prices already include this tax |
| `tax_account_id` | ref → accounting_account | `none` | nie | `accounting.user` | jawnie | Account the tax amount is booked on |
| `active` | bool | `none` | nie | `accounting.user` | jawnie | Whether the tax can still be chosen on new lines |

### `accounting_fiscal_year`

A fiscal year, opened and closed as a whole

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.manager`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `name` | text | `none` | nie | `accounting.user` | jawnie | Fiscal year name, for example FY2026 |
| `start_on` | date | `none` | nie | `accounting.user` | jawnie | First day of the fiscal year (YYYY-MM-DD) |
| `end_on` | date | `none` | nie | `accounting.user` | jawnie | Last day of the fiscal year (YYYY-MM-DD) |
| `state` | select (open, closed) | `none` | nie | `accounting.user` | jawnie | Fiscal year status: open, closed |

### `accounting_period`

An accounting period (normally a month) inside a fiscal year

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.manager`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `fiscal_year_id` | ref → accounting_fiscal_year | `none` | nie | `accounting.user` | jawnie | The fiscal year the period belongs to |
| `name` | text | `none` | nie | `accounting.user` | jawnie | Period name, for example 2026-03 |
| `start_on` | date | `none` | nie | `accounting.user` | jawnie | First day of the period (YYYY-MM-DD) |
| `end_on` | date | `none` | nie | `accounting.user` | jawnie | Last day of the period (YYYY-MM-DD) |
| `state` | select (open, closed) | `none` | nie | `accounting.user` | jawnie | Period status: open, closed |

### `accounting_move`

A journal entry: a dated set of debit and credit lines in one journal

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.user`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `journal_id` | ref → accounting_journal | `none` | nie | `accounting.user` | jawnie | The journal the entry belongs to |
| `date` | date | `none` | nie | `accounting.user` | jawnie | Accounting date of the entry (YYYY-MM-DD) |
| `number` | text | `none` | nie | `accounting.user` | jawnie | Entry number such as INV/2026/0001. Free text: packages cannot generate sequences, so whoever posts the entry assigns the next number by hand and keeps the series gapless |
| `reference` | text | `none` | nie | `accounting.user` | jawnie | External reference, for example the supplier's invoice number |
| `partner_id` | ref → party | `none` | nie | `accounting.user` | jawnie | The contact the entry is about |
| `narration` | longtext | `none` | nie | `accounting.user` | jawnie | Free-text note about the entry |
| `state` | select (draft, posted, cancelled, reversed) | `none` | nie | `accounting.user` | jawnie | Entry status: draft, posted, cancelled, reversed |

### `accounting_move_line`

One debit or credit line of a journal entry

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.user`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `move_id` | ref → accounting_move | `none` | nie | `accounting.user` | jawnie | The journal entry the line belongs to |
| `account_id` | ref → accounting_account | `none` | nie | `accounting.user` | jawnie | The account the line is booked on |
| `partner_id` | ref → party | `none` | nie | `accounting.user` | jawnie | The contact the line is about |
| `label` | text | `none` | nie | `accounting.user` | jawnie | Line description |
| `debit` | money | `financial` | nie | `accounting.user` | wstrzymane | Debit amount in minor currency units; 0 when the line is a credit |
| `credit` | money | `financial` | nie | `accounting.user` | wstrzymane | Credit amount in minor currency units; 0 when the line is a debit |
| `tax_id` | ref → accounting_tax | `none` | nie | `accounting.user` | jawnie | Tax the line carries, if any |
| `due_on` | date | `none` | nie | `accounting.user` | jawnie | Due date for receivable and payable lines (YYYY-MM-DD) |
| `reconciled` | bool | `none` | nie | `accounting.user` | jawnie | Whether the line has been matched against a payment |

### `accounting_bank_statement_line`

A line of a bank statement waiting to be matched to entries

Grupa odczytu: `accounting.user`. Grupa zapisu: `accounting.user`.

| Pole | Rodzaj | Klasa danych | Dane osobowe | Grupa | Agenci widzą | Opis |
|---|---|---|---|---|---|---|
| `journal_id` | ref → accounting_journal | `none` | nie | `accounting.user` | jawnie | The bank journal the statement belongs to |
| `date` | date | `none` | nie | `accounting.user` | jawnie | Booking date at the bank (YYYY-MM-DD) |
| `label` | text | `none` | nie | `accounting.user` | jawnie | Payment reference or description as the bank reports it |
| `amount` | money | `financial` | nie | `accounting.user` | wstrzymane | Amount in minor currency units; positive for money in, negative for money out |
| `counterparty_name` | text | `financial` | tak | `accounting.user` | wstrzymane | Name of the payer or payee as the bank reports it |
| `counterparty_iban` | text | `financial` | tak | `accounting.user` | wstrzymane | Bank account of the payer or payee |
| `move_line_id` | ref → accounting_move_line | `none` | nie | `accounting.user` | jawnie | The entry line this statement line was matched to |
| `state` | select (unmatched, matched, reconciled) | `none` | nie | `accounting.user` | jawnie | Matching status: unmatched, matched, reconciled |

## Przepływy pracy

### `accounting_fiscal_year`

| Akcja | Przenosi | Kto może uruchomić | Zatwierdzenie |
|---|---|---|---|
| `accounting_fiscal_year.close` | state: open → closed | `accounting.approver` | tak |
| `accounting_fiscal_year.reopen` | state: closed → open | `accounting.approver` | tak |

### `accounting_period`

| Akcja | Przenosi | Kto może uruchomić | Zatwierdzenie |
|---|---|---|---|
| `accounting_period.close` | state: open → closed | `accounting.approver` | tak |
| `accounting_period.reopen` | state: closed → open | `accounting.approver` | tak |

### `accounting_move`

| Akcja | Przenosi | Kto może uruchomić | Zatwierdzenie |
|---|---|---|---|
| `accounting_move.post` | state: draft → posted | `accounting.approver` | tak |
| `accounting_move.cancel` | state: draft → cancelled | `accounting.user` | nie |
| `accounting_move.reverse` | state: posted → reversed | `accounting.approver` | tak |

### `accounting_bank_statement_line`

| Akcja | Przenosi | Kto może uruchomić | Zatwierdzenie |
|---|---|---|---|
| `accounting_bank_statement_line.match` | state: unmatched → matched | `accounting.user` | nie |
| `accounting_bank_statement_line.reconcile` | state: matched → reconciled | `accounting.manager` | nie |
| `accounting_bank_statement_line.unmatch` | state: matched → unmatched | `accounting.user` | nie |

## Grupy uprawnień

Grupy używane przez tę aplikację:

- `accounting.approver`
- `accounting.manager`
- `accounting.user`

## Kroki zatwierdzania

Kroki, które agent może tylko zaproponować:

- `accounting_fiscal_year.close`
- `accounting_fiscal_year.reopen`
- `accounting_period.close`
- `accounting_period.reopen`
- `accounting_move.post`
- `accounting_move.reverse`

## Co agenci mogą, a czego nie mogą

Agent może odczytywać, wyszukiwać, tworzyć i aktualizować rekordy tej aplikacji oraz uruchamiać akcje niewymagające zatwierdzenia, w ramach grup uprawnień swojego tokenu.

Te kroki może tylko zaproponować, a człowiek musi je zatwierdzić: `accounting_fiscal_year.close`, `accounting_fiscal_year.reopen`, `accounting_period.close`, `accounting_period.reopen`, `accounting_move.post`, `accounting_move.reverse`, `accounting_account.delete`, `accounting_journal.delete`, `accounting_tax.delete`, `accounting_fiscal_year.delete`, `accounting_period.delete`, `accounting_move.delete`, `accounting_move_line.delete`, `accounting_bank_statement_line.delete`.

Te pola są całkowicie wstrzymane i niedostępne dla agentów: `accounting_move_line.debit`, `accounting_move_line.credit`, `accounting_bank_statement_line.amount`, `accounting_bank_statement_line.counterparty_name`, `accounting_bank_statement_line.counterparty_iban`.

## Zależności

- `base`

## Instalacja

Zainstaluj ją w aplikacji Customize (Marketplace) lub z wiersza poleceń:

```bash
obop modules install-from accounting
```

Wymaga bazy danych i uprawnień administratora.

## Zbuduj własną

[Przewodnik po modułach pokazuje, jak pisze się takie aplikacje](/pl/docs/reference/module-manifest/)
