[20.0][REF] payroll: rename models to the payroll.* namespace #325
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.95) × (1 − Review Confidence (0.72)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.95 · 180317 lines diff across 142 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.46 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.400
Sensitive Paths
sensitive_paths
0.095
Mass File Touch
mass_file_touch
0.080
Real PR Conversation Timeline
4 items
The following commit authors need to sign the Contributor License Agreement:
h.apolinario.r@gmail.com
milan.topuzov@salewise.io
alexander@alexander.uz
hilarak@gmail.com
juanyadavilap@gmail.com
muhammad.ali2@arbisoft.com
<!-- CLA BOT SIGNING COMMENT DO NOT EDIT -->
Approved
LGTM!
Thanks for implementing this!
I also have a migration PR for the payroll_account module (#319), which depends on payroll.
@dreispt, would you also like to handle the payroll_account refactoring to align it with these changes? If so, feel free to do so, and I'll close my PR. Otherwise, once this PR is merged, I'll update payroll_account accordingly.
dreispt
Summary
Implements #324 .
Depends on and includes #313 (the 20.0 migration). This PR adds one commit on top of it.
The module's models use the same names as the Enterprise
hr_payrollmodels (hr.payslip,hr.salary.rule,hr.payroll.structure, ...). When both modules are installed, Odoo merges them into a single model/table, producing conflicting field definitions, silently overridden methods and mixed state machines — an installation that "works" at install time but is broken in practice.Renaming the models to a dedicated
payroll.namespace makes the two payroll engines fully independent and able to coexist on the same database (e.g. different companies using different engines).Renamed models
| Old name | New name |
|---|---|
|
hr.payslip|payroll.payslip||
hr.payslip.line|payroll.payslip.line||
hr.payslip.input|payroll.payslip.input||
hr.payslip.run|payroll.payslip.run||
hr.payslip.worked_days|payroll.payslip.worked_days||
hr.salary.rule|payroll.salary.rule||
hr.salary.rule.category|payroll.salary.rule.category||
hr.payroll.structure|payroll.structure||
hr.contribution.register|payroll.contribution.register||
hr.rule.input|payroll.rule.input||
hr.payslip.employees(wizard) |payroll.payslip.employees||
hr.payslip.change.state(wizard) |payroll.payslip.change.state||
payslip.lines.contribution.register(wizard) |payroll.lines.contribution.register|Report abstract models (
report.payroll.) are already namespaced and unchanged.Fields on community models
hr_payrollextends the same community models, so the fields this module adds are namespaced as well:| Model | Old field | New field |
|---|---|---|
|
hr.version|struct_id|payroll_struct_id||
hr.version|schedule_pay|payroll_schedule_pay||
hr.employee|slip_ids|payroll_slip_ids||
hr.employee|payslip_count|payroll_slip_count|Other changes
models/payroll_payslip.py,views/payroll_payslip_views.xml, ...)base_browsable, contribution register report)migrations/20.0.1.0.0/pre-migration.pyrenames models, tables and fields for existing databases (openupgradelib)Notes
payroll.*models — no group changes needed.Assisted-by: Devin:SWE-2 High