Payroll Accounting Integration

Automate journal entries from payslips and payments

The Payroll Accounting module is the integration layer between Payroll and Accounting, helping convert salary data into automatic journal entries.

The module adds Salary Journal to salary structures, accounting accounts for each Salary Rule, and supports direct salary payments from payslips.

Accounting Integration
Journal Entries
Reconciliation
Payment Register
Batch Processing

Key Features

Key points

  • Automatically create journal entries from payslip/pay run upon confirmation

  • Configure Salary Journal on salary structure to define the journal

  • Set up Debit/Credit accounts for each Salary Rule

  • Pay salaries directly from payslip using Payment Register

  • Support batch move lines by company (Batch Payroll Move Lines)

  • Reverse link between payslip/pay run and journal entry

  • Analytic Distribution for salary expenses

  • Support Tax Grids on journal entry lines


Accounting Terminology

FieldsTrường dữ liệuDescription
Salary JournalSổ nhật ký lươngAccounting journal used to record salary entries
Accounting EntryBút toán kế toánAccounting document created from payslip
Move StateTrạng thái bút toánDraft, Posted, or Cancel
Debit AccountTài khoản ghi NợDebit side account in journal entry
Credit AccountTài khoản ghi CóCredit side account in journal entry
ReconciliationĐối soátProcess of matching accounting lines with payments
Payment RegisterĐăng ký thanh toánWizard to create payment document
Analytic DistributionPhân bổ phân tíchExpense allocation by analytical dimension (department, project)
Tax GridsThẻ thuếTax tags attached to journal entry lines
Batch Payroll Move LinesGộp dòng bút toán lươngCombine multiple payslips into fewer accounting lines

Journal Entry States

Journal Entry Status

StatusMeaningActions
DraftDraft entry, not yet postedCan edit, Post to finalize
PostedPosted to ledger, cannot editCan pay, Reset to Draft if needed
CancelCancelled, no longer validCannot use

Configure Salary Journal on Structure

Before running payroll, configure Salary Journal on salary structure to define which journal to use for entries.

Steps

  • 1. Go to Payroll → Configuration → Salary → Structures

  • 2. Open or create Structure to configure

  • 3. Fill in Salary Journal field (journal_id) - this is required

  • 4. Ensure journal currency matches company currency

  • 5. Save configuration


Configure Accounts on Salary Rule

Each Salary Rule needs Debit/Credit accounts so the system knows how to account for that salary component.

Steps

  • 1. Go to Payroll → Configuration → Salary → Rules

  • 2. Open rule to configure

  • 3. Go to Accounting tab

  • 4. Fill in Debit Account (account_debit): debit side account

  • 5. Fill in Credit Account (account_credit): credit side account

  • 6. Optional: configure Analytic Distribution, Tax Grids, Split on names, Set employee on account line

  • 7. Save configuration


Advanced Options on Salary Rule

Key points

  • Analytic Distribution: Allocate expenses by analytical dimension (department, project, branch)

  • Debit Tax Grids / Credit Tax Grids: Attach tax tags to Debit/Credit lines

  • Split on names: Split journal entry lines by employee name

  • Set employee on account line: Attach employee information to journal entry line

  • Excluded from Net: Exclude from Net calculation (not counted in net salary)


Create Journal Entry from Payslip

When confirming payslip, the system automatically creates journal entry based on Salary Rules configuration.

Steps

  • 1. Create and calculate payslip normally in Payroll

  • 2. Click Create Draft Entry (instead of regular Confirm)

  • 3. System changes payslip state and calls _action_create_account_move()

  • 4. Journal entry lines created from payslip line_ids via _prepare_slip_lines()

  • 5. If Debit/Credit mismatch, system adds Adjustment Entry line using journal default account

  • 6. move_id linked back to payslip (and pay run if batch enabled)

  • 7. Open Journal Entry from smart button on payslip to view details


Pay Salary from Journal Entry

After entry is Posted, you can pay salary directly from payslip.

Key points

  • Requirements: payslip not yet paid, entry posted, NET rule credit account must have reconcile=True

  • Employee bank account must be trusted (allow_out_payment)

  • Click Pay button on payslip to open Payment Register wizard

  • Wizard has hr_payroll_payment_register context for payroll-specific handling

  • After reconciling full residual, payslip automatically updates to state=paid and sets paid_date


Batch Payroll Move Lines

This option allows combining multiple payslips from same journal/period into fewer journal entry lines, reducing accounting line count.

Key points

  • Enabled: Combine multiple payslips into fewer lines, hide individual details

  • Disabled: Create details per payslip/rule, easier to trace individual employees

  • Trade-off: Batch reduces accounting lines but limits some individual payment operations

Steps

  • 1. Go to Settings → Payroll

  • 2. Enable Batch Account Move Lines option (batch_payroll_move_lines)

  • 3. Save configuration


Analytic Distribution on Employee

You can configure default Analytic Distribution on employee to automatically allocate salary expenses.

Key points

  • Open Employee form in Payroll

  • Fill in Analytic Distribution field

  • This distribution is used as fallback when rule has no specific analytic

  • Example: 100% to IT department, or 50% project A + 50% project B


Reverse Link from Journal Entry

From journal entry, you can open related payslip to view details.

Key points

  • Open Journal Entry in Accounting

  • Click Payslip stat button to open related payslip

  • Helps trace from accounting back to salary source


Handling Payslip Cancellation

When cancelling payslip with journal entry, system automatically handles related entry.

Key points

  • Module calls _unlink_or_reverse() on move_id before continuing original flow

  • Entry will be reversed or unlinked depending on status

  • Ensures consistency between Payroll and Accounting


Permissions and Control

Permission to view accounting features uses accounting groups.

Key points

  • account.group_account_readonly: View Journal Entry smart button

  • account.group_account_invoice: Execute Pay button

  • Payroll actions still follow Payroll permissions (group_hr_payroll_user, group_hr_payroll_manager)


Important Notes

Key points

  • action_payslip_done() creates journal entry immediately after confirming payslip

  • If structure missing journal_id, payslip will have warning

  • When batch_payroll_move_lines=True, employee_move_line is hidden on rule UI

  • On NET rule, not_computed_in_net affects how NET line is calculated when building entry

  • Tax lines (debit_tag_ids/credit_tag_ids) are pushed to move lines according to debit/credit accounts


Practical Tips

Key points

  • Standardize Salary Rules accounting before running first payroll period

  • Always check Journal Entry status (Draft/Posted) from payslip/pay run before payment

  • If accounting mismatch, debug in order: Rule account → Structure journal → NET rule reconcile → Bank trust

  • Only enable Batch Payroll Move Lines when company accepts lower accounting detail level

  • Use analytic_distribution consistently between rule and employee for correct expense reporting

  • Test with one payslip before batch processing to ensure correct configuration