AGENT SKILL

odoo-hr-payroll-setup

Expert guide for Odoo HR and Payroll: salary structures, payslip rules, leave policies, employee contracts, and payroll journal entries.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 1
Forks
0

01 前言 Front Matter

name
odoo-hr-payroll-setup
risk
safe
source
self
description
Expert guide for Odoo HR and Payroll: salary structures, payslip rules, leave policies, employee contracts, and payroll journal entries.

03 SKILL.md 正文

Odoo HR & Payroll Setup

Overview

This skill guides HR managers and payroll accountants through setting up Odoo HR and Payroll correctly. It covers salary structure creation with Python-computed rules, time-off policies, employee contract types, and the payroll → accounting journal posting flow.

When to Use This Skill

  • Creating a salary structure with gross pay, deductions, and net pay.
  • Configuring annual leave, sick leave, and public holiday policies.
  • Troubleshooting incorrect payslip amounts or missing rule contributions.
  • Setting up the payroll journal to correctly post to accounting.

How It Works

  1. Activate: Mention @odoo-hr-payroll-setup and describe your payroll scenario.
  2. Configure: Receive step-by-step setup for salary rules and leave allocation.
  3. Debug: Paste a salary rule or payslip issue and receive a root cause analysis.

Examples

Example 1: Salary Structure with Deductions

Menu: Payroll → Configuration → Salary Structures → New

Name: US Employee Monthly
Payslip Code: MONTHLY

Rules (executed top-to-bottom — order matters):
  Code  | Name                   | Formula                        | Category
  ----- | ---------------------- | ------------------------------ | ---------
  BASIC | Basic Wage             | contract.wage                  | Basic
  GROSS | Gross                  | BASIC                          | Gross
  SS    | Social Security (6.2%) | -GROSS * 0.062                 | Deduction
  MED   | Medicare (1.45%)       | -GROSS * 0.0145                | Deduction
  FIT   | Federal Income Tax     | -GROSS * inputs.FIT_RATE.amount| Deduction
  NET   | Net Salary             | GROSS + SS + MED + FIT         | Net

Federal Income Tax: The standard Odoo US localization does not expose a single l10n_us_w4_rate field. Use an input (salary input type) to pass the withholding rate per employee, or install a community US payroll module (OCA l10n_us_hr_payroll) which handles W4 filing status properly.

Example 2: Configure a Time Off Type

Menu: Time Off → Configuration → Time Off Types → New

Name: Annual Leave / PTO
Approval: Time Off Officer
Leave Validation: Time Off Officer  (single approver)
  or: "Both" for HR + Manager double approval

Allocation:
  ☑ Employees can allocate time off themselves
  Requires approval: No

Negative Balance: Not allowed (employees cannot go negative)

Then create initial allocations:
Menu: Time Off → Managers → Allocations → New
  Employee: [Each employee]
  Time Off Type: Annual Leave / PTO
  Allocation: 15 days
  Validity: Jan 1 – Dec 31 [current year]

Example 3: Payroll Journal Entry Result

After validating a payroll batch, Odoo generates:

Debit   Salary Expense Account     $5,000.00
  Credit  Social Security Payable     $310.00
  Credit  Medicare Payable             $72.50
  Credit  Federal Tax Payable         (varies)
  Credit  Salary Payable           $4,617.50+

When net salary is paid:
Debit   Salary Payable            $4,617.50
  Credit  Bank Account              $4,617.50

Employer taxes (e.g., FUTA, SUTA) post as separate journal entries.

Best Practices

  • ✅ Do: Install your country's payroll localization (l10n_us_hr_payroll, l10n_mx_hr_payroll, etc.) before building custom rules — it provides pre-configured tax structures.
  • ✅ Do: Use salary rule inputs (inputs.ALLOWANCE.amount) to pass variable values (bonuses, allowances, withholding rates) rather than hardcoding them in the rule formula.
  • ✅ Do: Archive old salary structures rather than deleting them — active payslips reference their structure and will break if the structure is deleted.
  • ✅ Do: Always set an active Employee Contract with correct dates and salary before generating payslips.
  • ❌ Don't: Manually edit posted payslips — cancel and regenerate the payslip batch if corrections are needed.
  • ❌ Don't: Use contract.wage in deduction rules without verifying whether the structure is monthly or annual — always check the contract wage period.

Limitations

  • Odoo Payroll is Enterprise-only — the Community Edition does not include the Payroll module (hr_payroll).
  • US-specific compliance (W2, 941, state SUI/SDI filing) requires additional modules beyond the base localization; Odoo does not generate tax filings directly.
  • Does not cover multi-country payroll (employees in different countries require separate structures and localizations).
  • Expense reimbursements via payslip (e.g., mileage, home office) require a custom salary rule input and are not covered in standard HR Payroll documentation.

04 同仓库更多 Skills

YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

vercel-sandbox

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

slack

Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include "check my Slack", "what channels have unreads", "send a message to", "search Slack for", "extract from Slack", "find who said", or any task requiring programmatic Slack interaction.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

electron

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

dogfood

Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", "switch to --preset", and for building a design system or applying a DESIGN.md or brand spec to shadcn/ui.

★ 1