Time Accrual Policy
hr_policy_accrual · OCA/hr
-
Security25/25No findings
-
Activity0/25Last human commit 92 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 11.0: the workflow engine (`trg_validate`) was removed: rewrite as state-field transitions. migration-workflow-call · source
accr_policy_line_form_view— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceaccr_policy_line_tree_view— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). (2 occurrences in this file) migration-view-tree-tag · sourcehr_accrual_job— Class 'hr_accrual_job' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. (5 occurrences in this file) migration-old-api-base · sourcehr_accrual_job— Class 'hr_accrual_job' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. (6 occurrences in this file) migration-old-style-fields · sourcehr_accrual_policy_cron— Migrating to 18.0: `ir.cron` lost `numbercall`/`doall`: remove them from the record, data loading fails on unknown fields. migration-cron-numbercall · source- Since 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp`) (4 occurrences in this file) migration-openerp-import · 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
Define Time Accrual Policies
Define properties of a leave accrual policy. The accrued time is calculated based on the length of service of the employee. An additional premium may be added on the base rate based on additional months of service. This policy is ideal for annual leave accruals. If the type of accrual is 'Standard' time is accrued and withdrawn manually. However, if the type is 'Calendar' the time is accrued (and recorded) at a fixed frequency.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 6
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
accr_policy_line_form_view |
hr.policy.line.accrual.form | hr.policy.line.accrual | form | New |
accr_policy_line_tree_view |
hr.policy.line.accrual.tree | hr.policy.line.accrual | tree | New |
accr_policy_view_form |
hr.policy.accrual.form | hr.policy.accrual | form | New |
accr_policy_view_tree |
hr.policy.accrual.tree | hr.policy.accrual | tree | New |
accrual_line_job_form_view |
hr.policy.line.accrual.job.form | hr.policy.line.accrual.job | form | New |
policy_group_view_form |
hr.policy.group.form.accrinherit | hr.policy.group | form | Inherits hr_policy_group.policy_group_view_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
No new fields.
Public methods (2)-
holidays_refuse(self, cr, uid, ids, context=None) -
holidays_validate(self, cr, uid, ids, context=None)
No new fields.
Public methods (2)-
get_latest_policy(self, cr, uid, policy_group, dToday, context=None)Return an accrual policy with an effective date before dToday but greater than all the others -
try_calculate_accruals(self, cr, uid, context=None)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…