Monday, April 8, 2024
39 changes
9 changes
Miscellaneous changes
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#1569695 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
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