Daily updates from Odoo
Wednesday, March 20, 2024
22 changes · master
Enhancements to existing features
The Documents search filter was adjusted so users no longer see an archive toggle where it is not relevant. This keeps document filtering clearer while preserving the underlying domain selector behavior needed by the application.
Original PR description
In this commit, for the resModel documents.document, we don't want to have the toggle button included archives. We had to create a getShowArchivedCheckBox method in domain_selector.js to be able to patch it in enterprise/documents/static/src/web/documents_domain_selector.js so that this functionality still works. task~3599274 https://github.com/odoo/odoo/pull/143949
This update removes a redundant internal field used to identify WhatsApp conversation types. The system now determines that information from existing conversation details, reducing duplication and making future maintenance simpler without changing the user experience.
Original PR description
Type information can be deduced from other fields, in particular model and channel_type. Part of task-3265211 https://github.com/odoo/odoo/pull/158222
The subscription sales guided tour was updated to match recent functional changes in the app. This helps keep onboarding and automated walkthroughs aligned with the current user experience, reducing confusion during demonstrations or testing.
Original PR description
task-id: 3339727
The payment status page is now generated entirely by the server instead of combining server and browser-rendered sections. This makes the checkout and subscription payment experience more reliable by reducing context mismatches and simplifying how status updates are displayed.
Original PR description
Previously, /payment/status would render a template on the server-side, and a JS widget would render subtemplates on the client-side and insert them in the server-side rendered template.
However, mixing server-side and client-side templates causes issues because the context is not properly communicated between client and server. It also makes the code more complex.
This change assumes that no new information returned by /payment/status is worth re-rendering part of the template. If the transaction moves from a pending ('draft', 'pending') state to a final state, the customer should be redirected to the final route that will display the updated information on the transaction.
task-3340354
Community PR: https://github.com/odoo/odoo/pull/149821
Documentation PR: https://github.com/odoo/documentation/pull/8198
Upgrade PR: https://github.com/odoo/upgrade/pull/5829Subscription log handling has been cleaned up to make reporting more dependable across changes such as currency updates, cancellations, reopenings, closures, and renewals. This helps businesses get more consistent subscription history and metrics when customer contracts change over time.
The Helpdesk search results page has been updated to match the newer design used across other areas. Users now have clearer navigation back to the Helpdesk home page, including when no results are found, and page editing areas have been repositioned for easier use.
Original PR description
This commit adapts the design and the structure of the search results page that was not in line with the new design implemented in all the other modules. It also improves the search results page in a…
This commit adapts the design and the structure of the search results page that was not in line with the new design implemented in all the other modules. It also improves the search results page in a functional POV by: - Adding a way to go back to helpdesk home when there is no results - Adding a back button always visible to go back to helpdesk home - Moving the dropable zone to a more convenient area (on top of the page instead of in the middle of the content) - Adding `title` attributes where it was needed | State | Before | After | |--------|--------|--------| | Results | <img width="1710" alt="Screenshot 2024-01-31 at 16 19 28" src="https://github.com/odoo/enterprise/assets/110090660/13e2a88b-93ad-43da-a8a6-582195dcc869"> | <img width="1710" alt="Screenshot 2024-01-31 at 16 19 07" src="https://github.com/odoo/enterprise/assets/110090660/dd3cd2cf-e353-4179-806c-4a5338c780f9"> | | Empty | <img width="1725" alt="Screenshot 2024-01-31 at 16 19 57" src="https://github.com/odoo/enterprise/assets/110090660/f759d76d-f248-419c-bc0e-8fcafab2fe02"> | <img width="1712" alt="Screenshot 2024-01-31 at 16 19 45" src="https://github.com/odoo/enterprise/assets/110090660/dd86ed2d-3ba5-4210-9989-ba84b65c8fa6"> | task-3668073
The helpdesk training pages no longer use an extra styling class that was only needed to adjust badge spacing. This keeps the interface consistent with the updated standard badge design and reduces unnecessary customization.
Original PR description
This utility class was arbitrarily applied to fix badge's padding. Since we increase Badge's default padding in community counterpart PR, we don't need this class anymore and thus we can remove it. task-3749107 Com-PR: https://github.com/odoo/odoo/pull/154759
Resolved issues and error corrections
Corrected demo planning entries so allocated hours are calculated consistently instead of appearing as zero. This helps sample data better reflect realistic schedules, contracts, and sales planning behavior for demonstrations and testing.
Original PR description
Some planning slots from demo data had allocated hours = 0. For some, it was because the resource had no contract at that period. For others, because they took place on saturdays. Finally, some had an allocated percentage of 0. They where created with allocated hours = 4, but then a `_read_group` called `_compute_allocated_hours`, and because the key `sale_planning_prevent_recompute` was in the context, it was not computed. But then `_compute_allocated_percentage` was called, which didn't make sense, and resulted in weird interactions. task-3321377
This update improves the internal test suite for Odoo's Gantt view by reducing timing-related failures and using more suitable test helpers. It helps make future changes safer and more predictable, without changing day-to-day user features.
Original PR description
Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Community: https://github.com/odoo/odoo/pull/157863 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
Spreadsheet templates, dashboards, and related tests were updated to use the new pivot function names. This keeps existing reporting spreadsheets compatible with the latest spreadsheet engine changes without introducing visible feature changes for users.
Original PR description
This commit is the counterpart of https://github.com/odoo/odoo/pull/155522 It adapts the code to the new name of the function. Task: 3748561
The product configurator is now merged into the main rental website sales module instead of being maintained as a separate add-on. This simplifies maintenance and helps keep the shopping experience consistent, especially when customers choose configurable products online.
Original PR description
Since ee3bf99, `sale_product_configurator` is auto-installed. The settings to enable or disable it have been removed and the only way to deactivate the product configurator is to uninstall the module but then it provides a poor UX (eg. in `website_sale` buy now button on /shop page adds the first available combination to the cart instead of opening the configurator). Therefore, we have decided to merge modules to improve the readability and reduce the complexity of our codebase. See also: - https://github.com/odoo/odoo/pull/155449 - https://github.com/odoo/upgrade/pull/5750 task-3763473
Miscellaneous changes
Since the wishlist benefit displays cars, they should be grouped by category as for the Company car benefit. Forward-Port-Of: odoo/enterprise#58864
Original PR description
Since the wishlist benefit displays cars, they should be grouped by category as for the Company car benefit. Forward-Port-Of: odoo/enterprise#58864
TaskID: 3782701 https://www.partena-professional.be/fr/nos-connaissances/infoflashes/delais-de-preavis-en-cas-de-demission-des-travailleurs-en-service#:~:text=Avec%20cette%20nouvelle%20loi%2C%20la,avant%20le%201er%20janvier%202014 Forward-Port-Of: odoo/enterprise#57970
Original PR description
TaskID: 3782701 https://www.partena-professional.be/fr/nos-connaissances/infoflashes/delais-de-preavis-en-cas-de-demission-des-travailleurs-en-service#:~:text=Avec%20cette%20nouvelle%20loi%2C%20la,avant%20le%201er%20janvier%202014 Forward-Port-Of: odoo/enterprise#57970
## Issue: - If a Contact record has a complete Address record (Street 1, Street 2, City, State, Zip, and Country) and the Check Print Format is set to TOP then the Address and the check memo overlap (see screenshot). ## Steps To Reproduce: - Create a contact with a long name and long address. - Be in a company set up under l10n_us. - Set your check printing to be Print Check (Top) - US. - Issue a Vendor Payment to the contact - Add a memo and print check. - The address overlaps the
Original PR description
## Issue: - If a Contact record has a complete Address record (Street 1, Street 2, City, State, Zip, and Country) and the Check Print Format is set to TOP then the Address and the check memo overlap (see screenshot). ## Steps To Reproduce: - Create a contact with a long name and long address. - Be in a company set up under l10n_us. - Set your check printing to be Print Check (Top) - US. - Issue a Vendor Payment to the contact - Add a memo and print check. - The address overlaps the reference ## Solution: - Adjust the font size of the address to make it slightly smaller, thereby avoiding overlap. opw-3735486 Forward-Port-Of: odoo/enterprise#58269
On the form view editor, click on a button that has studio_approval="True" and some rules behind it Before this commit, unchecking the "Set approval rules" checkbox in the form view editor did not disable the rule itself, causing the expected workflow to trigger the rule, even if the button should not be enforcing them. This was because of commit 3db107ae481a8da85aa356c729bae5fc246e655b, which introduced server-side enforcement of studio approval rules. After this commit, we archive rules th
Original PR description
On the form view editor, click on a button that has studio_approval="True" and some rules behind it Before this commit, unchecking the "Set approval rules" checkbox in the form view editor did not disable the rule itself, causing the expected workflow to trigger the rule, even if the button should not be enforcing them. This was because of commit 3db107ae481a8da85aa356c729bae5fc246e655b, which introduced server-side enforcement of studio approval rules. After this commit, we archive rules that were set on the button, so the expected outside studio workflow works opw-3810516 Forward-Port-Of: odoo/enterprise#58859
Before this commit: Inside any workspace, select a document, and drag & drop it again into the same current workspace. Issue: The current condition(located in `_onDrop`) fails to check if the workspace where the document is being dragged to, is the same as the workspace it's already present. Effects: - `orm.write` is being executed unnecessarily. - Traceback is observed exclusively in 17.0 and master when similar steps are followed inside TRASH workspace. (will be solved by this PR)
Original PR description
Before this commit: Inside any workspace, select a document, and drag & drop it again into the same current workspace. Issue: The current condition(located in `_onDrop`) fails to check if the…
Before this commit: Inside any workspace, select a document, and drag & drop it again into the same current workspace. Issue: The current condition(located in `_onDrop`) fails to check if the workspace where the document is being dragged to, is the same as the workspace it's already present. Effects: - `orm.write` is being executed unnecessarily. - Traceback is observed exclusively in 17.0 and master when similar steps are followed inside TRASH workspace. (will be solved by this PR) Reason: - The workspaces inside the search panel are listed as list-items (`<li>`). Inside those items we have their display names enclosed within the `<header>`. On selecting any workspace (including trash), an active class is added to the `<header>`. - When the `_onDrop` event gets called, the condition before this commit tries to check the presence of an 'active' class on the `<li>` and not on the `<header>` element present inside it. After this commit: The updated condition removes unnecessary computation and eliminates the traceback as well. Task-3627626 Forward-Port-Of: odoo/enterprise#58772 Forward-Port-Of: odoo/enterprise#53158
- Whether the option is visible or not shouldn't depend on the `mail_extra_fields` compute. Use a separate compute to avoid useless processing. - Wrong moves used in the warning computation. - Remove useless trigger in `api.depends` to avoid unecessary computations. Forward-Port-Of: odoo/enterprise#58830
Original PR description
- Whether the option is visible or not shouldn't depend on the `mail_extra_fields` compute. Use a separate compute to avoid useless processing. - Wrong moves used in the warning computation. - Remove useless trigger in `api.depends` to avoid unecessary computations. Forward-Port-Of: odoo/enterprise#58830
Before this commit: IoT logs are kept in an IoT log file. Any time the support would need IoT log information, we are forced to ask the customer to send it to us as it requires to be in the LAN. After this commit: Relevant* log lines will be automatically send out to the server using an HTTP route. This feature can be toggled within the Handlers list page  preview:  preview:  *: Relevant = - Any odoo logs (depending on the level set in the handlers list, see: https://github.com/odoo/odoo/pull/134174 ) - Any other logs (werkzeug, python libraries, etc.) except /hw_proxy/hello Note: IoT logs received by the server will ALWAYS be logged regardless of it level. So an Odoo server set in INFO which receive a DEBUG log from the IoT will log it in its log with the DEBUG level Related odoo PR: https://github.com/odoo/odoo/pull/150920 opw-3696519 Forward-Port-Of: odoo/enterprise#58111 Forward-Port-Of: odoo/enterprise#55055
task-3815657 Forward-Port-Of: odoo/enterprise#58855
Original PR description
task-3815657 Forward-Port-Of: odoo/enterprise#58855
When there are no car available in the wishlist, and the advantage is checked, we get a traceback as it tries to split the new_value which is False. So we check that we have a new_value before. Forward-Port-Of: odoo/enterprise#58850
Original PR description
When there are no car available in the wishlist, and the advantage is checked, we get a traceback as it tries to split the new_value which is False. So we check that we have a new_value before. Forward-Port-Of: odoo/enterprise#58850
### Steps to reproduce issue: 1. Create a Product with Lots/Serials tracking 2. Create a BoM with an operation and add Product as By-Product 3. Create a Manufacturing Order using the BoM, click on Confirm then Plan 4. Go to Shop Floor, click on "Register [the By-Product]" - Not the button with the units 6. Click on either "Import Lots" or "Generate Serials" 7. Enter a Lot/Serial number and click on "Generate" 8. Traceback error: > loc_dest = self.env['stock.location'].br
Original PR description
### Steps to reproduce issue: 1. Create a Product with Lots/Serials tracking 2. Create a BoM with an operation and add Product as By-Product 3. Create a Manufacturing Order using the BoM, click on…
### Steps to reproduce issue:
1. Create a Product with Lots/Serials tracking
2. Create a BoM with an operation and add Product as By-Product
3. Create a Manufacturing Order using the BoM, click on Confirm then Plan
4. Go to Shop Floor, click on "Register [the By-Product]"
- Not the button with the units
6. Click on either "Import Lots" or "Generate Serials"
7. Enter a Lot/Serial number and click on "Generate"
8. Traceback error:
> loc_dest = self.env['stock.location'].browse(default_vals['location_dest_id'])
> KeyError: 'location_dest_id'
### Explanation:
When going through the Shop Floor, the context is missing a lot of elements that are normally passed in the manufacturing order form. https://github.com/odoo/odoo/blob/338173e231355d265ddc88bcef5e9b0a608e248e/addons/mrp/views/mrp_production_views.xml#L432-L437
### Suggested fix:
`default_dest_location_id` is the missing element causing the traceback but fixing it reveals that `default_location_id` is also missing, we then add it to the context as well.
Test is done in Enterprise while fix is in Community.
opw-3719439
Forward-Port-Of: odoo/enterprise#57789Due to commit [1] The props on context for m2o take an object but the shopfloor hasn't been adapted [1] https://github.com/odoo/odoo/commit/3670f78be767396f322ff3ebf068af5c2f547b36 Forward-Port-Of: odoo/enterprise#55169
Original PR description
Due to commit [1] The props on context for m2o take an object but the shopfloor hasn't been adapted [1] https://github.com/odoo/odoo/commit/3670f78be767396f322ff3ebf068af5c2f547b36 Forward-Port-Of: odoo/enterprise#55169