Skip to main content
Odoo Community Association

Payroll Rule Tag

Beta License: LGPL-3 OCA/payroll Translate me on Weblate Try me on Runboat

Assign tags to Salary Rules.

Tag totals are made available to salary rule computations, and work as a more flexible alternative to salary rule Categories: a rule belongs to a single Category, but it can carry any number of Tags, and tags are free to overlap.

A typical use is grouping rules into calculation bases, such as “Taxable”, “Social Security” or “Benefits”, and then computing each base as the total of the rules carrying that tag, instead of repeating a list of rule codes in every formula.

Table of contents

Configuration

Salary rule Tags can be defined from the Payroll / Configuration menu, and are assigned to Salary Rules using the “Tags” field in the Computation form area.

Each tag has:

  • a Name, used as the tag label,

  • a Code, the identifier salary rules use to read the tag total (tags.<CODE>). It is required, and proposed from the name while it is empty: the name in uppercase, with anything that is not a letter, a number or an underscore replaced by an underscore (so “Taxable Income” gives TAXABLE_INCOME). Renaming a tag keeps its code,

  • a Company, since tags are company specific,

  • a Sequence and a Color, used for ordering and display only.

The code is unique per company, otherwise salary rules would not be able to tell the totals apart. The name is free text.

Usage

On the Salary Rules form, one or more tags can be selected and assigned to the rule, on the “Tags” field.

In salary rules with Python code, totals for a tag can be accessed using the tags browsable collection, with the tag code:

result = tags.TAXABLE

The code is the tag’s Code field, or the tag name in uppercase when no code is set. An unknown code evaluates to 0.0, as for the other browsable collections.

As with salary rule Categories, a tag total only aggregates the rules that were computed before the rule reading it, so the rule computing a tag total must have a higher sequence than the rules it is meant to sum up.

Amounts are added to the tag with the same value used for the salary rule Categories, that is the line total (quantity x rate x amount), not the unit amount.

Known issues / Roadmap

  • hr.payslip.line inherits the Tags field from hr.salary.rule, but no view exposes it on payslip lines yet. Reporting payslip lines grouped by tag would be a natural next step.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Daniel Reis

  • Nimarosa

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

dreispt nimarosa

This module is part of the OCA/payroll project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo-addon-payroll-rule-tag 18.0.1.0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-payroll-rule-tag 18.0.1.0.0.6
File Interpreter ABI Platform Actions
odoo_addon_payroll_rule_tag-18.0.1.0.0.6-py3-none-any.whl Python 3 none any Details for odoo_addon_payroll_rule_tag-18.0.1.0.0.6-py3-none-any.whl

Release files / odoo_addon_payroll_rule_tag-18.0.1.0.0.6-py3-none-any.whl

Download URL odoo_addon_payroll_rule_tag-18.0.1.0.0.6-py3-none-any.whl
Size 44.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16162128c54913b9188aeec19643ac60362d9f0c2cacc1886a58ace3ee83464f
BLAKE2b-256 checksum
How to use checksums
fc5e96cd00dfd81dd20eede950ac0208a06c30e6069ab3e948595be31bf6d35b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for odoo-addon-payroll-rule-tag 18.0.1.0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page