Friday, May 23, 2025
20 changes · 18.0
Enhancements to existing features
The Belgian chart of accounts now classifies selected payable and receivable accounts as current liabilities or current assets where that better matches their purpose. This improves the accuracy of financial reporting and helps businesses see these balances in the right accounting categories.
Original PR description
In this PR: - Changed the account types of some accounts from 'payable' to 'current liabilities' and from 'receivable' to 'current assets' to better reflect their nature task-4813704
Historical inventory valuation reports now show Quantity and Total Value by default instead of remaining quantities and values. This makes past valuation views more relevant and easier for users to interpret.
Original PR description
When viewing the valuation in the past, the default measures 'Remaining Qty' and 'Remaining Value' are irrelevant. Instead, display the 'Quantity' and 'Total Value' measures by default. opw-4517548
A new automated test checks that changes made to existing Point of Sale records are saved locally and still available after refreshing the system. This helps reduce the risk of losing recent POS updates during everyday use.
Original PR description
This commit adds a test case which ensures that updates in existing records are properly saved in local database and are available after refresh opw-4778516 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes how list view column widths are calculated when date or time formats include quoted text. Users should see more consistent column sizing in lists, avoiding layout issues caused by misread formatting rules.
Original PR description
This commit is a followup of odoo/odoo#210300 where we didn't correctly detect escaped parts (wrapped in single quotes) in date and time formats. This commit ensures that we first remove from the formats all escaped parts, before analysing those formats to detect patterns. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Previously the `state name` of partner is validating, but as per government API json schema `state tin number` is required. After this commit: - The validation now checks the state tin number instead of the state name, ensuring it is a valid and min 1 and max-2 digit number. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#211276 Forward-Port-Of: odoo/odoo#204495
Original PR description
Previously the `state name` of partner is validating, but as per government API json schema `state tin number` is required. After this commit: - The validation now checks the state tin number instead of the state name, ensuring it is a valid and min 1 and max-2 digit number. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#211276 Forward-Port-Of: odoo/odoo#204495
This fix makes restaurant loyalty reward checks wait for the needed information before continuing, preventing false test failures in automated validation. It helps keep the point of sale loyalty flow stable without changing normal business behavior for users.
Original PR description
Steps are triggered too quick on the runbot. 1- It was trying to render the reward button while computation was still ocurring, thus `coupon_id` wasn't set. > Use of the ? to avoid the traceback 2- It was trying to check for the price while the reward hadn't loaded yet. > Instead we check that the reward is there, we'll check the price at the end. runbot: 163072
This update improves Odoo's internal web testing tools so automated tests handle animations more reliably and produce clearer, less duplicated failure information. It helps teams diagnose test failures faster and reduces unnecessary noise in continuous integration logs.
Original PR description
This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures batch payments can include payments in all valid statuses, including paid payments when only the Invoicing app is installed. It also updates related tests so validation behaves correctly across different app setups.
Original PR description
* Previously, the domain only included payments in the "in_process" state, which is incorrect when only the Invoicing app is installed -paid payments should also be allowed-. * Test was failing with single app installed when accountant module was not installed. When only Invoicing, we can validate a batch payment even when payments are in paid state, so the Warning was not raised causing tests to fail.
This fix adjusts how employee legal names are calculated for Swiss payroll ELM transmissions. It helps ensure payroll submissions use the correct name format required in Switzerland, reducing the risk of reporting errors.
Original PR description
…o switzerland
Account 461411, set by default on the sales taxes in LU localization does not need to be reconcilable as only payables and receivables defined in tax groups have to be opw-4749885 Forward-Port-Of: odoo/odoo#211244 Forward-Port-Of: odoo/odoo#210613
Original PR description
Account 461411, set by default on the sales taxes in LU localization does not need to be reconcilable as only payables and receivables defined in tax groups have to be opw-4749885 Forward-Port-Of: odoo/odoo#211244 Forward-Port-Of: odoo/odoo#210613
Before fix, when a user manually added a narration (e.g. terms and conditions) on an invoice, changing the journal or other dependent fields (partner) would trigger a recompute of the narration field, which cleared the user-provided content. Steps to reproduce: ---- 1. Create a customer invoice. 2. Add custom narration (terms and conditions). 3. Change the journal or partner. → The narration field is reset and the manually-entered content is lost. After this commit: ---- The compute
Original PR description
Before fix, when a user manually added a narration (e.g. terms and conditions) on an invoice, changing the journal or other dependent fields (partner) would trigger a recompute of the narration field, which cleared the user-provided content. Steps to reproduce: ---- 1. Create a customer invoice. 2. Add custom narration (terms and conditions). 3. Change the journal or partner. → The narration field is reset and the manually-entered content is lost. After this commit: ---- The compute method for the narration field checks if narration already exists and preserves it, preventing loss of user input. ---- opw-4757119 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#210852
### Steps to reproduce: - In the settings enable Multi-Step routes - Unarchive the MTO route - Create a storable product using the MTO and buy route - Create and confirm a sale order for 100 units of that product - Validate the delivery for only 30 units and backorder the rest #### > The purchase order demand was updated to 170 units ### Cause of the issue: Processing the backorder wizard will create and confirm moves for the backorder picking: https://github.com/odoo/odoo/blob/a7
Original PR description
### Steps to reproduce: - In the settings enable Multi-Step routes - Unarchive the MTO route - Create a storable product using the MTO and buy route - Create and confirm a sale order for 100 units of…
### Steps to reproduce: - In the settings enable Multi-Step routes - Unarchive the MTO route - Create a storable product using the MTO and buy route - Create and confirm a sale order for 100 units of that product - Validate the delivery for only 30 units and backorder the rest #### > The purchase order demand was updated to 170 units ### Cause of the issue: Processing the backorder wizard will create and confirm moves for the backorder picking: https://github.com/odoo/odoo/blob/a71c0c7d1c3391beb1bf2939ae076a804a627dbd/addons/stock/models/stock_move.py#L1916-L1919 However, as these moves are `make_to_order` they are planned to create and run procurements in their respective `_action_confirm`'s: https://github.com/odoo/odoo/blob/a71c0c7d1c3391beb1bf2939ae076a804a627dbd/addons/stock/models/stock_move.py#L1379-L1388 opw-4633920 opw-4713650 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209924 Forward-Port-Of: odoo/odoo#209442
The system raised a `psycopg2.errors.UndefinedFunction` error when attempting to compute a `SUM` on a `timestamp field (create_date)` in gamification goals. This is because PostgreSQL does not support `SUM(timestamp)` — `SUM` can only be used with numeric types such as integer, float, or monetary. Steps to reproduce: --- - Install `Gamification` and `hr_appraisal` modules - Create a Gamification Challenge, and also create a Goal Definition and set `Computation Mode` -> `Sum`, `Model` -> `A
Original PR description
The system raised a `psycopg2.errors.UndefinedFunction` error when attempting to compute a `SUM` on a `timestamp field (create_date)` in gamification goals. This is because PostgreSQL does not…
The system raised a `psycopg2.errors.UndefinedFunction` error when attempting to compute a `SUM` on a `timestamp field (create_date)` in gamification goals. This is because PostgreSQL does not support `SUM(timestamp)` — `SUM` can only be used with numeric types such as integer, float, or monetary.
Steps to reproduce:
---
- Install `Gamification` and `hr_appraisal` modules
- Create a Gamification Challenge, and also create a Goal Definition and set `Computation Mode` -> `Sum`, `Model` -> `Appraisal Goal`, `Field to Sum` -> `Created on (Appraisal Goal)`, `Filter Domain` -> `[]`
- `Start Challenge` in Gamification Challenge
Traceback:
---
```
UndefinedFunction
function sum(timestamp without time zone) does not exist LINE 1: SELECT SUM("hr_appraisal_goal"."create_date") FROM "hr_appra...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
```
To fix this, we now check the field type before applying aggregation. If the computation mode is set to `sum` but the field is not numeric, we gracefully fallback to using `count` instead. This prevents SQL errors and ensures that goal computations remain reliable even with misconfigured definitions.
sentry-6575130734
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#208077The failing step is creating a new website, which could take a long time. Increasing the timeout for the next step should prevent the error. runbot-error-104332 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#210935 Forward-Port-Of: odoo/odoo#210121
Original PR description
The failing step is creating a new website, which could take a long time. Increasing the timeout for the next step should prevent the error. runbot-error-104332 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#210935 Forward-Port-Of: odoo/odoo#210121
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to 'Contract Signed' - Click on 'Create Employee' - Notice a validation error that the opertion cannot be completed ### Cause: This is happening as the 'Job applications' smart button has default value for the user_id in context https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95
Original PR description
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to…
### Steps to reproduce: - Navigate to Recruitment > Job Position > Any job position > Job applications (smart button) - Create an applicant - Set a Recruiter for the applicant - Move the stage to 'Contract Signed' - Click on 'Create Employee' - Notice a validation error that the opertion cannot be completed ### Cause: This is happening as the 'Job applications' smart button has default value for the user_id in context https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95236d6f045c30d64/addons/hr_recruitment/views/hr_job_views.xml#L207-L211 so when creating an employee it will add the missing fields from defaults and it will get the default value in the context which for an existing user so when creating the employee with this user_id it will trigger the sql constraint https://github.com/odoo/odoo/blob/889f25f1322f00dff7cacad95236d6f045c30d64/addons/hr/models/hr_employee.py#L145-L148 ### Fix: clean the context before creating the partner and the employee corresponding to this applicant opw-4629219 Forward-Port-Of: odoo/odoo#210806 Forward-Port-Of: odoo/odoo#204997
**Steps to reproduce:** 1. Go to definition of default_website and add `<field name="configurator_done" eval="True"/>` . 2. install website module. **Issue:** Users are incorrectly redirected to the configurator screen instead of the website page. However, refreshing the page correctly redirects to the home screen as the server-side route is triggered on reload. **Reason:** The issue started in Odoo 16. Until Odoo 15, redirection to the configurator route is handled using ir.actions.ac
Original PR description
**Steps to reproduce:** 1. Go to definition of default_website and add `<field name="configurator_done" eval="True"/>` . 2. install website module. **Issue:** Users are incorrectly redirected to the…
**Steps to reproduce:** 1. Go to definition of default_website and add `<field name="configurator_done" eval="True"/>` . 2. install website module. **Issue:** Users are incorrectly redirected to the configurator screen instead of the website page. However, refreshing the page correctly redirects to the home screen as the server-side route is triggered on reload. **Reason:** The issue started in Odoo 16. Until Odoo 15, redirection to the configurator route is handled using ir.actions.act_url, which triggered a full page reload, ensuring the server route executed. From Odoo 16 onwards, this action is removed, and a direct client action is attached. Within `configurator.js`, navigation is now handled using the `history.pushState` method which replace the current url and does not trigger a reload. As a result, even when navigating to the configurator route, the server route is not executed, leading to incorrect redirection. **Fix:** Added a check in configurator.js to verify the configurator status. If it is true, the user is redirected to the website page instead of the configurator. Otherwise, the normal configurator flow continues. **Key Changes:** 1. In configurator_init, added a check: if configurator_done is True, set the default theme using button_choose_theme and store its result (a dict containing the next action to execute) as redirect_url. 2. In the Configurator component, added redirect_url to the store, and inside the onWillStart method, checked if redirect_url exists. If it does, redirect to the home screen using doAction. This PR ensures the correct redirection behavior when users follow the Industries installation flow. task-4555467 Forward-Port-Of: odoo/odoo#197593
Speed up queries like in _check_uom_not_in_invoice Before: https://explain.dalibo.com/plan/dh442bag02518830 After: https://explain.dalibo.com/plan/db2ef078c8dd4ac0 From 12 seconds to .3ms 10 Millions account_ move_ line in the database Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#2
Original PR description
Speed up queries like in _check_uom_not_in_invoice Before: https://explain.dalibo.com/plan/dh442bag02518830 After: https://explain.dalibo.com/plan/db2ef078c8dd4ac0 From 12 seconds to .3ms 10 Millions account_ move_ line in the database Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#210981 Forward-Port-Of: odoo/odoo#208992
Scenario: - create an object_write (Update the Record) action - update a field with equation evaluation (Python expression) with an expression like "record.id" - click on "Create contextual action" - go to a list view of the model, execute the action for several records Result: the value of the field of all records are computed based on the first selected record. Issue: we don't change the "record" in the evaluation context and just keep the first record. Fix: changing the reco
Original PR description
Scenario: - create an object_write (Update the Record) action - update a field with equation evaluation (Python expression) with an expression like "record.id" - click on "Create contextual action" -…
Scenario:
- create an object_write (Update the Record) action
- update a field with equation evaluation (Python expression) with an
expression like "record.id"
- click on "Create contextual action"
- go to a list view of the model, execute the action for several records
Result: the value of the field of all records are computed based on the
first selected record.
Issue: we don't change the "record" in the evaluation context and just
keep the first record.
Fix: changing the record.
Note: without the fix, the added test fails because the city of the
second record is set to the value of the ID of the first record.
opw-4491099
__PR code note__:
I did the change in "run" but this could be done in `_run_action_object_write`, I chose run because we are already changing the action_id in it.
The "`if eval_context.get('record') is not None`" is to not change an hypothetical case where `self.model_id` doesn't match the `context.action_model`.
__PR note__:
If it was too risky, we could probably merge in an higher version, the ticket is in 17.0 and this is still happening in master.
I've not heard of this issue before so this must not be very frequent or urgent, but I guess this is because people either use a python constant or they just use a python action with a for loop in general.
Forward-Port-Of: odoo/odoo#211122
Forward-Port-Of: odoo/odoo#210855Issue: In Barcode, editing the qty_done of a move line and then reseting it to 0 will update the demand. ### Steps to reproduce: - Create a storable product. Put 5 units in stock. - Create a delivery order for 5 units and mark as to do. - Go to the barcode app and edit your delivery order. - Click on the pencil and set a qty of 1 > Confirm - Click back on the pencil and reset the quantity to 0 > confirm #### > On the picking, the demand of the line was edited from 5 to 1. ### Cause
Original PR description
Issue: In Barcode, editing the qty_done of a move line and then reseting it to 0 will update the demand. ### Steps to reproduce: - Create a storable product. Put 5 units in stock. - Create a delivery…
Issue: In Barcode, editing the qty_done of a move line and then reseting it to 0 will update the demand. ### Steps to reproduce: - Create a storable product. Put 5 units in stock. - Create a delivery order for 5 units and mark as to do. - Go to the barcode app and edit your delivery order. - Click on the pencil and set a qty of 1 > Confirm - Click back on the pencil and reset the quantity to 0 > confirm #### > On the picking, the demand of the line was edited from 5 to 1. ### Cause of the issue: Editing the quantity of a move line from the barcode actually updates the qty_done of the move line which updates both the quantity and the picked status of the move line in the backend via the `_inverse_qty_done`: https://github.com/odoo/enterprise/blob/cbcff76a94750a6759fd72d9c952d785e603a974/stock_barcode/models/stock_move_line.py#L58-L62 Initially, the quantity of the move line was 5 and hence the demand of the line in the barcode was displayed as 5: https://github.com/odoo/enterprise/blob/cbcff76a94750a6759fd72d9c952d785e603a974/stock_barcode/static/src/models/barcode_picking_model.js#L119-L121 The first time you edit the line, you will actually change its quantity to 1 and set it as picked. Once the line state refreshes in the barcode it will then keep the same demand of 5 as it will then be based on the previous demand of the line (since the qty of the move line is set and the qty done is positive): https://github.com/odoo/enterprise/blob/cbcff76a94750a6759fd72d9c952d785e603a974/stock_barcode/static/src/models/barcode_picking_model.js#L1037-L1045 However, the next time you update the line the `_inverse_qty_done` will leave the quantity of the move line at 1 but will also unpick it. Then, and since the `qty_done` was set to 0, it will update the demand of the barcode line because of these same lines: https://github.com/odoo/enterprise/blob/cbcff76a94750a6759fd72d9c952d785e603a974/stock_barcode/static/src/models/barcode_picking_model.js#L1037-L1045 ### Fix: Prior to Commit 3af3e00aabecde8b811ac2cbab397f982721f164 the quantity was updated as well as the picked state even when the qty_done was set to 0, so that this issue would not occur as the null quantity would make us keep the demand of barcode line after edition. However, the problem was that this would update the reserved quantity of the move and hence the barcode app demand once you leave the barcode app because of the `split_uncompleted_moves`. However, in the present use case, that same method can save us because if the move is picked and its quantity is null when you exit the barcode app, it will be rereversed. opw-4700996 Forward-Port-Of: odoo/enterprise#85003 Forward-Port-Of: odoo/enterprise#83623
- Create a sub company from the main company. - On only the sub-company create a new followup level. - While being in both the main company and the sub-company at the same time, try to access the newly created followup level in the followup report view. The following traceback appears: File "/home/odoo/src/odoo/addons/web/models/models.py", line 128, in web_read vals = many2one_data[values[field_name]] KeyError: 9 This commit hide the statusbar for the child company if there is followu
Original PR description
- Create a sub company from the main company. - On only the sub-company create a new followup level. - While being in both the main company and the sub-company at the same time, try to access the newly created followup level in the followup report view. The following traceback appears: File "/home/odoo/src/odoo/addons/web/models/models.py", line 128, in web_read vals = many2one_data[values[field_name]] KeyError: 9 This commit hide the statusbar for the child company if there is followup level in the parent as per the specification of https://github.com/odoo/enterprise/commit/bbcd54519706539d7e2e313118c956200ea70c91 and the implementation of https://github.com/odoo/enterprise/commit/f82ef250560957046be0590f8c2a08039bcc34ca#diff-c502b098cfa2c57bc70c144ae4f0e1fbe1c0116f392ed1a63743f12a51b82084 opw-4669397 Forward-Port-Of: odoo/enterprise#85348 Forward-Port-Of: odoo/enterprise#82324