Search
Navigate
Branch
Monday, April 8, 2024
66 changes
26 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).
Odoo now waits until the web client has the complete user context before loading actions. This prevents server actions from running with missing information such as the active company, reducing errors in multi-company or context-dependent workflows.
Original PR description
Since [1], when an action is loaded, if the action is a server action, the server will execute the action directly and return the resulting action. Before the commit [1], only a part of the context was need, now that the server execute the action, the complete user context is need. Before this commit, a performance improvement was to call the action load at the beginning of the action service. The issue with calling the action load in such an early step, is that all the user context is not complete yet (For instance, the allowed_company_id is not yet there, it's added later by the company service). Now, the call to the action load is made on the mount of the WebClient, in which moment it should have the complete user context. [1] : https://github.com/odoo/odoo/commit/f49e97e9ad41c1c5e7123bad9c429a9af2732b73
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-5153069546Miscellaneous changes
**Description of the issue/feature this PR addresses:** **Before this PR:** When disabling the submenu for events, it would show a 404 Page Not Found error. **After this PR:** Now, the current behavior is that when the submenu is disabled, it redirects to the /register page of the event. task-3658380 Forward-Port-Of: odoo/odoo#160544 Forward-Port-Of: odoo/odoo#152409
Original PR description
**Description of the issue/feature this PR addresses:** **Before this PR:** When disabling the submenu for events, it would show a 404 Page Not Found error. **After this PR:** Now, the current behavior is that when the submenu is disabled, it redirects to the /register page of the event. task-3658380 Forward-Port-Of: odoo/odoo#160544 Forward-Port-Of: odoo/odoo#152409
10 changes
Enhancements to existing features
The employee HR views now show that the Billable Time Target is measured per month. This makes the setting clearer for managers and HR users, reducing confusion when setting billable time expectations.
Original PR description
In the HR employee views, there is a field "Billable Time Target" that you can change, however it's not really clear that it is a monthly target. This PR adds a "per month" suffix to it to make it more clear. task-3570302
30 changes
Enhancements to existing features
The approval request form has been improved to provide a better user experience. Date fields now have consistent spacing, and the primary action button intelligently changes based on document status—showing "Attach Documents" when no documents are linked, or "Confirm/Approve" once documents have been submitted. These refinements make the approval workflow clearer and more intuitive for users.
Original PR description
With this commit on approval request's form view:
* You have the same padding for dates
* The primary button is "attached documents" if you don't linked a
document or "confirm","approve" if you have already send a document.
task : 3724860
Forward-Port-Of: odoo/enterprise#59938
Forward-Port-Of: odoo/enterprise#58863Before this commit when accepting a recurrent event from google calendar with option "this event", it didn't reflect on odoo calendar. This happened due to the write_date check which applies google update only if their write_date is after odoo write_date, but multiple updates from google might change some events write_date to now, which causes other google updates to get discarded. This commit aims to fix this issue by keeping the write_date of the affected events before applying any google u
Original PR description
Before this commit when accepting a recurrent event from google calendar with option "this event", it didn't reflect on odoo calendar. This happened due to the write_date check which applies google update only if their write_date is after odoo write_date, but multiple updates from google might change some events write_date to now, which causes other google updates to get discarded. This commit aims to fix this issue by keeping the write_date of the affected events before applying any google updates, and considering these dates instead of the live odoo write_date. Task: 3731552 Forward-Port-Of: odoo/odoo#160357 Forward-Port-Of: odoo/odoo#158509
Description of the issue/feature this PR addresses: Commit [1] resolved an issue related to the behavior of small font sizes, which caused 'NaN' to appear in the font-size dropdown within the floating toolbar. This occurred due to the removal of a variable definition, resulting in the inability to compute the font size. This commit rectifies the problem by reintroducing the variable in the SCSS file to ensure correct rendering. [1]: https://github.com/odoo/odoo/commit/7931d1a14a3e4e65463cc
Original PR description
Description of the issue/feature this PR addresses: Commit [1] resolved an issue related to the behavior of small font sizes, which caused 'NaN' to appear in the font-size dropdown within the floating toolbar. This occurred due to the removal of a variable definition, resulting in the inability to compute the font size. This commit rectifies the problem by reintroducing the variable in the SCSS file to ensure correct rendering. [1]: https://github.com/odoo/odoo/commit/7931d1a14a3e4e65463cc101536061fa259b615d task-3801894 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#158811
How to reproduce: - Install website_slides with demo data - Log in from localhost - Log in from dev.localhost - Switch to localhost - (The system property web.base.url is http://dev.localhost:8069 but we are on localhost) - Go to a course in the back end and click on “Go to website” button You are redirected to the frontend website home page instead of the course home page. This fix solves the problem. Afer correcting this error for the courses (slide.channel), we have found the s
Original PR description
How to reproduce: - Install website_slides with demo data - Log in from localhost - Log in from dev.localhost - Switch to localhost - (The system property web.base.url is http://dev.localhost:8069…
How to reproduce: - Install website_slides with demo data - Log in from localhost - Log in from dev.localhost - Switch to localhost - (The system property web.base.url is http://dev.localhost:8069 but we are on localhost) - Go to a course in the back end and click on “Go to website” button You are redirected to the frontend website home page instead of the course home page. This fix solves the problem. Afer correcting this error for the courses (slide.channel), we have found the same problem for: - event.sponsor - event.meeting.room - slide.slide So we apply the same correction for them. Technical note: the button "Go to website" uses the open_website_url method of WebsitePublishedMultiMixin that relies on website_url. That method expects a relative URL in the computed field website_url and not an absolute one (actually, the method already handle adding the website domain, so it expect the relative part). The problem is that the compute method for the field website_url of channel compute an absolute URL. The consequence is that the user is redirected to the home page instead of the course page (by WebsitePreview, see get path method). In stable, we cannot change easily website_url to make it relative as it is used in other of places (ex.: if we make it relative the share link in the sidebar on the frontend is relative which is not correct and in mail template, the URL might not be correct as the mail system append the default domain for relative URLs). So instead, we override open_website_url to use a relative URL when the website is not defined. If the website is defined on the course, we call the super implementation because a domain change might be required. Note that by doing that, we duplicate the code of _compute_website_url in open_website_url but making the URL relative instead of absolute. So we should clean that in master. Task-3635856 Forward-Port-Of: odoo/odoo#160114 Forward-Port-Of: odoo/odoo#148103
Current behavior before PR: The cursor kept on flickering when attempting to enter a space at the end of label text field of a link resulting in not being able to add space at all. Desired behavior after PR is merged: Now, it's possible to add spaces at the end of a link label. task-3820250 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160661 Forward-Port-Of: odoo/odoo#160060
Original PR description
Current behavior before PR: The cursor kept on flickering when attempting to enter a space at the end of label text field of a link resulting in not being able to add space at all. Desired behavior after PR is merged: Now, it's possible to add spaces at the end of a link label. task-3820250 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160661 Forward-Port-Of: odoo/odoo#160060
If user had less than 1 point, which is equivalent to 1 quantity of set currency, on gift card and eWallet, they could not use it due to not enough point on Gift Card and eWallet for claiming reward. opw-3667934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159984 Forward-Port-Of: odoo/odoo#155161
Original PR description
If user had less than 1 point, which is equivalent to 1 quantity of set currency, on gift card and eWallet, they could not use it due to not enough point on Gift Card and eWallet for claiming reward. opw-3667934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159984 Forward-Port-Of: odoo/odoo#155161
This commit fixes an issue with the embedded views of "My dashboard" view: the embedded could take as much height as they needed which could result in excessive place taken by a single embedded view and this also had issues with the virtual hook which is not adapted to embedded views without scroll (this could result in completly blank space inside embedded gantt views when they would take too much space). To solve this issue, the commit adds a fixed maximum height to the embedded views (80% of
Original PR description
This commit fixes an issue with the embedded views of "My dashboard" view: the embedded could take as much height as they needed which could result in excessive place taken by a single embedded view and this also had issues with the virtual hook which is not adapted to embedded views without scroll (this could result in completly blank space inside embedded gantt views when they would take too much space). To solve this issue, the commit adds a fixed maximum height to the embedded views (80% of the window height) and also adds a minimum width to their content so that it will be horizontally scrollable instead of being weirdly squished. Also tweaks a bit the padding of the embedded view so that it looks a bit better even with the added scroll bars. task-3834795 Forward-Port-Of: odoo/odoo#160584 Forward-Port-Of: odoo/odoo#159663
A partner found a bug, when `write` (public method) is called on a recordset of more than one journal then the restriction will traceback, as the `id` can only be called on one journal. Simplest solution is to simply get `id` on the loop variable instead, and let the code normally block the user with a UserError. Credits to: https://github.com/juppe Old PR: https://github.com/odoo/odoo/pull/150888 Forward-Port-Of: odoo/odoo#158536
Original PR description
A partner found a bug, when `write` (public method) is called on a recordset of more than one journal then the restriction will traceback, as the `id` can only be called on one journal. Simplest solution is to simply get `id` on the loop variable instead, and let the code normally block the user with a UserError. Credits to: https://github.com/juppe Old PR: https://github.com/odoo/odoo/pull/150888 Forward-Port-Of: odoo/odoo#158536
Currently, when you copy the viva wallet webhook to configure it in your account, you have to select it manually. With this commit we add a “CopyClipboardChar” widget which does this automatically. 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#160516
Original PR description
Currently, when you copy the viva wallet webhook to configure it in your account, you have to select it manually. With this commit we add a “CopyClipboardChar” widget which does this automatically. 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#160516
Related to previous commit: a9a9d2f12740b02c025f992d62c0d4f5feeaab1d From initial PR: #158843 Improve Regexp to match double slugs /blog/blog-1/post-2 or /blog/1/2 Ignore param order: `?a=<param>&b=<param>` == `?b=<param>&a=<param>` Remove trailing / from base url when querystring is present Ignore '/en' url instead of '/en_US' since the default url_code has been updated meanwhile (269aa594111a152ad4b7714856ea745bfef57155). Add a new test to check that urls are cleaned as expected Remo
Original PR description
Related to previous commit: a9a9d2f12740b02c025f992d62c0d4f5feeaab1d From initial PR: #158843 Improve Regexp to match double slugs /blog/blog-1/post-2 or /blog/1/2 Ignore param order:…
Related to previous commit: a9a9d2f12740b02c025f992d62c0d4f5feeaab1d From initial PR: #158843 Improve Regexp to match double slugs /blog/blog-1/post-2 or /blog/1/2 Ignore param order: `?a=<param>&b=<param>` == `?b=<param>&a=<param>` Remove trailing / from base url when querystring is present Ignore '/en' url instead of '/en_US' since the default url_code has been updated meanwhile (269aa594111a152ad4b7714856ea745bfef57155). Add a new test to check that urls are cleaned as expected Remove crawl as admin, since the demo user already have all groups and so we will check the same urls. The overlap is important for a really low value. _**after** this pr https://github.com/odoo/odoo/pull/159370_ public crawled 68 urls in 6.44s 3167 queries, 0.095s 46.57q per request demo crawled 271 urls in 21.93s 13365 queries, 0.081s 49.32q per request _**currently**_ public crawled 92 urls in 8.74s 4233 queries, 0.095s 46.01q per request demo crawled 819 urls in 68.03s 36603 queries, 0.083s 44.69q per request admin crawled 813 urls in 67.46s 36441 queries, 0.083s 44.82q per request _**before** pr https://github.com/odoo/odoo/pull/158843_ public crawled 185 urls in 12.62s 7526 queries, 0.068s 40.68q per request demo crawled 6691 urls in 443.84s 342327 queries, 0.066s 51.16q per request admin crawled 6605 urls in 417.36s 336151 queries, 0.063s 50.89q per request So, it should reduce the crawling from 872" => 27" for the v16. Forward-Port-Of: odoo/odoo#160409 Forward-Port-Of: odoo/odoo#159370
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
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
When we want to post a vendor bill having duplicates, we show a `RedirectError` that should bring us to the list of duplicate bills. However, the action domain contained records instead of record ids, causing a traceback when clicking the button. The issue was introduced in 64a7a80bd8a87e984b73504113b1c31926557c05. This commit fixes that by providing a valid domain for the moves. task-3797825 Forward-Port-Of: odoo/odoo#160133
Original PR description
When we want to post a vendor bill having duplicates, we show a `RedirectError` that should bring us to the list of duplicate bills. However, the action domain contained records instead of record ids, causing a traceback when clicking the button. The issue was introduced in 64a7a80bd8a87e984b73504113b1c31926557c05. This commit fixes that by providing a valid domain for the moves. task-3797825 Forward-Port-Of: odoo/odoo#160133
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
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
First commit fixes an issue introduced by https://github.com/odoo/odoo/pull/154203 which could keep the autocomplete options list opened even after a click away when the user would "drag and drop" an option out of the list instead of simply clicking on it. This is caused by the fact that the onInputBlur code is directly terminated in this case (because of ignoreBlur) while it is the only way for the autocomplete list to be closed in this case. The solution is therefore to add an external listene
Original PR description
First commit fixes an issue introduced by https://github.com/odoo/odoo/pull/154203 which could keep the autocomplete options list opened even after a click away when the user would "drag and drop" an…
First commit fixes an issue introduced by https://github.com/odoo/odoo/pull/154203 which could keep the autocomplete options list opened even after a click away when the user would "drag and drop" an option out of the list instead of simply clicking on it. This is caused by the fact that the onInputBlur code is directly terminated in this case (because of ignoreBlur) while it is the only way for the autocomplete list to be closed in this case. The solution is therefore to add an external listener on pointer down which will always close the autocomplete list when clicking away from it. Steps to reproduce: - go to any autocomplete (crm salesperson for example) - click on the input - drag and drop a result outside of the list - try to close the autocomplete list by clicking away Before the fix, the autocomplete list would only close by scrolling or clicking on the input once again. Second commit fixes an issue regarding unwanted interaction between the regular autocomplete option click selection and the onChange handler from the input field hook used in the PartnerAutoCompleteCharField component. This became an issue starting from https://github.com/odoo/odoo/pull/154203 because of the disappearance of the t-on-mousedown.prevent handler placed on the autocomplete options list which would prevent the onChange event from being triggered when clicking on an option. The issue would be that the onChange handler from the input field hook would take precedence over the option click handler of the autocomplete which would most of the time be ignored afterwards. The solution found for this problem is to prevent the immediate propagation of the change event in the autocomplete handler when an option has been clicked on so that it will never be propagated to the input field hook handler in this case. Steps to reproduce: - Go to contacts and open a company contact - Type in the name field a few characters (at least 3) - Click on any autocomplete option Most of the time, the option will not be applied and the name won't change Forward-Port-Of: odoo/odoo#159765 Forward-Port-Of: odoo/odoo#159333
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457
Original PR description
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457
### Steps to reproduce: - Activate Subcontracting in the settings. - Create a storable product - Create a BOM of type "subcontracting" where the subcontractor is a Portal user (e.g. Joel Willis) for that product. - Log out and connect as your portal user. - Go to the website shop and search your product. ### Expected behavior: The portal user should only be able to see the published products. ### Current behavior: The portal user sees unpublished products for which he is subco
Original PR description
### Steps to reproduce: - Activate Subcontracting in the settings. - Create a storable product - Create a BOM of type "subcontracting" where the subcontractor is a Portal user (e.g. Joel Willis) for…
### Steps to reproduce: - Activate Subcontracting in the settings. - Create a storable product - Create a BOM of type "subcontracting" where the subcontractor is a Portal user (e.g. Joel Willis) for that product. - Log out and connect as your portal user. - Go to the website shop and search your product. ### Expected behavior: The portal user should only be able to see the published products. ### Current behavior: The portal user sees unpublished products for which he is subcontractor. ### Cause of the issue: The commit 99b56ec has introduced a subcontracting portal. In order for portal users to be able to interact with product templates, the following rule was added to the "base.group_portal": https://github.com/odoo/odoo/blame/f0a0d596ab716c96de38a5c0f837da2924338d7b/addons/mrp_subcontracting/security/mrp_subcontracting_security.xml#L120-L131 When you go to the website shop, the records displayed in the shop will be computed here: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/addons/website_sale/controllers/main.py#L348 https://github.com/odoo/odoo/blob/f0a0d596ab716c96de38a5c0f837da2924338d7b/addons/website/models/mixins.py#L353-L357 However, during this call, the "ir.rule" added for portal users will be added to the SQL query here: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/odoo/models.py#L4682 As such, products (enven if unpublished) for which the portal user is a subcontractor will be fetched and displayed in the shop. ### Fix: Since the "ir.rule" can not be changed only for flows involving the `website_sale` application, we propose to make a change similar to commit b1f6171 whose purpose is to hide unpublished products for non internal users: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/addons/website_sale/models/product_template.py#L105-L108 opw-3768845 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159420
… portal Steps to reproduce: - Open project share any project which has task. - My account > project > open that project you can see task . - Open any task and add new sub-task you can see once the sub-task is saved 'task view' button is displayed. Issue: - Sub-tasks notebook > add a line > 'view task' is displayed at the creation but is then hidden once the task is saved. Solution: - Correct the attrs and change the condition in able to invisible 'view task' once the sub-task is s
Original PR description
… portal Steps to reproduce: - Open project share any project which has task. - My account > project > open that project you can see task . - Open any task and add new sub-task you can see once the sub-task is saved 'task view' button is displayed. Issue: - Sub-tasks notebook > add a line > 'view task' is displayed at the creation but is then hidden once the task is saved. Solution: - Correct the attrs and change the condition in able to invisible 'view task' once the sub-task is saved task-3602610 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#160773 Forward-Port-Of: odoo/odoo#145214
In the cart, customers can edit the quantity, add or remove products, and redeem promo codes, coupons, etc. The express checkout form handles only the quantity change, but the buttons are still shown even with a free cart (e.g. coupon for a free desk). When the customers use them, an error is thrown. Now, if a user has free cart after his modification, it will make express checkout button disappear. task-3568644 Forward-Port-Of: odoo/odoo#160386 Forward-Port-Of: odoo/odoo#149565
Original PR description
In the cart, customers can edit the quantity, add or remove products, and redeem promo codes, coupons, etc. The express checkout form handles only the quantity change, but the buttons are still shown even with a free cart (e.g. coupon for a free desk). When the customers use them, an error is thrown. Now, if a user has free cart after his modification, it will make express checkout button disappear. task-3568644 Forward-Port-Of: odoo/odoo#160386 Forward-Port-Of: odoo/odoo#149565
Current behavior: --- Cannot send SMS to a partner that has a mobile phone number from Panama. Steps to reproduce: --- ```python # 6198 5462 is a valid phone number parsed = phonenumbers.parse('6198 5462', region='PA') is_valid = phonenumbers.is_valid_number(parsed) is_valid == False ``` Cause of the issue: --- Old versions of phonenumbers (external library) are not updated to Panamas mobile phone numbers system change. Fix: --- Monkey patched the library Similar as: ht
Original PR description
Current behavior:
---
Cannot send SMS to a partner that has a mobile phone number from Panama.
Steps to reproduce:
---
```python
# 6198 5462 is a valid phone number
parsed = phonenumbers.parse('6198 5462', region='PA')
is_valid = phonenumbers.is_valid_number(parsed)
is_valid == False
```
Cause of the issue:
---
Old versions of phonenumbers (external library) are not updated
to Panamas mobile phone numbers system change.
Fix:
---
Monkey patched the library
Similar as: https://github.com/odoo/odoo/commit/b21df8797141dac9f2cf0315658a08a238849f5b
opw-3682631
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#159970
Forward-Port-Of: odoo/odoo#156969Odoo now automatically includes fields that are required because of view rules, reducing the need for manual configuration across several business apps. This helps forms and workflows behave more reliably when conditions make information mandatory.
Original PR description
related to https://github.com/odoo/odoo/pull/137031
The rental quotation list view now shows broader sales-focused onboarding text. This helps users understand that quotations can support online payments, signatures, upsells, and customer portal interactions, rather than only explaining the rental order flow.
Original PR description
- Replace text on the list view page: before changes: 'Once the quotation is confirmed, it becomes a rental order. You will be able to create an invoice and collect the payment.' after changes: 'Boost sales with beautiful quotations, online payments or signatures, upsells, and a great customer portal.' task-3645924
Code cleanup and technical improvements
This update reorganizes and simplifies automated tests for Point of Sale related modules by merging duplicate helpers, improving naming, and removing unused test utilities. It helps make future quality checks easier to maintain without changing customer-facing POS behavior.
Original PR description
*: all pos-related modules - search helpers that do the same thing or can be merged - rename selectPriceList in clickPriceList - include testing and JsDoc in (easier to make test code, rise lisibility of test code): - clickPaymentMethod - clickDisplayedProduct - clickPriceList - clickFiscalPosition - enterPaymentLineAmount - modify tours with the new or adapted utils - kill test in product_screen_tour that allready done in acceptance_tour - modify all tour in point_of_sale to have all step made by utils - move out function to util in pos_restaurant - kill 10 utils functions that was not use anymore - rename : pressNumpad by clickNumpad controlButton by clickControlButton controlButtonMore by clickControlButtonMore tasks id : 3820758 Linked PR: https://github.com/odoo/odoo/pull/159277
Miscellaneous changes
This commit fixes an issue with the embedded views of the knowledge article view: the embedded could take as much height as they needed which could result in excessive place taken by a single embedded view and this also had issues with the virtual hook which is not adapted to embedded views without scroll (this could result in completly blank space inside embedded gantt views when they would take too much space). To solve this issue, the commit adds a fixed maximum height to the embedded views (
Original PR description
This commit fixes an issue with the embedded views of the knowledge article view: the embedded could take as much height as they needed which could result in excessive place taken by a single embedded view and this also had issues with the virtual hook which is not adapted to embedded views without scroll (this could result in completly blank space inside embedded gantt views when they would take too much space). To solve this issue, the commit adds a fixed maximum height to the embedded views (80% of the window height). task-3834795 Forward-Port-Of: odoo/enterprise#60126 Forward-Port-Of: odoo/enterprise#59629
Provide fixes after some months of using WhatsApp. See sub tasks / sub PRs for more details, each being related to a specific issue to fix. Task-3807017, master fix task Contains fixes done for following tasks / tickets * Task-3619004 (WhatsApp: Fix variable computation and name) * Task-3680030 (WhatsApp: Fix buttons / template duplication) * Task-3829328 (WhatsApp: Allow to send yellow quality templates) * Task-3644990 (Whatsapp: Fix retrying message with report on template) * Task-
Original PR description
Provide fixes after some months of using WhatsApp. See sub tasks / sub PRs for more details, each being related to a specific issue to fix. Task-3807017, master fix task Contains fixes done for…
Provide fixes after some months of using WhatsApp. See sub tasks / sub PRs for more details, each being related to a specific issue to fix. Task-3807017, master fix task Contains fixes done for following tasks / tickets * Task-3619004 (WhatsApp: Fix variable computation and name) * Task-3680030 (WhatsApp: Fix buttons / template duplication) * Task-3829328 (WhatsApp: Allow to send yellow quality templates) * Task-3644990 (Whatsapp: Fix retrying message with report on template) * Task-3679715 (WhatsApp: Fix cron block or crash with shared users) * Task-3576712 (WhatsApp: Sync template attachments at sync, avoid missing) * Task-3640336 (WhatsApp: Fix Document Header / Report mismatch) * Task-3605612 (WhatsApp: Fix header / upload / reporting usage) * Task-3640336 (WhatsApp: Fix Document Header / Report mismatch) * Task-3794483 (WhatsApp: Add account information in template views) * Task-3794365 (WhatsApp: Ease module / variable name change) * Task-3691887 (WhatsApp: Avoid draft templates in event mail schedulers) * Task-3732188 (Whatsapp Event: Avoid crashing registration process) Co-Authored-By: Amélie Dieudonné <amdi@odoo.com> Co-Authored-By: Akshat Trivedi <aktr@odoo.com> Co-Authored-By: Dato Nefaridze <dane@odoo.com> Co-Authored-By: Nishant Jain <niai@odoo.com> Co-Authored-By: Rahul Prajapati <rapr@odoo.com> Co-Authored-By: Noé Antoine <nan@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com> Forward-Port-Of: odoo/enterprise#60045 Forward-Port-Of: odoo/enterprise#58535
Users with the access right for recruitment set to 'user: referral only' were not able to access applicants even when they are the referree. Now, users have access to all applicants where they are the referee. Task: 3744194 Forward-Port-Of: odoo/enterprise#60041 Forward-Port-Of: odoo/enterprise#58589
Original PR description
Users with the access right for recruitment set to 'user: referral only' were not able to access applicants even when they are the referree. Now, users have access to all applicants where they are the referee. Task: 3744194 Forward-Port-Of: odoo/enterprise#60041 Forward-Port-Of: odoo/enterprise#58589
This commit fixes an issue with one of the nightly runbot test: No Demo. This trigger launches tests without using any demo data for all of the modules the issue with it is that the user `demo`, which is used in some tours, is part of the demo data. This leads to the thread tour to fail since it is using a demo user. To fix this, the commit creates a new internal test user inside the test class which is then used as login when launching the tour. This way the tour is no longer dependant on
Original PR description
This commit fixes an issue with one of the nightly runbot test: No Demo. This trigger launches tests without using any demo data for all of the modules the issue with it is that the user `demo`, which is used in some tours, is part of the demo data. This leads to the thread tour to fail since it is using a demo user. To fix this, the commit creates a new internal test user inside the test class which is then used as login when launching the tour. This way the tour is no longer dependant on a demo user without using the admin login. task-3844899 Forward-Port-Of: odoo/enterprise#59903
In General Ledger report, we get an error when trying to reformat value (K$, M$, ..) Reason: When setting the 'currency' value on each column, we take the currency of the account, which is interpreted as a string on js side, then used to call format_value in where we try to get `currency.id`, leading to the error. To avoid that, we return only the id of the currency if there is one. Also, we get a KeyError whendoing the same flow with unfolded lines opw-3793209 Forward-Port-Of
Original PR description
In General Ledger report, we get an error when trying to reformat value (K$, M$, ..) Reason: When setting the 'currency' value on each column, we take the currency of the account, which is interpreted as a string on js side, then used to call format_value in where we try to get `currency.id`, leading to the error. To avoid that, we return only the id of the currency if there is one. Also, we get a KeyError whendoing the same flow with unfolded lines opw-3793209 Forward-Port-Of: odoo/enterprise#59852 Forward-Port-Of: odoo/enterprise#58678
Steps to reproduce - install 'sale_mrp' - insert in a spreadsheet a pivot of Sale Orders - open the pivot properties side panel - click on the Add button => the input width does not spans the entire width Task: 3827265 Forward-Port-Of: odoo/enterprise#59377
Original PR description
Steps to reproduce - install 'sale_mrp' - insert in a spreadsheet a pivot of Sale Orders - open the pivot properties side panel - click on the Add button => the input width does not spans the entire width Task: 3827265 Forward-Port-Of: odoo/enterprise#59377
The UK tax reporting module now includes a configuration setting that allows users to easily switch between production and test modes without editing code. This makes it simpler for teams to test HMRC integration features using sandbox credentials before going live.
Original PR description
Previously, testing HMRC features with dummy credentials required manually changing variables within the code. This commit introduces a more user-friendly approach by adding a new configuration parameter. The new configuration parameter defaults to "production" to maintain existing behavior. However, users can switch to a "demo" or other values to transition the APIs to a sandbox environment for testing with mock credentials. task-3820114 Forward-Port-Of: odoo/enterprise#59152
Resolved issues and error corrections
This update fixes multiple issues with the timesheet leaderboard feature, including preventing the leaderboard from displaying for employees without billable rates, correcting theoretical working hours calculations, and improving the visual presentation with proper icons and styling. These fixes ensure the leaderboard accurately reflects employee billing information and displays correctly for all users.
Original PR description
This commit adds various changes to the codebase to fix issues with the leaderboard system, issues such as the leaderboard being displayed even though the current employee has no billable time rate, billing rate target not having the fa-building icon next to it, theorical working hours being incorrect, visual issues and many more. task-3570302
Fixed an issue where users couldn't access products from their company when viewing the product catalog in Field Service tasks without existing sales orders. The fix ensures the system correctly recognizes which company's products should be available, allowing seamless product browsing in multi-company environments.
Original PR description
Steps ----- 1. Have field services and sales installed 2. Create a new company 3. Create a new product belonging to the new company 4. Log in under new company 5. Field service > click the "Product" smart button in a task with no sales order ** Read access error when accessing a page with a product from new company ** Issue ----- In a multi-company environment, accessing the catalog of products in field service is only possible if there are no products belonging to a different company than the user's main company. Note: this issue only arises if there's no sales order linked to the task. If an order already exists (for example by creating a sales order item in the task form), its associated company will be used. Fix --- We use the tasks's company to have the correct allowed_company_ids in the context. **opw-3752311**
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 fix resolves a crash that occurred when users clicked the cancel button in the signature request popup after scheduling a signature activity. The issue was caused by an incorrect parameter being passed when the popup closed. By updating how the parent view reloads after cancellation, the error is eliminated and the activity updates properly.
Original PR description
Version: ----------- saas-16.3 Steps to produce: ------------------------- 1. Open Sales or any other app. 2. Schedule an activity for Request Signature 3. Once the activity is scheduled, click on the Request Signature field 4. In the New signature Request pop-up click on cancel button ->Traceback occurs Issue: -------- A traceback occurs when we click on Request Signature after creating any Request Signature activity and click on cancel button. Cause: --------- The error occurs because when the cancel button is clicked, the onUpdate component is triggered to load and update the ID. However, a special parameter is passed incorrectly, leading to an error. Fix: ----- The issue can be resolved by changing the props from onUpdate to reloadParentView, the component correctly reload the parent view upon cancelation, This prevents the traceback error by ensuring that the activity is updated appropriately. task-3768008 Forward-Port-Of: odoo/enterprise#58729
This update upgrades the Dutch tax report templates used for submitting reports to the Netherlands fiscal authorities to the newer nt18 version. The templates have been updated to comply with the latest requirements from Dutch tax authorities, and a warning message has been added to remind users to upgrade their module before submitting reports.
Original PR description
The templates are used to create a report that will be sent to the fiscal authorities of the Netherlands. They have updated to a newer version of the template. Forward-Port-Of: odoo/enterprise#59907
This fix restores the ability for customers using global rounding to export their financial data to DATEV format. A previous restriction was blocking this important export functionality due to occasional minor rounding differences. The change prioritizes user access to critical business processes over preventing rare 1-cent rounding discrepancies.
Original PR description
Issue: If a customer was using `round globally` and at some point wanted to export its date, he could not do it because of this rounding parameter. The reason of the fix in the first place is not strong enough (occasional 1 cent rounding issue) to justify blocking such an important flow original pr: https://github.com/odoo/enterprise/pull/34560 opw-3848827 Forward-Port-Of: odoo/enterprise#60026
This fix corrects the WhatsApp message sent count in event communications to accurately reflect all messages sent, including those to unconfirmed attendees. Previously, the system was undercounting messages because it excluded unconfirmed attendees from the total sent count, making it difficult to track actual communication activity.
Original PR description
Before this commit the Whatsapp Sent Count (located in the Communication tab of the event view) wasn't including messages sent to the attendees who weren't confirmed. ### [This commit changes] Event…
Before this commit the Whatsapp Sent Count (located in the Communication tab of the event view) wasn't including messages sent to the attendees who weren't confirmed. ### [This commit changes] Event mail scheduler will include seats_uncofirmed into calculation of the mail_count_done which is the count of emails sent. This is reflecting the actual number of messages sent. ### [Reproduce] - Install whatsapp_event - Create event E starting in time T (Events/Events) - Add an "Unconfirmed" attendee - Add an E-Mail in the Communication tab of the event E - Set Interval time > T, - Template: "Email Reminder" - Trigger "Before the event" - Run scheduled Action sending whatsapp (Scheduled Actions / Event: Mail Scheduler) - BUG: message sent, but not included in the sent count in the communication tab of the event E Related to the commit in the odoo community called: [FIX] event: Include unregistered attendee emails in total sent count # Related PRs in odoo Community This Pr is a part of fix/test bundle. For more details check out the here Community PR: https://github.com/odoo/odoo/pull/153795 opw-3693626 Forward-Port-Of: odoo/enterprise#58428
This fix resolves an issue where opening the "Add to dashboard" dialog would permanently delete all version history from a spreadsheet, even if the user cancelled the operation. Users can now safely access the dashboard feature without losing their spreadsheet edit history.
Original PR description
Steps to reproduce: - create a new spreadsheet - edit a few cells to create a few history revisions - click on menu File > Add to dashboard - close the dialog (you don't even need to actually create the dashboard) - open the history: File > See version history => all the history is gone Task: 3850102
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 fixes how helpdesk ticket confirmation emails are grouped in customer inboxes. The system now uses the correct email field to ensure all related ticket responses appear together, improving the customer experience when managing support conversations.
Original PR description
Follow-up of 0fd53102589e2bdc4d4a257f367a37eca88604c8 The mail template 'Helpdesk: Ticket Received' should also use the `name` instead of the `display_name` for emails all emails to be properly grouped. opw-3748509
This fix resolves an issue where scanning a different product in the barcode app during picking would lose the connection to the original sales order. The barcode app now properly tracks which sales order a picking belongs to, ensuring all products scanned are correctly linked to the right order and backorders are created properly.
Original PR description
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group do the same for the barcode app opw-3644773 Forward-Port-Of: odoo/enterprise#60133 Forward-Port-Of: odoo/enterprise#57408
Users were unable to select different email templates when creating follow-up reminders for customers. The template dropdown only showed the currently configured template, making it impossible to change or re-select templates. This fix ensures the system properly recognizes available templates by setting the correct default model type for template filtering.
Original PR description
## Issue:
- When trying to select any new email template on follow up reports, it will only display the current template (the one configured in the followup level that the customer is currently in), and if you delete it, it's impossible to select one again.
## Steps To Reproduce:
- accounting > Follow-up reports.
- On a report click on FOLLOW UP.
- Notice missing templates in Content Template.
## Solution:
- The template_id field's domain is defined as `domain="[('model', '=', render_model)]"`, which filters based on render_model. However, it was not functioning correctly because the computation for `render_model` was not being triggered.
- To resolve this issue, I set 'res.partner' as the default render_model in the `default_get`.
opw-3776312
Forward-Port-Of: odoo/enterprise#58400This update fixes how taxes are calculated on product prices in the online store to match the standard sales process. Previously, the website store used an older tax calculation method that didn't handle all tax scenarios correctly, particularly when taxes were included in prices. Now all tax calculations use a single, more reliable method that properly handles complex tax situations.
Original PR description
Standard `sale` tax flows rely on `_get_tax_included_price_unit`, whereas part of `website_sale` flows do, while another part relies on `_fix_tax_included_price_company`, which doesn't handle some advanced cases (fiscal position mapping of price_included taxes). This commit drops the use of `_fix_tax_included_price_company` in website_sale, to only use the newest API of `_get_tax_included_price_unit`, supposed to handle more cases. Also makes all taxes computation go through a single entry point, `_apply_taxes_to_price`, already used for `combination_info` logic (/shop/product), but not in `_get_sales_prices` (/shop page). opw-3700803 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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 update resolves a problem where Afterpay payments processed through Stripe were failing due to incorrect shipping address information. The fix ensures that accurate shipping address details from orders or invoices are properly sent to Stripe, improving transaction success rates for customers using Afterpay as a payment method.
Original PR description
Resolves an issue with Afterpay via Stripe not receiving correct shipping address details, causing transaction failures. Now, ensures shipping address from the order or invoice is accurately sent to Stripe if we have it. backport of this PR: #157828 opw-3419984
This update fixes a display issue on mobile devices where product cards in the online shop would overflow when showing large prices alongside action buttons like "Add to Cart" or "Add to Wishlist". The fix allows the card content to wrap naturally to multiple lines, ensuring a better shopping experience on smaller screens.
Original PR description
In mobile, having a somewhat 'large price' (like a few thousands currency units) can cause the bottom of the card to overflow (esp. if buttons like 'add to card' or 'add to wishlist' are present). This commit modifies the card template so that content is normally spaced and can wrap to a new line if need be. opw-3706637
Users can now add spaces at the end of link labels without experiencing cursor flickering. This fix resolves a frustrating issue where the text editor would prevent users from typing spaces at the end of link text, improving the overall editing experience when creating and modifying links.
Original PR description
Current behavior before PR: The cursor kept on flickering when attempting to enter a space at the end of label text field of a link resulting in not being able to add space at all. Desired behavior after PR is merged: Now, it's possible to add spaces at the end of a link label. task-3820250 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160661 Forward-Port-Of: odoo/odoo#160060
This fix corrects a rounding issue that occurred when creating downpayments on sales orders with multiple line items. Previously, the system would round the downpayment amount separately for each line, causing small rounding errors to accumulate and result in incorrect total amounts (e.g., 840.01 instead of 840.00). The fix now calculates the downpayment amount correctly by rounding once at the end rather than line-by-line.
Original PR description
Create a SO with the following lines: 1. Price Unit 10000, tax 20% 2. Price Unit 10000, tax 20% 3. Price Unit 10000, tax 20% 4. Price Unit 50, tax 20% Confirm, Create a downpayment of 840.0 Check the downpayment Issue: Amount will be 840.01 This occurs because we compute the downpayment values aggregating so line amounts line by line, each time multiplying for the downpayment percentage and rounding the result. Over multiple lines this mechanism may accumulate a rounding error. opw-3812925 Forward-Port-Of: odoo/odoo#160662 Forward-Port-Of: odoo/odoo#160521
When creating a purchase order with a product that has multiple vendor options, the product description was incorrectly showing information from all vendor lines instead of just the selected vendor. This fix ensures the product description displays only the information from the specific vendor chosen for that purchase order.
Original PR description
Currently, when creating a purchase order, if the product has multiple vendor lines (with the vendor selected on the PO), the product description uses information from all the vendor lines; instead…
Currently, when creating a purchase order, if the product has multiple vendor lines (with the vendor selected on the PO), the product description uses information from all the vendor lines; instead of using information from the vendor line that is used for the price.
Steps to reproduce:
-------------------
* Go to the **Purchase** App
* Go to **Products**
* Select any product
* Select the **Purchase** tab
* Add `Vendor Product Name` and `Vendor Product Code` in additional line fields
* Add two vendor lines
* Line 1:
`Vendor`: Vendor1
`Vendor Product Name`: P1
`Vendor Product Code`: A
`Price`: 1
* Line 2:
`Vendor`: Vendor 1
`Vendor Product Name`: P1 bis
`Vendor Product Code`: B
`Price`: 5
* Select **Orders** > **Request for quotation**
* Create a new quotation
* Select Vendor 1, add the product for which we just added the two vendor lines
> **Observation**: The description of the product shows information from both vendor lines added.
Why the fix:
------------
This behavior was introduced when `name_get` was removed to use `dispay_name` instead.
* https://github.com/odoo/odoo/pull/122085/commits/a8b15c7ab5e2d850d0551a6eb4213bb20a30b210
* https://github.com/odoo/odoo/pull/122085/commits/a8b15c7ab5e2d850d0551a6eb4213bb20a30b210
When adding a product to the purchase order, the onchange on `product_id` is called. The onchange calls the function `_product_id_change`, which itself calls `_get_product_purchase_description`. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1224 https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1401-L1407
The line `name = product_lang.display_name` calls the function `_compute_display_name`.
* We do have a parnter_id in the context as we have selected a vendor on the purchase order. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L434
* We don't have a supplierinfo in the context yet but we have multiple supplierinfo with the same partner_id. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L466-L467 Here we thus have 2 sellers.
* Ultimately, the display name joins the different display names computer for each seller. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L473-L483
Coming back to the line `self.name = self._get_product_purchase_description(product_lang)`, we now have the name of the purchase order line set as the concatenation of display names from the supplierinfo, i.e `'[A] P1, [B] P1 bis'`.
Once the onchange is called, the function `_compute_price_unit_and_date_planned_and_name` is being called. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1295-L1302 In the current state, we do not meet the if condition. Indeed, the line has a name (`'[A] P1, [B] P1 bis'`) but it isn't in the default_names (`['[A] P1', '[B] P1 bis']`). It somehow corresponds to a setting where the name of the purchase order line was setup by the user.
With this current fix, the call to `_product_id_change` will set the name of the line with the product information from the company; and not the partner/seller. We also need to add this name to the `default_names` in `_compute_price_unit_and_date_planned_and_name` so that the description gets recomputed with regards to the seller, if any.
I tested the scenario where:
* The second supplierinfo has a smaller unit price when buying 10 products. On the sale order line, when I set the quantity to 20, the unit price is updated as well as the description. The description is updated as `line.name` is indeed in `default_names`.
opw-3802182
Forward-Port-Of: odoo/odoo#158398Fixed an issue where clicking the "Go to Website" button from the backend was incorrectly redirecting users to the website homepage instead of the specific course, event, or slide page. This problem occurred when users were accessing the system from a different domain than the configured base URL. The fix ensures users are taken to the correct page they intended to view.
Original PR description
How to reproduce: - Install website_slides with demo data - Log in from localhost - Log in from dev.localhost - Switch to localhost - (The system property web.base.url is http://dev.localhost:8069…
How to reproduce: - Install website_slides with demo data - Log in from localhost - Log in from dev.localhost - Switch to localhost - (The system property web.base.url is http://dev.localhost:8069 but we are on localhost) - Go to a course in the back end and click on “Go to website” button You are redirected to the frontend website home page instead of the course home page. This fix solves the problem. Afer correcting this error for the courses (slide.channel), we have found the same problem for: - event.sponsor - event.meeting.room - slide.slide So we apply the same correction for them. Technical note: the button "Go to website" uses the open_website_url method of WebsitePublishedMultiMixin that relies on website_url. That method expects a relative URL in the computed field website_url and not an absolute one (actually, the method already handle adding the website domain, so it expect the relative part). The problem is that the compute method for the field website_url of channel compute an absolute URL. The consequence is that the user is redirected to the home page instead of the course page (by WebsitePreview, see get path method). In stable, we cannot change easily website_url to make it relative as it is used in other of places (ex.: if we make it relative the share link in the sidebar on the frontend is relative which is not correct and in mail template, the URL might not be correct as the mail system append the default domain for relative URLs). So instead, we override open_website_url to use a relative URL when the website is not defined. If the website is defined on the course, we call the super implementation because a domain change might be required. Note that by doing that, we duplicate the code of _compute_website_url in open_website_url but making the URL relative instead of absolute. So we should clean that in master. Task-3635856 Forward-Port-Of: odoo/odoo#160114 Forward-Port-Of: odoo/odoo#148103
Portal users who are subcontractors were incorrectly seeing unpublished products in the online shop. This fix ensures that portal users can only view published products, while still maintaining their access to subcontracting features. The change prevents unpublished products from appearing in shop searches and listings for non-internal users.
Original PR description
### Steps to reproduce: - Activate Subcontracting in the settings. - Create a storable product - Create a BOM of type "subcontracting" where the subcontractor is a Portal user (e.g. Joel Willis) for…
### Steps to reproduce: - Activate Subcontracting in the settings. - Create a storable product - Create a BOM of type "subcontracting" where the subcontractor is a Portal user (e.g. Joel Willis) for that product. - Log out and connect as your portal user. - Go to the website shop and search your product. ### Expected behavior: The portal user should only be able to see the published products. ### Current behavior: The portal user sees unpublished products for which he is subcontractor. ### Cause of the issue: The commit 99b56ec has introduced a subcontracting portal. In order for portal users to be able to interact with product templates, the following rule was added to the "base.group_portal": https://github.com/odoo/odoo/blame/f0a0d596ab716c96de38a5c0f837da2924338d7b/addons/mrp_subcontracting/security/mrp_subcontracting_security.xml#L120-L131 When you go to the website shop, the records displayed in the shop will be computed here: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/addons/website_sale/controllers/main.py#L348 https://github.com/odoo/odoo/blob/f0a0d596ab716c96de38a5c0f837da2924338d7b/addons/website/models/mixins.py#L353-L357 However, during this call, the "ir.rule" added for portal users will be added to the SQL query here: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/odoo/models.py#L4682 As such, products (enven if unpublished) for which the portal user is a subcontractor will be fetched and displayed in the shop. ### Fix: Since the "ir.rule" can not be changed only for flows involving the `website_sale` application, we propose to make a change similar to commit b1f6171 whose purpose is to hide unpublished products for non internal users: https://github.com/odoo/odoo/blob/1c321cd1fe0aabd9cd92c13cd1eae604e5817ae0/addons/website_sale/models/product_template.py#L105-L108 opw-3768845 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159420
This update fixes an issue preventing SMS messages from being sent to partners with mobile phone numbers from Panama. The fix addresses a compatibility problem with the phone number validation library by applying a targeted patch to recognize Panama's updated mobile phone number format.
Original PR description
Current behavior:
---
Cannot send SMS to a partner that has a mobile phone number from Panama.
Steps to reproduce:
---
```python
# 6198 5462 is a valid phone number
parsed = phonenumbers.parse('6198 5462', region='PA')
is_valid = phonenumbers.is_valid_number(parsed)
is_valid == False
```
Cause of the issue:
---
Old versions of phonenumbers (external library) are not updated
to Panamas mobile phone numbers system change.
Fix:
---
Monkey patched the library
Similar as: https://github.com/odoo/odoo/commit/b21df8797141dac9f2cf0315658a08a238849f5b
opw-3682631
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#159970
Forward-Port-Of: odoo/odoo#156969This fix prevents users from changing a product's type when there are pending inventory transactions in their company. Previously, users could bypass this restriction in multi-company setups, which could cause data integrity issues. The fix ensures proper access controls are applied regardless of company configuration.
Original PR description
Description of the issue/feature this PR addresses: Without sudo, an user in a company can change the type even if somes not done stock.move.line exists. @amoyaux --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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
This fix resolves an issue where scanning a different product in the barcode app during picking would lose the connection to the original sales order. When creating backorders, new products weren't being properly linked to their sales orders. The fix ensures that product movements are correctly associated with their procurement groups, maintaining the relationship between picked items and customer orders.
Original PR description
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group set the context key during the write to ensure moves are created with the correct group test: https://github.com/odoo/enterprise/pull/57408 opw-3644773 Forward-Port-Of: odoo/odoo#160596 Forward-Port-Of: odoo/odoo#157255
This fix prevents users from accidentally editing kit product quantities directly in the inventory system. Previously, when managing inventory for kit products (products made up of components), the system would allow direct editing of the kit quantity even though only component quantities should be adjustable. Now the system enforces this rule, ensuring inventory data stays consistent.
Original PR description
Steps to reproduce: - Create a storable kit product - Update on hand quantity: only the components are displayed(correct behavior) - In Inventory tab open Inventory Adjustement - Possible to edit kit quantity Bug: In the product tab when trying to update qty the kit product is replaced with its components instead but it is still Possible to edit kit quantity directly in the inventory app Fix: introduced python constraint to prevent user from directly editing the kit product qty opw-3681703 Forward-Port-Of: odoo/odoo#160787 Forward-Port-Of: odoo/odoo#157061
This update corrects how URL fields display links in the web interface. Previously, the system didn't properly detect when to add the necessary prefix to URL values, which could result in broken or incorrectly formatted links. This fix ensures that all URL fields now display and function correctly.
Original PR description
Before this commit, we didn't correctly detect when to prefix the value of an url field for the href of its link. 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#160623 Forward-Port-Of: odoo/odoo#160536
Miscellaneous changes
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457
Original PR description
It should not be common, but through custo or in debug mode, one can create a menu without an URL since it's not required on the model. Through regular flows, it won't be possible since our UI won't let you go through when creating a menu if you don't set a URL. Followup of https://github.com/odoo/odoo/commit/948235079f002794f9837d3cf91e2d20e3254e20 Forward-Port-Of: odoo/odoo#160546 Forward-Port-Of: odoo/odoo#160457