Payroll Rule Tag
payroll_rule_tag · OCA/payroll
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
HrSalaryRuleTag— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
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.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_salary_rule_view_form |
hr.salary.rule | form | Inherits payroll.hr_salary_rule_view_form | |
hr_salary_rule_view_search |
hr.salary.rule | search | Inherits payroll.hr_salary_rule_view_search | |
hr_salary_rule_view_tree_add_tags |
hr.salary.rule | tree | Inherits payroll.hr_salary_rule_view_tree_children | |
view_hr_salary_rule_tag_form |
hr.salary.rule.tag.form | hr.salary.rule.tag | form | New |
view_hr_salary_rule_tag_kanban |
hr.salary.rule.tag.kanban | hr.salary.rule.tag | kanban | New |
view_hr_salary_rule_tag_list |
hr.salary.rule.tag.list | hr.salary.rule.tag | list | New |
view_hr_salary_rule_tag_search |
hr.salary.rule.tag.search | hr.salary.rule.tag | search | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
No new fields.
Public methods (0)No public methods.
-
tag_idsMany2many → hr.salary.rule.tagdomain="[('company_id', 'in', [company_id, False])]"help='Tags to categorize this salary rule for reporting and calculations'string='Tags' args: 'hr.salary.rule.tag'
No public methods.
-
activeBooleandefault=Truehelp='If unchecked, this tag will be hidden from most views without being deleted.' -
codeCharcompute='_compute_code'help='Identifier salary rules use to read the tag total (tags.CODE). Proposed from the name when empty: uppercase, with anything that is not a letter, a number or an underscore replaced by an underscore.'precompute=Truereadonly=Falserequired=Truestore=True -
colorIntegerstring='Color Index' -
company_idMany2one → res.companydefault=<expr>help='Company to which this tag belongs'required=Truestring='Company' args: 'res.company' -
descriptionTexthelp='Describe the purpose of this tag and how it should be used in salary calculations.'translate=True -
nameCharrequired=Truetranslate=True -
salary_rules_countIntegercompute='_compute_salary_rules_count'help='Number of salary rules using this tag'store=Truestring='# Rules' -
salary_rules_idsMany2many → hr.salary.rulehelp='Salary rules that use this tag'string='Salary Rules' args: 'hr.salary.rule' -
sequenceIntegerdefault=10help='Used to order tags in views'
-
get_tag_code(self)Return the code to use in salary rule computations.