Tuesday, August 25, 2026
8 changes · 18.0
Resolved issues and error corrections
Improves the error message shown when sending a French e-invoicing credit note in demo mode. This helps users understand what went wrong during EDI document generation and reduces confusion when resolving the issue.
Original PR description
Steps to reproduce: - Install `l10n_fr_pdp` module > Switch to `FR Company` - Activate `French e-invoicing` (Demo mode) - Create a New `Credit Note` with `FR Customer` > Send Issue: The system currently displays a confusing error message during EDI document generation. We are making the error message clearer and more user-friendly. opw-6412521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a Windows-specific issue that prevented Odoo's test suite from running because file paths were compared using Linux/Mac-style separators. The change helps Windows-based contributors and teams validate changes locally without hitting avoidable test failures.
Original PR description
### Description of the issue/feature this PR addresses Since February 2026, changes were made in `/tests/common.py` that were probably never tested on anything else than Linux or Mac machines. Since…
### Description of the issue/feature this PR addresses
Since February 2026, changes were made in `/tests/common.py` that were probably never tested on anything else than Linux or Mac machines. Since that time, Windows users like me (sorry) are not able to run the Odoo tests anymore on their machine. Because the problem remains to this day, I thought I'd submit a PR to fix this permanently.
I have not checked versions older than 18, but it seems the problem does not occur in Odoo 19 anymore, as the code in `/tests/common.py` has been greatly improved.
### Current behavior before PR
Running `odoo-bin` with the `--test-enable` flag never works on Windows, because the simple check on [this line](https://github.com/odoo/odoo/blob/18.0/odoo/tests/common.py#L979) fails due to Windows using backslashes instead of forward slashes in file paths.
It results in the following error (and a whole lot more afterwards as a result of that):
```
2026-08-19 10:28:44,868 48604 INFO odoo-local odoo.tests.common: C:\Apps\Python312\Lib\unittest\mock.py:1581:__enter__ setting Users._crypt_context to <function TransactionCase.setUpClass.<locals>._crypt_context at 0x000002C48DD2C540>
Stack (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 2391, in <module>
main()
File "C:\Program Files\JetBrains\PyCharm 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 2372, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 1640, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File "C:\Program Files\JetBrains\PyCharm 2024.1.4\plugins\python-ce\helpers\pydev\pydevd.py", line 1647, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2024.1.4\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "odoo-bin", line 8, in <module>
odoo.cli.main()
File "[REMOVED]\odoo\odoo\cli\command.py", line 76, in main
o.run(args)
File "[REMOVED]\odoo\odoo\cli\server.py", line 182, in run
main(args)
File "[REMOVED]\odoo\odoo\cli\server.py", line 175, in main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "[REMOVED]\odoo\odoo\service\server.py", line 1510, in start
rc = server.run(preload, stop)
File "[REMOVED]\odoo\odoo\service\server.py", line 644, in run
rc = preload_registries(preload)
File "[REMOVED]\odoo\odoo\service\server.py", line 1414, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "[REMOVED]\venv\Lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "[REMOVED]\odoo\odoo\tools\func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "[REMOVED]\odoo\odoo\modules\registry.py", line 118, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "[REMOVED]\odoo\odoo\modules\loading.py", line 485, in load_modules
processed_modules += load_marked_modules(env, graph,
File "[REMOVED]\odoo\odoo\modules\loading.py", line 365, in load_marked_modules
loaded, processed = load_module_graph(
File "[REMOVED]\odoo\odoo\modules\loading.py", line 284, in load_module_graph
test_results = loader.run_suite(suite, global_report=report)
File "[REMOVED]\odoo\odoo\tests\loader.py", line 118, in run_suite
suite(results)
File "C:\Apps\Python312\Lib\unittest\suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "[REMOVED]\odoo\odoo\tests\suite.py", line 43, in run
self._handleClassSetUp(test, result)
File "[REMOVED]\odoo\odoo\tests\suite.py", line 175, in _handleClassSetUp
super()._handleClassSetUp(test, result)
File "[REMOVED]\odoo\odoo\tests\suite.py", line 65, in _handleClassSetUp
currentClass.setUpClass()
File "[REMOVED]\odoo\odoo\tests\common.py", line 1076, in setUpClass
cls.startClassPatcher(cls._crypt_context_patcher)
File "[REMOVED]\odoo\odoo\tests\common.py", line 443, in startClassPatcher
mock = patcher.start()
File "C:\Apps\Python312\Lib\unittest\mock.py", line 1624, in start
result = self.__enter__()
File "C:\Apps\Python312\Lib\unittest\mock.py", line 1581, in __enter__
setattr(self.target, self.attribute, new_attr)
File "[REMOVED]\odoo\odoo\tests\common.py", line 985, in metamodel_setattr
_logger.runbot(
File "[REMOVED]\odoo\odoo\netsvc.py", line 376, in runbot
self.log(logging.RUNBOT, message, *args, **kws)
```
### Desired behavior after PR is merged:
The test suite runs without problems on Windows.
Btw, it would probably be better to use `pathlib` instead as a general improvement for all places in the code where local paths are being handled, but that's out of scope here now.
---
- [x] I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe lunch ordering test now waits for the intended product to appear after changing location before selecting it. This prevents occasional failures caused by stale demo products being selected, making automated validation of the Lunch app more dependable.
Original PR description
The lunch order tour selects `Farm 1` before ordering a product. However, it only waits for the location input to be updated before clicking the first kanban record. With demo data installed, a product from the previous location can still be displayed while the product model is being reloaded. The tour can therefore order a demo product instead of the product created by the test. This notably fails during weekends when the corresponding demo vendor is unavailable. To fix we need to wait for the product created by the test before clicking it. Besides selecting the intended product, this also ensures that the product reload following the location change has completed. [error-181572 ](https://runbot.odoo.com/odoo/error/181572) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The change makes an internal sales timesheet profitability test ignore unrelated price list data so expected values stay consistent. This helps prevent false test failures when other installed modules introduce discounts, improving release reliability without changing customer-facing behavior.
Original PR description
The project profitability test assumes that the service product is sold at its list price. However, some modules such as `pos_pricer` add a globally applicable pricelist in their data. In 18.0, this pricelist can be selected for the test partner even when the pricelist feature is disabled, causing a discount to be applied and the expected profitability amount to differ. The fix is to remove existing pricelists in the test, as done in other tests affected by the same issue, so that the sale order price is deterministic. [error-944526](https://runbot.odoo.com/odoo/error/944526) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Copying an existing image linked to another record now reuses the appropriate attachment instead of leaving behind an unnecessary duplicate. This keeps stored files cleaner and avoids redundant attachments when users copy image content.
Original PR description
Copying an image attachment already linked to another record could leave a redundant duplicate behind instead of reusing the existing one. opw-6463012 Forward-Port-Of: odoo/odoo#282287
This update changes a small piece of internal code style so automated quality checks pass consistently. It does not change business behavior, but helps keep the platform maintainable and aligned with coding standards.
Original PR description
Ruff checks on runbot flagged `while 1:` Preferred syntax is to use `while True` [UP048](https://docs.astral.sh/ruff/rules/while-one) runbot-945983 Forward-Port-Of: odoo/odoo#283962
Employees viewing their own profile will now consistently see themselves marked as present, even when the page is the first one opened. This removes a small confusing status display issue without changing broader messaging or presence behavior.
Original PR description
**Steps to reproduce** 1. Install `hr`. 2. Go to the form view of your own employee. 3. Refresh the page. Issue: the presence status indicator on top of the employee's image doesn't show the employee as online. The issue is only reproducible if it is the first page loaded and no other pages are opened. **Cause** The issue only happens on first page load, because the websocket is only opened after the view is rendered. So, if `im_status` is computed for the view, its value will be computed before `bus.presence` is updated for the current user. **Change** To avoid this small inconsistency, we can consider the current user should always see their linked employee as present. This simple solution avoids making potentially breaking changes in `bus`. opw-5070228
This fix prevents attendance records from being incorrectly unlinked from work entries when early or batch-created attendances cross UTC day boundaries. It helps ensure HR attendance and payroll-related work entry data remain accurate in edge cases.
Original PR description
When an early attendance starts on the previous UTC day, the cleanup uses full UTC days as boundaries. This can include an unrelated work entry and remove its attendance link. Use the generated work entries as cleanup boundaries so only entries that can overlap the new entries are considered. opw-6412221 Forward-Port-Of: odoo/enterprise#127040