Splitting Salaries by Cost Center & Location in Odoo

Payroll Cost Allocation in Odoo

Managing payroll is not just about paying employees on time. For many organisations, especially those running multiple projects or operating across different locations, it’s critical to allocate payroll costs accurately. Without automation, finance teams often spend hours manually splitting salaries, bonuses, and End of Service Benefits (EOSB) across cost centers.

In this article, we’ll show how Odoo’s Analytic Distribution feature makes payroll cost allocation simple, automated, and accurate.

Business Requirement

Organisations often face these challenges:

  • Employees can be assigned to multiple analytic accounts (cost centers).
  • Each assignment requires a percentage-based split for accounting.
  • During payroll (payslips, bonuses, EOSB), accounting entries should be created per analytic account (cost center).
  • If distributions differ across employees in the same payroll group, separate journal entries must be generated.

In short, the finance team needs payroll costs to be distributed automatically and transparently for accurate reporting and compliance.

Odoo’s Approach: Analytic Distribution

Odoo provides the standard Analytic Distribution functionality. Instead of creating a custom model, we leverage the default.

Key fields and setup:

Field Name Type Description
account.analytic.distribution account.account Stores analytic accounts and their percentage allocation.
distribution JSON field Defines multiple cost centers with percentages.

This means HR managers can configure analytic distributions directly for employees or salary rules, ensuring split accounting is always applied correctly.

Functional Flow

Assign Distribution
  • The HR manager assigns analytic account (cost center) distribution to employees or salary rules.
  • Example: Employee A - 70% Cost Center 1, 30% Cost Center 2.
Payroll / Bonus / EOSB Processing
  • The system fetches analytic distribution from the employee or salary rule.
  • For each payslip line or bonus line, the system splits the amount according to the defined percentages.
  • Amounts are grouped by analytic account (cost center).
Journal Entries
  • Debit and Credit lines are created separately for each analytic distribution.
  • Ensures reporting by cost center.
Example

Let’s say an employee’s net salary is 10,000 AED, with a distribution of 70% to Cost Center 1 and 30% to Cost Center 2.

Generated Journal Lines:

  • Debit: 7,000 AED - Cost Center 1
  • Debit: 3,000 AED - Cost Center 2
  • Credit: 10,000 AED - Salary Payable (no distribution applied here)

Technical Implementation

For teams interested in the technical setup, here’s a simplified view of how Odoo handles the distribution:


for line in payslip.line_ids:
    if line.salary_rule_id.analytic_distribution:
        distribution = line.salary_rule_id.analytic_distribution
    else:
        distribution = line.employee_id.analytic_distribution
    for analytic_account, percentage in distribution.items():
        split_amount = line.total * percentage / 100
        move_line_vals.append({
            "name": line.name,
            "debit": split_amount if line.total > 0 else 0.0,
            "credit": -split_amount if line.total < 0 else 0.0,
            "analytic_account_id": int(analytic_account),
        })

Before journal entry creation, amounts are aggregated by analytic_account_id. This prevents duplicate move lines for the same split.

Benefits of Payroll Cost Splitting

By leveraging Odoo’s native functionality, organisations can achieve:

  • Accurate allocation of payroll across multiple projects/locations.
  • Compatibility with standard accounting through Odoo’s native analytic distribution.
  • Reduced manual adjustments, saving HR and finance teams time.
  • Improved visibility into project or departmental costs.

Splitting payroll across cost centers and locations is easy with Odoo. By using Analytic Distribution, organisations ensure accuracy, automation, and compliance in their payroll accounting process.

We work with Odoo every day.

Check out our blog for more guides and how-to articles about Odoo.

View more articles
تسجيل الدخول حتى تترك تعليقاً
Auto-Remove Cancelled Pickings in Odoo Batch Transfers