Daily updates from Odoo
Tuesday, June 2, 2026
14 changes · master
Resolved issues and error corrections
This update resolves a crash that could occur when signing salary contracts with a company car option in the configurator. The fix ensures the system handles different contract simulation settings correctly, preventing errors related to missing context information. This improves the stability of the payroll process for Belgian users.
Original PR description
Before this commit, signing a salary contract in the configurator with a company car selected could crash on the cp200_employees_salary_company_car (ATN.CAR) rule with KeyError('origin_version_id'), because the Belgian _get_period_contracts() accessed self.env.context['origin_version_id'] directly whenever salary_simulation was set, while hr_version_context injects salary_simulation=True without that key.
After this commit, the lookup uses .get() and falls back to the default behavior so the rule evaluates safely.
task-6240418
Forward-Port-Of: odoo/enterprise#118392This update fixes an issue where POS order payments incorrectly displayed negative amounts for customer balances. When a customer paid their account through a POS order, a negative 'pay_later' amount caused inaccurate calculations and inflated the 'Settle due amount' button. This ensures correct balance representation.
Original PR description
When a customer paid off their account balance through a POS order, a negative pay_later amount was used. The condition `if order_due:` in `_compute_customer_due_total` evaluated to True for negative values, causing `customer_due_total` and `init_customer_due_total` to be set to a negative amount. This made `pos_orders_amount_due` on the partner go negative, which in turn inflated `remainingDue` in the frontend (remainingDue = totalDue - posOrdersAmountDue), showing a wrong amount in the "Settle due amount" button. opw-6187771 Forward-Port-Of: odoo/enterprise#117813 Forward-Port-Of: odoo/enterprise#116394
This update fixes an issue where the Timesheet Assistant incorrectly suggested declined calendar events to users. The system now accurately includes events where the user is an attendee, regardless of their RSVP status, improving the assistant's usefulness and accuracy.
Original PR description
### Before this commit: The Timesheet Assistant would incorrectly suggest calendar events that the user had explicitly declined. Furthermore, the domain only retrieved events where the user was the organizer (`user_id`), completely missing events where the user was only an attendee. ### After this commit: The `get_calendar_events` getter in `_get_assistant_events_getters` is updated to: 1. Include events where the current user is an attendee by adding a condition on `partner_ids`. 2. Explicitly exclude events where the user's `calendar.attendee` status is 'declined'. Task-6222659 Forward-Port-Of: odoo/enterprise#117613
This update streamlines the calculation of offer fields related to employee contracts, preventing unnecessary recomputations and ensuring data consistency. Additionally, a recent change was corrected to properly handle payroll workflows, restoring expected behavior and preventing hidden fields.
Original PR description
**Problem:** Since this https://github.com/odoo/enterprise/pull/103846, `employee_version_id` depends on `contract_start_date` to adjust the employee state based on the contract date. This introduced…
**Problem:** Since this https://github.com/odoo/enterprise/pull/103846, `employee_version_id` depends on `contract_start_date` to adjust the employee state based on the contract date. This introduced an unnecessary dependency chain: ``` contract_start_date -> employee_version_id -> contract_template_id -> wages and other offer fields ``` As a result, updating `contract_start_date` invalidates and recomputes the whole chain, even when `employee_version_id` does not actually change. In addition, offer fields were coupled in a single compute, causing unrelated fields to be reset to template values when only one field required recomputation. **Fix:** - `contract_template_id` compute now depends on `employee_id` instead of `employee_version_id`, and directly uses the employee's `version_id`, breaking the chain while preserving default behavior. - The offer fields computations were also split to avoid unintended recomputations and field resets. - Simplified `_get_version` by always copying values from the template to the currently active version. --- **Additional fix:** The `is_hr_payroll` context flag is used to distinguish payroll vs recruitment flows when creating an offer with both `employee_id` and `applicant_id` unset. A recent change in [Task #6094737](https://www.odoo.com/odoo/project/1251/tasks/6094737) did not account for this flag, causing both fields to be hidden when opening the form from Payroll (a new feature added in saas-19.3). This is fixed by properly considering `is_hr_payroll`, restoring consistent behavior across all versions. Task: 6158245 Forward-Port-Of: odoo/enterprise#115408
This update corrects a naming inconsistency in the account reports testing suite. The test function `_check_vies_iap` has been renamed to `_check_vies_validity_iap` to align with recent changes made by the community. This ensures consistent and accurate testing of account reporting functionality.
Original PR description
See commit
This pull request fixes several issues related to field service notifications, reporting, and Gantt chart functionality. It now automatically sends intervention reports to customers upon completion, improves Gantt chart performance, and ensures accurate reporting of interventions.
Original PR description
## [FIX] web_gantt,planning: apply hasGroup before compute params Before this commit, some actions like drag and drop gantt pills are blocked for planning manager instead of being allowed only for…
## [FIX] web_gantt,planning: apply hasGroup before compute params Before this commit, some actions like drag and drop gantt pills are blocked for planning manager instead of being allowed only for them. The reason is because the compute params is something made before checking if the user is a planning manager and so the system will consider the user is not a planning manager. The compute params is something made before because the methods are executed inside 2 distincts onWillStart hook and so OWL framework cannot know one hook depends on the other one. This commit creates a method `onWillStart` in the main gantt controller to be able to override it and be able to wait a rpc before processing the compute params. ## [FIX] planning_field_service_sale_timesheet: don't count unscheduled intervention This commit filters the interventions counted to display the field service stat button in the form view of Sale Order. Now the intervention unscheduled will no longer be counted and also the one linked to plannable SOL. ## [FIX] planning_field_service: send email to customer when intervention published Before this commit, the template "Field Service Scheduled" was unsused. This commit uses that template to send an email to the customer once the intervention is scheduled. ## [FIX] planning_field_service: send report when intervention completed and signed Before this commit, the customer signs the intervention completed and does not received any email with the intervention report. He has to create an account in the DB as portal user to be able to see his intervention or ask to contact person to send him the report by mail. This commit will automatically send the intervention report by mail to the customer once the intervention is completed and signed by the customer. ## [FIX] planning_field_service: fix label and record_name in email sent for Field service Before this commit, the button sent to the customer to see the intervention is `View Planning Slot` and the record name used inside the same email is the display name which is not useful for the customer. This commit changes the label of the button displayed to see `View Report` and change the record_name to show `Field Service - <intervention date>` as shown in the portal view. ## [FIX] planning_field_service: no login required to access to intervention Before this commit, the customer cannot access to the intervention without begin log in even if he has the access token. This commit changes the route access to let the user access to the intervention completed and he can also sign it. ## [FIX] planning: hide duplicated name field in kanban displayed in gantt This commit hides the duplicated name field displayed in the popover of the gantt view in the planning.slot model. ## [FIX] planning_field_service: rename module name This commit renames the module to call it `Field Service` instead of `Planning - Field Service`. ## [FIX] worksheet: only show property warning message in mobile ## [FIX] planning: define employee_public_ids field in planning.slot Before this commit, when a planning user goes to a shift he will see Assign to me button on a shift assigned to another human resource which is normally not allowed. The reason because the button is visible is because `employee_ids` field is always empty for users who are not HR user. This commit adds `employee_public_ids` field which is also a computed field non stored to get the employee for the user who is not a HR user. ## [FIX] planning_field_service: always compute break_time This commit removes the default value on break_time field to always trigger the compute of that field, the reason is because by default the allocated_hours computed when we create a shift, will not always cover the whole duration of the shift, the allocated hours of the shift is computed based on the working schedule of the shift and so the break_time field has to be computed afterwards to make sure the break time is correctly set instead of having 0 by default when we create a shift. task-6060493 Forward-Port-Of: odoo/enterprise#118780 Forward-Port-Of: odoo/enterprise#112420
This update fixes a usability issue within the Timesheet Assistant by opening internal links in a modal window. This keeps users within the Timesheets Assistant menu, providing a smoother and more intuitive experience when navigating related information. It addresses a minor inconvenience for users managing their timesheets.
Original PR description
This commit opens the internal links in the custom form view displayed in the timesheet assistant inside a modal to stay in Timesheets Assistant menu. task-[6132392](https://www.odoo.com/odoo/project/4105/tasks/6132392) Forward-Port-Of: odoo/enterprise#118277 Forward-Port-Of: odoo/enterprise#114596
This update fixes an issue where the expected hours displayed in the attendance Gantt view didn't accurately reflect flexible work schedules, particularly when users' browsers were set to non-UTC timezones. The fix ensures accurate hour calculations based on the user's local timezone, improving the reliability of attendance reporting.
Original PR description
Steps to reproduce: 1. Ensure your browser is in a non-UTC timezone (e.g. Europe/Zurich) 2. Set an employee to have a flexible working schedule 3. Enter the Attendances app 4. When hovering over the employee in the gantt view, the expected hours do not match their working schedule When we calculate the expected hours for the Gantt view in attendances, we calculate this based on an incorrect number of attendance intervals given from _attendance_intervals_batch(). To ensure that we recieve accurate intervals, we need to ensure that we calculate intervals based on the correct date range with respect to the browsers timezone, instead of the UTC date range. [opw-6175441](https://www.odoo.com/odoo/my-tasks/6175441?debug=assets) Forward-Port-Of: odoo/enterprise#118729 Forward-Port-Of: odoo/enterprise#116807
This update resolves a critical issue with our SUNAT-compliant delivery guides. A new requirement from the tax authority necessitates including a 'carrier handover date,' and previously, guides without this data were rejected. We've updated the module to automatically include this date when applicable, ensuring compliance and preventing errors.
Original PR description
SUNAT R. S. N° 000108-2026/SUNAT and the GRE validation rules published on 2026-06-01 add field 34 "Fecha de entrega de bienes al transportista" (cac:LoadingTransportEvent/cbc:OccurrenceDate). It is required, and rejected with error 3617 when absent, only when the transport modality is '01' (public transport). Enforcement started 2026-06-01, so affected customers can no longer submit their delivery guides.
In our implementation the departure start date is equivalent to this date, so we reuse it instead of adding a new field. The node is gated to public transport to match the validation rule and avoid emitting it on private transport ('02') guides.
Because the new node only ships with this module version, customers on an older version keep hitting error 3617 from SUNAT. Detect that code in the SUNAT response and store an actionable message asking the user to update the module, instead of surfacing the raw rejection.
task-6266662
Forward-Port-Of: odoo/enterprise#119038This update clarifies the 'invalid_scope' error message, which previously wasn't clear enough for users. The change ensures users understand why consent couldn't be granted for a specific company, improving the user experience and reducing confusion.
Original PR description
The invalid_scope error message means the user doesn't hav the legal rights to give consent for the given company. But the error message is not clear enough. This commit improve the error message clarity. task-6144883 Forward-Port-Of: odoo/enterprise#115650
This update fixes an issue where subscription products with one-time purchase options were incorrectly displaying recurring subscription prices in the product configurator. Now, the configurator accurately shows the one-time price when this option is selected, ensuring accurate pricing for subscription orders across the website and backend.
Original PR description
Version 19.1 steps to reproduce: - open sales and open a subscription product. enable accept one time and add another subscription product as an optional product. - open the website product page, select the one time price, and click add to cart. issue: when a subscription product that allows one time purchase is added to the cart or to a subscription order, the product configurator wizard was showing the recurring subscription price instead of the one time price. this issue was present both on the website frontend and in the backend subscription module. fix: the product configurator wizard now correctly shows the one time price when the accept one time option is selected, both on the website frontend and in the backend subscription flow. task: 6126684. Forward-Port-Of: odoo/enterprise#114862
This update fixes a minor issue in the DMFA report where the 'Calculation Basis' and 'Contribution Type' headers were incorrectly switched. The headers have now been corrected to their proper order, ensuring accurate reporting for payroll calculations. This ensures data consistency and reliability for financial reporting.
Original PR description
DMFA report had "Calculation Basis" and "Contribution Type" header switched. Got switched back correctly. task-6227590 Forward-Port-Of: odoo/enterprise#117740
This update fixes a bug that caused errors when date calculations involved missing or `None` offset values. The change ensures that date calculations are accurate by defaulting the offset to 0 when it's not provided, preventing unintended date movements.
Original PR description
Currently, an exception is raised when `offset` is `None` and is compared
with `MIN_OFFSET` or `MAX_OFFSET`.
Currently `offset = op.get("offset", 1)` to assign a default value of `1` when
the `offset` key was missing from `op`. However, this does not handle cases
where the `offset` key is present but its value is `None`.
This commit fixes the issue by defaulting `offset` to `0` when it is missing or
`None` in `op`. Using the default value ensures no date movement occurs
when `offset` is not explicitly provided.
Sentry-7448086997
Forward-Port-Of: odoo/enterprise#118466This update ensures Wijninckx contributions (code 867) are only processed in the final quarter of the year. The system now alerts users with a warning and prevents declarations outside of Q4, improving payroll accuracy and compliance with Belgian regulations. This change addresses a potential issue related to ONSS reporting.
Original PR description
The Wijninckx contribution (code 867) should only be declared on the last quarter of the year. This commit introduces a restriction to ensure this: - Triggers a UserError in the DMFA if the code 867 is used in a declaration outside of Q4. - Adds a python-based payslip warning if the `ONSSWIJNINCKX` salary rule is applied to a payslip from January to September. Task Id: 6267562