Monday, April 29, 2024
6 changes · 17.0
Enhancements to existing features
The minimum required Python version is now stored as a variable in the codebase instead of being hardcoded. This makes it easier for developers to reference and manage Python version requirements, and helps determine when temporary code workarounds can be safely removed as Python versions are updated.
Original PR description
Make the mininum version of Python a variable so that it can be easily retrieved and used by the code. For example, it could be used to detect when a monkey patch should be removed. Forward-Port-Of: odoo/odoo#163030 Forward-Port-Of: odoo/odoo#156774
Resolved issues and error corrections
Fixed a display issue in the Sequences settings page where the legend text was difficult to read due to being confined to a single column. The text now spans multiple columns, allowing it to display properly without awkward line breaks. This improves the user experience when viewing sequence information in the Technical Settings.
Original PR description
Issue ----- The trailing text on the `ir.sequence` view is unreadable due to spanning only one column which leads to awkward line-wrapping. Steps ----- - Go to Settings -> Technical -> Sequences. - Select the sequence with code "sale.order". - Have a look at the legend. Cause ----- The `<div>` containing the text spans only one column which is not suitable for long text. opw-3820141 Forward-Port-Of: odoo/odoo#160912
Miscellaneous changes
Steps to reproduce the bug: - Create a storable product “C1” tracked by SN - Update the quantity with “SN1” - Create another storable product “P1” with BoM: - Component: “C1” - Create a repair order: - product: select any product to repair - parts: - product: C1 - Type: Remove - Lot/Serial: “SN1” - Confirm and validate the repair order - Create a MO to produce 1 unit of P1: - Select the “SN1” for C1 - confirm and validate the MO - un
Original PR description
Steps to reproduce the bug: - Create a storable product “C1” tracked by SN - Update the quantity with “SN1” - Create another storable product “P1” with BoM: - Component: “C1” - Create a repair order:…
This update fixes code compatibility issues with Python 3.12 by correcting invalid escape sequences throughout the Odoo codebase. These syntax warnings would become errors in future Python versions, so this proactive fix ensures the system continues to work smoothly as Python evolves. The changes are technical in nature and do not affect user-facing functionality.
Original PR description
Since python3.12 invalid escape sequences are deprecated and this will be removed in future versions. This commit fixes all the missing escape automatically using All checks passed!. Some will be escaped, other may be replaced by r string. Another solution would be to hide the deprecation warning but this would maybe need to adapt some of the versions later leading to another forwardport hell, lets fix it one for all once we are at it. Note that ruff check will forbid to introduce new ones in any cases. Manual forward port of #163493
This fix corrects a test in the Manufacturing Subcontracting module that was failing in the community version due to an incorrect field reference. The test was using an outdated field name that only worked when an enterprise module was installed, masking the underlying issue. The fix ensures tests run correctly across all versions.
Original PR description
qty_done -> quantity Breaks tests for community version. Error is undetected with enterprise module 'stock_barcode' that re-introduce the field 'qty_done'
Steps to reproduce the bug:
- Create a storable product “C1” tracked by SN
- Update the quantity with “SN1”
- Create another storable product “P1” with BoM:
- Component: “C1”
- Create a repair order:
- product: select any product to repair
- parts:
- product: C1
- Type: Remove
- Lot/Serial: “SN1”
- Confirm and validate the repair order
- Create a MO to produce 1 unit of P1:
- Select the “SN1” for C1
- confirm and validate the MO
- unbuild the MO
- Create another MO with 1 unit of P1
- Select the “SN1” for C1
- Try to confirm and validate the MO
Problem:
An userError is triggered:
“The serial number SN1 used for component C1 has already been consumed”
As the SN1 has already been used in a MO, it is detected here: https://github.com/odoo/odoo/blob/683c02b099ac616cba747e5bba1cebb126e5f8ed/addons/mrp/models/mrp_production.py#L1958-L1963
After removing the 'unbuild move lines' from the count, we also exclude the removed 'stock.move.line' entries with a different 'location source' than 'internal'.":
https://github.com/odoo/odoo/blob/683c02b099ac616cba747e5bba1cebb126e5f8ed/addons/mrp/models/mrp_production.py#L1965-L1973
So:
(duplicates = 1) - (duplicates_unbuild= 1) - (removed=1) = -1
opw-3577147
Forward-Port-Of: odoo/odoo#144443
Forward-Port-Of: odoo/odoo#144263-Step to reproduce: internal user have admin right for event, no read permission for SO line, then go to attendee of registered and paid event, print report full page ticket -> traceback occurs -Solution is to add sudo in the xml file 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#160870 Forwa
Original PR description
-Step to reproduce: internal user have admin right for event, no read permission for SO line, then go to attendee of registered and paid event, print report full page ticket -> traceback occurs -Solution is to add sudo in the xml file 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#160870 Forward-Port-Of: odoo/odoo#160278