Monday, April 8, 2024
10 changes
6 changes
Resolved issues and error corrections
Runbot now recognizes a failed web test as a completed test run instead of waiting until it times out. This helps developers and teams get faster, clearer feedback when automated tests fail.
Original PR description
Before this commit, when a test failed, runbot would wait until a message does not contain "[HOOT]" and timout. Now, it will wait until a message does not contain "[HOOT]" or a message that contains "[HOOT] test failed (see above for details)". This means that the runbot will not time out anymore. 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
Odoo now checks template relationships while preparing website and app assets, helping spot configuration or naming mistakes that could otherwise silently disable interface customizations. Several affected templates were also corrected so their intended extensions apply reliably.
Original PR description
With https://github.com/odoo/odoo/pull/145602, template inheritance is now applied lazily browser side. When OWL needs a template, the template and all related templates (if any) are parsed and used to construct the final template used by OWL. So if some parent template in the chain is missing, it is only detected at that time. But for extensions (t-inherit-mode="extension"), the situation is different. If for some reason (e.g a typo) the parent of an extension is not found, the extension will simply never be used and will never cause a crash (if not tested in a test/tour). In this commit, we check if all parent templates are available in the bundles when they are prepared server side. That check will only log an error in the console. We also make sure that some template extensions are now applied by modifying some template t-inherit attributes (an exact match t-inherit = t-name is needed now).
This update fixes an internal code issue found by newer quality checks, helping prevent potential errors in hardware receipt printer handling. It supports a smoother upgrade of development tools without changing day-to-day user workflows.
Original PR description
We are planning to upgrade the pylint version since ruff is now fully deployed. This will fix some of the issue that where not detected with the previous version This will be backported from 15.0 to 17.1 by moc with additional fixes.
This fixes a display issue where 15-minute calendar events could lose their intended styling after refreshing the page. Short meetings now keep the correct visual indicators, making the calendar easier to read and preventing confusing event displays.
Original PR description
For info FullCalendar V6 use Preact internally. Preact is similar to OWL/React/Vue as when some props change it apply the change on the element linked to the props. In our case for the events, when…
For info FullCalendar V6 use Preact internally. Preact is similar to OWL/React/Vue as when some props change it apply the change on the element linked to the props. In our case for the events, when an event has a duration of 15 minutes FullCalendar changes the `isShort` to `true` so Preact can add the `fc-timegrid-event-short` class to the event. In Odoo we add also other classes to these events for our needs (e.g.: `o_event_striked`). In FullCalendar V4 it was done in `eventRender` using `el.classList.add()`. During the migration to FullCalendar V6 [1] the `eventRender` was changed into `eventDidMount` (a Preact HOOK). In most cases, `eventDidMount` is fine but not for short event, as in FullCalendar V6 there is another HOOK especially for the classes `eventClassNames` [2]. Before this fix, the render flow of the event was: 1) pre-render event 2) add the event to the DOM 3) call `eventDidMount` (here we add our classes) 4) FullCalendar set `true` to `isShort` props 5) Preact sets the classes on the event to add `fc-timegrid-event-short` (here FullCalendar removes our classes added in `eventDidMount`) After the fix, the render flow is the same as before, but as we add the classes using the `eventClassNames` HOOK, FullCalendar knows all additional classes per event so when Preact (in steps 5) sets the classes its adds `fc-timegrid-event-short` and all other classes added by our code in `eventClassNames`. Steps to reproduce: * Open Calendar App * Make an event with a duration of 15 minutes * Refresh the page (F5) => Bug the style of new event (15 min) is wrong [1]: odoo/odoo@90f85a19deaea33cd747c969762ff20f1d59ef4c [2]: https://fullcalendar.io/docs/event-render-hooks --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The web test timeout has been increased to reduce random failures in automated checks. This helps keep development and release validation more stable while the team investigates why some tests occasionally take longer than expected.
Original PR description
This PR increases the duration after which a test is considered as failed. This has been done because undeterministic failures have been observed on the CI, and this fix gives us time to investigate exactly what causes these tests to take a long time. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an error that occurred when saving a Point of Sale product category after removing its parent category. This helps users update POS category structures without being blocked by a system error.
Original PR description
Currently, an error is generated when the user removes the parent category from the POS product categories and tries to save it. Steps to produce and error: 1. Go to Point of Sale > Configuration >…
Currently, an error is generated when the user removes the parent category from the
POS product categories and tries to save it.
Steps to produce and error:
1. Go to Point of Sale > Configuration > Products > PoS Product Categories
2. Open any PoS product categories that contains Parent Category.
3. Now remove Parent Category and try to save it >>> error generate
Stack Trace:
```
IndexError: list index out of range
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1827, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1825, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 739, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 71, in web_save
self.write(vals)
File "addons/point_of_sale/models/pos_category.py", line 67, in write
vals["color"] = self.search_read([("id", "=", vals["parent_id"])])[0][
```
This is because at [1], we receive the `False` value in `vals["parent_id"]` as a result of
the search; it has no value, and a key error is generated because we try to access the first element but it is empty.
This commit will fix this issue by ensuring that the value of `parent_id` is in `vals` before searching.
[1]-https://github.com/odoo/odoo/blob/7479ffdc43c857bfd6439aefc024330dc22825b3/addons/point_of_sale/models/pos_category.py#L66-L69
sentry-51530695464 changes
Resolved issues and error corrections
This update fixes a visual issue in the field service task report where a horizontal line was overlapping other content. The fix improves the report's appearance by adjusting the display layering, making the document cleaner and easier to read when signing off on completed tasks.
Original PR description
17.0 Steps to reproduce: - install field service - check worksheet option from setting in field service - complete worksheet of any task and click on sign report - click on sign button on portal Issue: - horizontal line is getting overlapped on Sing task report. Solution: - Add z-index property on horizontal line to have better ui. Task: 3770835
This update fixes code issues that were not previously detected by the older pylint version. The changes prepare the system for an upcoming pylint upgrade as part of the transition to ruff for code analysis. This ensures the codebase remains clean and maintainable as development tools are modernized.
Original PR description
We are planning to upgrade the pylint version since ruff is now fully deployed. This will fix some of the issue that where not detected with the previous version Note: self.transaction_ids could raise, this is why we have no garantee that existing_transactions will be defined. But the try except does not look to manage this case, this is why it should be safe to move this line outside the try. This will be merged in 17.2 with 60233 to allow a faster forward-port and adaptation of the docker image
This update removes unnecessary warning messages when users encounter missing pages (404 errors) in Odoo. The system now relies on color-coded status indicators in logs instead, which are easier to spot. This cleanup removes redundant code that was being skipped anyway due to how the error handling was structured.
Original PR description
The conditionnal `isinstance(exc, NotFound)` is shadowed by the conditionnal `isinstance(exc, HTTPException)` two lines above. Nobody ever complained that the warning for NotFound error was gone. Since werkzeug 1.0.0, the status code in the response log is colored, 404 is colored yellow which should catch the eye. The explicit warning line isn't really necessary. Forward-Port-Of: odoo/odoo#159665
This fix corrects how the HSN (Harmonized System of Nomenclature) field displays on sales orders when your company uses multiple localizations. Previously, the HSN field would appear regardless of which localization was active. Now it only shows when relevant to the current localization, matching the behavior of other reports like purchase orders and invoices.
Original PR description
Don't show HSN value for sale.order not linked to this localization. Before this commit, if you have multi company with multi localization, you see this field whatever the current localization. It uses the same condition than other report: purchase/invoice/... Forward-Port-Of: odoo/odoo#160766