Daily updates from Odoo
Monday, March 18, 2024
21 changes · saas-17.1
Enhancements to existing features
This update automatically fills the PAN number when a GSTIN is entered, streamlining the process for users in India. Previously, users had to manually input the PAN, even after providing the GSTIN, leading to potential errors. This change simplifies tax compliance and reduces manual data entry.
Original PR description
Previously, users were required to enter their PAN number even after manually inputting their GSTIN, even though the PAN is inherently part of the GSTIN (spanning from the 3rd to the 12th character). Furthermore, there was no mechanism to alert users if the manually entered PAN did not match the PAN segment within the GSTIN. This commit automates the filling of the PAN based on the entered GSTIN. Now upon entering a GSTIN, the corresponding PAN is auto-filled. Task link: https://www.odoo.com/web#model=project.task&id=3767627 task-3767627 Forward-Port-Of: odoo/odoo#157006
Resolved issues and error corrections
This update fixes an issue where the 'dropship' option was missing from the 'Deliver To' dropdown in RFQs. The change ensures users can correctly select dropshipping for new purchase orders, aligning with previous functionality. This improves the user experience for dropshipping workflows.
Original PR description
**Current behavior:** When making a new RFQ, dropship is not an available selection for the 'Deliver To' option. **Expected behavior:** As on previous versions, you should 'dropship' should be selectable here which reveals a sub-selection to select the customer who should receive the shipment. **Steps to reproduce:** 1. Enable `Dropshipping` in Purchase settings as well as `Storage Locations` in Inventory settings 2. Create a new RFQ, observe that in the 'Deliver To' dropdown there is no way to select a dropship option **Cause of the issue:** Dropshipping was made into a discrete `stock.picking.type`.code and the domain that constrains the selection menu options was not updated to accomodate this change. **Fix:** Update the domain to show picking types that have the dropship code. opw-3764617 Forward-Port-Of: odoo/odoo#155529
This update resolves a bug in the Website Editor that prevented users from correctly resizing columns within the editor iframe. The issue stemmed from a change in how the editor's preview was structured, specifically after version 16.0. This fix ensures proper column resizing functionality.
Original PR description
**[FIX] web_editor: fix resize column outside of the iframe** Steps to reproduce the bug: - Enter Website edit mode. - Drag and drop an "Image-Text" snippet onto the page. - Grab the right edge of…
**[FIX] web_editor: fix resize column outside of the iframe** Steps to reproduce the bug: - Enter Website edit mode. - Drag and drop an "Image-Text" snippet onto the page. - Grab the right edge of the right column of the snippet and extend it to the right until it overflows the iframe and hovers over the editor panel. - Release the mouse, then hover over the iframe again. - Bug: The "mouseUp" event was not triggered, and the column resizing still occurs. This bug occurs because the "mouseUp" event was attached to the <body> of the iframe and not to the window of the iframe. Indeed, for mouse events to be triggered outside of an iframe, they need to be attached to the iframe's window. This fix is not necessary before the version 16.0. Before V16.0, the page preview and the options panel shared the same window. It's only since this commit [1], where we moved the page preview into an iframe, that the bug occurs. [1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b taks-3562970 Forward-Port-Of: odoo/odoo#157627 Forward-Port-Of: odoo/odoo#156529
This update fixes an issue where time off request details weren't visible when viewing attachments. Now, when you approve a time off request and attach a document, the request's information will be correctly displayed within the attachment preview, ensuring users have complete visibility into approved time off.
Original PR description
Steps ----- 1. Create a time off request, approve it and add a document. Issue ----- The details of the time off request are not visible when the attachment preview is displayed. **opw-3792894** Forward-Port-Of: odoo/odoo#157024
This update ensures website images automatically adjust to different screen sizes, preventing overflow issues when the default thumbnail style is removed. By adding the 'img-fluid' class, images will now scale correctly, providing a better user experience across devices. This is a simple fix that improves visual consistency.
Original PR description
Add `img-fluid` class so that image remains responsive when `Shape: Thumbnail` is not applied. task-3266862 Forward-Port-Of: odoo/odoo#118916
This update fixes an issue where changing the label of a link within the website editor would remove any associated styling. The fix ensures that style changes to link labels are correctly preserved, improving the user experience when customizing website content. This resolves a visual inconsistency and allows for more flexible content design.
Original PR description
Issue: ====== When you update the link button label from the sidebar it loses its style. Steps to reproduce the issue: ============================= - Got to website editor - Insert a text block - Added a button in the text block and any label - Click on the button to edit it from the sidebar - Change font size or font color or any style you want - Update the label - The style is lost Origin of the issue: ==================== When updating the label, we search for the first child that has that text, but when we have `ZWS start` it will be considered as the first child and then we update the inner text of the `a` element so we loose the span of the text which has the custom styles. Solution: ========= We search for the first child which is not `ZWS` task-3721686 Forward-Port-Of: odoo/odoo#155038
This update fixes a technical issue preventing users from correctly configuring newsletter subscription blocks. Specifically, the 'Display Thanks Button' option was causing errors when combined with certain 'On Success' settings. This change ensures a smoother user experience when setting up newsletter forms.
Original PR description
When configuring a Newsletter Block snippet to display a subscription form, the option to decide whether a message must be displayed is only available when "On Success" is set to "Show Message" through the button beside that option. Unfortunately, the general option for the "Thanks" message is not disabled for other "On Success" values, for which no outcome can display a message. Trying to combine these triggered an error. This commit fixes this problem by hiding the "Display Thanks Button" option when the "Form Subscription" template is selected. Steps to produce: - Install `website_mass_mailing`. - Drop a "Newsletter Block" snippet. - Change template to "Form Subscription". - Click on "Subscribe" button. - Change "On Success" to "Nothing". - Click on "Display Thanks Button". => An error was displayed. task-3748574 Forward-Port-Of: odoo/odoo#157517
This update resolves an issue where submenus wouldn't display properly when the website's navigation switched to 'Hover' mode. The fix adjusts the offset settings within Bootstrap to ensure submenus appear as expected when hovering over menu items, improving the user experience.
Original PR description
Steps to reproduce: - Go to website > Switch the navbar to "Hover" mode (see: `Submenus` > `On Hover`). - Create a submenu and drag it under a navbar menu item > The submenu will always disappear…
Steps to reproduce: - Go to website > Switch the navbar to "Hover" mode (see: `Submenus` > `On Hover`). - Create a submenu and drag it under a navbar menu item > The submenu will always disappear before being reached after the hover. Since Bootstrap does not provide a built-in way to use the "hover" as a dropdown trigger, a custom implementation was used to handle the "show on hover" scenario (see: `hoverableDropdown`). This code also relies on the submenus being correctly positioned on hover. Starting from [1], the public `menuDirection` widget was completely removed (used to align website navbar submenus in an optimal way) and was replaced by a patch that allows Bootstrap to position dropdowns dynamically inside a navbar (using Popper). A side effect of this patch is the use of BS default offset config to set the positions, leading to a small gap that automatically hides the submenus when hovered. The goal of this commit is to prevent this issue by simply forcing the offset to 0 when the dropdowns are inside a navbar. [1]: https://github.com/odoo/odoo/commit/8689241f86e2d4ddb4e4510951f92b80e115b914 opw-3766516 Forward-Port-Of: odoo/odoo#157804 Forward-Port-Of: odoo/odoo#157281
This update fixes a reporting issue where the Point of Sale sales report incorrectly displayed the total sales amount including VAT. The fix ensures the 'Total (VAT Excl)' column accurately reflects the sales amount excluding VAT, providing more precise financial reporting for sales transactions. This change impacts the accuracy of sales data analysis.
Original PR description
Current behavior: The pos sale report is showing the wrong value in the "Total (VAT Exl)" column. The value acutally shown is the total tax included. Steps to reproduce: - Create a product with a tax included in price - Create a pos order with this product - Validate the order - Close session and print the pos sales report - Check the value in the "Total (VAT Exl)" column. opw-3684937 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157753 Forward-Port-Of: odoo/odoo#157451
This update fixes an issue where PDF attachments uploaded via the chatter's drag-and-drop feature weren't correctly displayed in the PDF viewer. The fix ensures that attachments uploaded through the dropzone are properly loaded, improving the user experience when viewing invoices.
Original PR description
Steps to reproduce ================== - Go to Accounting > Customer Invoices - Open any record with no attachments - Drag & drop a pdf attachment on the chatter => The PDF viewer is empty Cause of the issue ================== When uploading an attachment from the FileUploader, the parent view is reloaded. This is not the case when uploading an attachment from the dropzone. opw-3748853 Forward-Port-Of: odoo/odoo#157232
This update fixes a bug where the product configurator wasn't shown for products with only custom attributes, preventing users from customizing these items when adding them to their cart. Now, the configurator will automatically open for any product with configurable attributes, streamlining the customization process for simple products.
Original PR description
Before this commit, the product configurator dialog was not shown when adding to the cart, a product with only no variant attribute values, using the buy button on the '/shop' page. Now, if the product has configurable attributes, the product configurator dialog is shown. opw-3736469 Forward-Port-Of: odoo/odoo#157737
This update corrects a bug where the time off duration was incorrectly set to zero when a related contract was expired. The fix ensures accurate time off calculations by properly handling contract status changes, preventing misleading data and improving the reliability of time off reporting.
Original PR description
Purpose ======= The time off duration is set to 0 when the related contract is set as expired, then we remove the end date and set the contract back to running. That's because the check was done before calling super, hence the contract is excluded from the candidates because it is still expired without end date, which would make no sense when trying to retrieve the related calendar. TaskID: 3806342 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#157681
This update resolves an issue where the calendar month view incorrectly displayed event start times before 9:00 AM. The fix ensures that event start times are accurately shown, regardless of the event creation time, by setting the event duration. This improves the overall usability of the calendar feature.
Original PR description
The `test_calendar_month_view_start_hour_displayed` makes sure that start hour is displayed in calendar month view. The test was failing before 09:00 AM because after creating the event, it sets the start time to 10:00 without setting the stop time or duration. So when creating this event before 09:00 with a default duration of 1 hour, the stop time would be before 10:00, and it would raise an error. This commit aims to fix this issue by adding a step to set the duration of the event, avoiding the potential error. fixes runbot-59850 Forward-Port-Of: odoo/odoo#157263
A technical issue preventing users from opening the P&L report when using a specific grouping option has been resolved. This fix corrects a typo in a database constraint, ensuring the report functionality works as intended. The change was a result of a minor oversight during a report improvement.
Original PR description
Steps to reproduce: - accounting report > P&L > net profit: set the 'groupby' to 'account_id' - save - try to open the P&L -> Invalid Operation Cause: During the improvement of the report a small change has been forgotten The `groupby` has been changed to `user_groupby` https://github.com/odoo/enterprise/commit/99c82df3d24209de12e2442fd15d2472d9e968f6#diff-bc8d6ed5aa6dab6b7ba46566170cdb7297104580d9b8d6c7081f72e3c2a5a9c4R187-R191 and we forgot to change the `api.constrains`'s args opw-3714626 Forward-Port-Of: odoo/odoo#156879
This update ensures that employees and users automatically have an avatar displayed when a picture isn't manually set. Previously, a blank space was shown. This enhancement provides a more professional and consistent user experience, especially for new internal users.
Original PR description
Improve avatar picture : if no picture is set, initials will be displayed. task : 3637523 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147446
Managers can now see the description of new allocation requests. Previously, the system required managers to manually name each allocation to proceed with validation. This update ensures consistency in how allocations are created and viewed, improving the manager workflow.
Original PR description
Currently when a manager goes to validate an allocation, the name/description of the allocation is not displayed. This introduces the need for manager to name each allocation manually to be able to…
Currently when a manager goes to validate an allocation, the name/description of the allocation is not displayed. This introduces the need for manager to name each allocation manually to be able to validate them. Steps to reproduce: ------------------- * Open **Time off** app * On the dashboard, select **New allocation Request** * Save the allocation as it is * Select **Management** > **Allocations** > Observation : The description field of the new allocation is not filled. * Select the new allocation * Validate > Observation: Unable to validate, description field required. Why the fix: ------------ The description of an allocation corresponds to the field `name` in the model `hr_leave_allocation`. https://github.com/odoo/odoo/blob/e2ad568e6cd4de2d721149eb76d04f58c8510191/addons/hr_holidays/models/hr_leave_allocation.py#L40-L45 In the compute method of this field, the name gets actualy computed in the context of `is_employee_allocation`. https://github.com/odoo/odoo/blob/e2ad568e6cd4de2d721149eb76d04f58c8510191/addons/hr_holidays/models/hr_leave_allocation.py#L169-L177 We are in the context `is_employee_allocation` either by asking a new allocation from the dashboard, either by being on the `hr_leave_allocation_action_my` view. https://github.com/odoo/odoo/blob/2bcccbfb910609f6cf54d607d198aae4c5b28b86/addons/hr_holidays/static/src/views/hooks.js#L62-L65 https://github.com/odoo/odoo/blob/2bcccbfb910609f6cf54d607d198aae4c5b28b86/addons/hr_holidays/views/hr_leave_allocation_views.xml#L456 On those two views, the description is computed AND readonly. Since the name is readonly, it means that the inverse of the compute method will not get called, thus never setting `private_name`. https://github.com/odoo/odoo/blob/2bcccbfb910609f6cf54d607d198aae4c5b28b86/addons/hr_holidays/models/hr_leave_allocation.py#L182-L186 When a manages goes to approve an allocation, he goes through **Management** > **Allocations**. The views used are either `hr_leave_allocation_view_tree` or `hr_leave_allocation_view_form_manager`. On those views, we are not in the context `is_employee_id`, the allocation name is no more readonly AND the name is required in order to validate the allocation. For a manager to be able to see anything in the description, the field `private_name` must be set. https://github.com/odoo/odoo/blob/2bcccbfb910609f6cf54d607d198aae4c5b28b86/addons/hr_holidays/models/hr_leave_allocation.py#L164-L178 This fix aims to create consistency in the creation of allocations. We can observe that the name is not in `vals` in the `web_save` function when creating an allocation through the dashboard or the tab **My Time** > **My allocations**. However, when creating an allocation through **Management** > **Allocations**, name can be found in `vals`. https://github.com/odoo/odoo/blob/764088d6d5a5a18be451ec26b886691718bef835/addons/web/models/models.py#L69-L69 `vals` corresponds to `changes` in this function: https://github.com/odoo/odoo/blob/764088d6d5a5a18be451ec26b886691718bef835/addons/web/static/src/model/relational_model/record.js#L1045-L1051 To have the name added to `changes`, we ultimately need the following condition to be false. https://github.com/odoo/odoo/blob/764088d6d5a5a18be451ec26b886691718bef835/addons/web/static/src/model/relational_model/record.js#L592-L599 In the manager flow, this is the case as `name` is not readonly. As a regular employee, the only possible way to have this false while keeping the `name` readonly, is to make it an active field. `name` in now in `vals` and thus in `vals_list` in the create method. This now allows to set `private_name` through the inverse function of name. opw-3722093 Forward-Port-Of: odoo/odoo#155767
This update resolves an issue where down payment order lines were failing due to a recent change that removed product settings from down payments. The code has been updated to properly handle down payment lines without a product, ensuring these orders can be processed correctly. This improves the reliability of the sales order creation process.
Original PR description
Since 9aa52dd6418e5881adc2d96d15d062b55d6150c5, down payments are created without any product (and dp product settings have been removed). Nevertheless, the SOlines views were not adapted and the product was still required in the view, even if the line was a down payment. This commit makes sure that a down payment line without a product is considered valid client-side. opw-3798379 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a crash that occurred when deleting sheets within the spreadsheet feature. The fix ensures that charts are properly removed from the system when a sheet is deleted, preventing outdated chart references from causing errors. This improves spreadsheet stability and reliability.
Original PR description
__Current behavior before commit:__ When a sheet is deleted, `charts` from `OdooChartCorePlugin` are not being updated. Therefore, since the commit [`905d856`][1], `getOdooChartIds` returns some chart ids that do not exist on any sheet anymore. This induces a crash when opening a spreadsheet that contains such charts. __Description of the fix:__ Handle `DELETE_SHEET` event in `OdooChartCorePlugin` by removing Odoo charts that don't belong to any sheet. __Steps to reproduce the issue on runbot:__ - Insert a Odoo graph inside a spreadsheet (starting from any app) - Add a sheet to it to the new spreadsheet - Delete the sheet that contains the chart - Leave the spreadsheet - Go to Documents app and try to open the spreadsheet -> Traceback opw-3783745 [1]: https://github.com/odoo/odoo/commit/905d8565ad2fae3f7ff96606352ee3ab86ee78cb Forward-Port-Of: odoo/odoo#157847 Forward-Port-Of: odoo/odoo#157728
This update fixes an issue where notes on sale orders weren't consistently formatted in the sale order report. The change ensures that notes are properly aligned and readable, improving the clarity and professionalism of the reports generated for sales data. This enhances the user experience when reviewing sales information.
Original PR description
opw-3725405 Forward-Port-Of: odoo/odoo#157859
This update resolves a bug preventing users from correctly generating lot/serial numbers when registering by-products on the Shop Floor. The fix adds missing location IDs to the context, ensuring the manufacturing process functions as intended. This improves the reliability of lot/serial tracking within the production workflow.
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/odoo#155846
This update fixes a visual issue where 'false' was incorrectly displayed next to recipients in the system when their email address was missing. Now, users without email addresses are shown with their name followed by '(no email address)', improving the user experience and ensuring accurate recipient information is presented.
Original PR description
'false' is displayed in the popover next to the recipients in the absence of an email address as well as the title of the recipients If the partner has no email, it should show something like "[name] (no email address)]" task-3787703 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157850 Forward-Port-Of: odoo/odoo#157431