[FIX] analytic_base_department: expose account_department_id in timesheets report - #951
Open
AuresTICConsultores wants to merge 1 commit into
Open
Conversation
AuresTICConsultores
force-pushed
the
fix/hr-timesheet-report-department-oca
branch
from
July 30, 2026 18:57
b989f22 to
8c6554e
Compare
…heets report analytic_base_department inserts account_department_id in the shared view analytic.view_account_analytic_line_filter. hr_timesheet has its own report view (hr_timesheet_report_search), a "primary" view on the SQL model timesheets.analysis.report that inherits its combined arch from that same shared view -- but that reporting model only exposes a subset of account.analytic.line's fields (it did not include account_department_id), so the view fails validating as soon as both modules are installed together (reproduced both on a clean install and on an -u against a real, already populated database). Fix: expose account_department_id also on timesheets.analysis.report (models/hr_timesheet_report.py), extending _select() the same way core hr_timesheet already does for department_id. Requires depending on hr_timesheet explicitly -- without it, analytic_base_department could load before hr_timesheet in the module graph, and this file's extension would never make it in time to prevent the failure. Adds a test that reads account_department_id back from timesheets.analysis.report, which fails before this fix (field does not exist on the model) and passes after.
AuresTICConsultores
force-pushed
the
fix/hr-timesheet-report-department-oca
branch
from
July 30, 2026 19:06
8c6554e to
7ac0370
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
analytic_base_department inserts account_department_id in the shared
view analytic.view_account_analytic_line_filter. hr_timesheet has its
own report view (hr_timesheet_report_search), a "primary" view on the
SQL model timesheets.analysis.report that inherits its combined arch
from that same shared view -- but that reporting model only exposes a
subset of account.analytic.line's fields (it did not include
account_department_id), so the view fails validating as soon as both
modules are installed together (reproduced both on a clean install and
on an -u against a real, already populated database).
Fix: expose account_department_id also on timesheets.analysis.report
(models/hr_timesheet_report.py), extending _select() the same way core
hr_timesheet already does for department_id. Requires depending on
hr_timesheet explicitly -- without it, analytic_base_department could
load before hr_timesheet in the module graph, and this file's
extension would never make it in time to prevent the failure.
Adds a test that reads account_department_id back from
timesheets.analysis.report, which fails before this fix (field does
not exist on the model) and passes after.