Skip to content

[18.0][FIX] hr_employee_calendar_planning: test only the field the module adds - #1672

Open
carlosdauden wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-FIX-hr_employee_calendar_planning-test_read_employees
Open

carlosdauden wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-FIX-hr_employee_calendar_planning-test_read_employees

Conversation

@carlosdauden

Copy link
Copy Markdown
Contributor

The test added in db5518f (test_read_employees_internal_user) reads all the fields of an employee as an internal user, so it fails in any database where another module adds a field to hr.employee that is not on hr.employee.public. For example mail_tracking (failed_message_ids) or base_search_mail_content (message_content) on mail.thread: "The fields message_content,failed_message_ids, which you are trying to read, are not available for employee public profiles".

The test now checks only that calendar_ids is not among the fields an internal user reads without explicit fields, which is what this module is responsible for. Checked on clean databases: it passes with and without mail_tracking and base_search_mail_content, and it still fails if the groups on calendar_ids is removed.

@Tecnativa
ping @sergio-teruel @victoralmau

test_read_employees_internal_user read all the fields of an employee as an internal user, so it failed whenever another installed module adds a field to hr.employee that is not on hr.employee.public, e.g. mail_tracking (failed_message_ids) or base_search_mail_content (message_content) on mail.thread: "The fields message_content,failed_message_ids, which you are trying to read, are not available for employee public profiles".

Check instead that calendar_ids is not among the fields an internal user reads without explicit fields, which is what this module is responsible for. It still fails without the groups on calendar_ids.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @pedrobaeza, @victoralmau,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:hr_employee_calendar_planning Module hr_employee_calendar_planning labels Nov 13, 2026

@victoralmau victoralmau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this has been fixed at #1667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:hr_employee_calendar_planning Module hr_employee_calendar_planning series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants