Tuesday, March 11, 2025
17 changes · 18.0
Resolved issues and error corrections
Product images in the catalog no longer show an unwanted rectangle underneath when dark mode is enabled. The image container now matches the photo size, keeping product cards cleaner and more polished for users.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Enable dark mode (requires `web_enterprise`); 2. go to Sale; 3. create a quotation; 4. open product catalog. Issue ----- There's a weird rectangle visible…
Versions -------- - 18.0+ Steps ----- 1. Enable dark mode (requires `web_enterprise`); 2. go to Sale; 3. create a quotation; 4. open product catalog. Issue ----- There's a weird rectangle visible below the product images:  Cause ----- Commit 5234fad374c9c adapted Odoo for darkmode. As part of it, it added a background color for image fields, which defaults to `#E4E4E4`. There is no background color defined for image fields in light mode. Commit f601823a19231 added kanban cards to supersede kanban boxes. Part of this is to style `.o_field_image > div` elements to have 100% height and width, filling up as much space as possible. Commit e8836b42200e3 changed the catalog kanban to use cards instead of boxes. As a consequence, the background color for image fields now gets used on the `div` containing the image, which is sized to fill up all of the available space. Normally this background color is invisible if the image is allowed to fill up all the avaialble space as well, but for the catalog, they get restricted to 55 by 55 px. Hence the `img` element has its `max-height` set to 55px while its parent `div` element has `height` set to `100%`, filling up all available space with no regard for the image size. Solution -------- Rather than basing size on the parent element, have the `div` size be based on the containing image via `fit-content`. This ensures the image background doesn't leak out of its intended element. opw-4499252
This fix prevents an error when a helpdesk user starts a return for a customer who has no delivered orders or pickup records. The system now checks that a pickup exists before reviewing its status, allowing the return flow to handle this case safely.
Original PR description
### Steps to reproduce: - Install the helpdesk module. - Enable the return option in the helpdesk team. - Create a new helpdesk ticket. - Add a customer with zero sales orders picked (i.e., no pickup is present, meaning no order has been delivered to that customer). - Click on return. ### Issue: - Traceback error ### Cause: - The system tries to check the pickup state even when no sales order has been delivered for the customer, meaning no pickup is generated. ### Solution: - First, check if any pickup is generated. - Only proceed to check the pickup state if a pickup exists. task-4522134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change removes a now-unneeded customization in the store pickup area after a related update made it redundant. It helps keep the checkout code simpler and reduces the chance of future maintenance issues, with no expected change for customers.
Original PR description
After commit 2d4be3a1111451c67c69c016676c935be956c981 the override is no longer needed.
Product images in the catalog now display without an unwanted rectangle appearing underneath when dark mode is enabled. This improves the visual polish of quotations and product selection without changing business workflows.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Enable dark mode (requires `web_enterprise`); 2. create a quotation; 3. open product catalog. Issue ----- There's a weird rectangle visible below the images. Cause ----- Commit 5234fad374c9c adapted Odoo for darkmode. As part of it, it added a background color for image fields, which defaults to `#E4E4E4`. There is no background color defined for image fields in light mode. Commit e8836b42200e3 changed the catalog kanban to use cards instead of boxes. As a consequence, the background color for image fields now gets used on the `div` containing the image. Normally this background color is invisible, as the image overlaps the `div`, but because the catalog resizes images to 55px, the `div` is now taller than the image, revealing the element's background color. Solution -------- Add a `style="max-height: 55px;` attribute to the element to ensure its height corresponds to the image's. opw-4499252
This fixes leave allocation creation so the correct day or hour amount is used based on the leave type. It helps ensure employee leave balances are calculated and displayed accurately, especially for leave managed in hours.
Original PR description
Problem ---------- wrong behaviour with the number_of_days_display / number_of_hours_display / number_of_days : Objective ---------- Fix the TestHR.test_flow : in the creation of leave allocation. Only number_of_days_display can have a value. But with a leave_type.request_unit = 'hour', number_of_hours_display should be used Solution ---------- Depends on the visibility of number_of_days_display and number_of_hours_display, put the value in the good field task-4521658
Subscription credit notes now use the proper credit note email template instead of the standard invoice template. This helps customers receive clearer, more accurate communications when invoices are reversed.
Original PR description
## Problem When reversing an invoice and making a credit note on a subscription, the email template was still "Invoice: Sending" instead of choosing the credit note template "Credit Note: Sending". The condition on the following code was always True, meaning the super method, that is used to decide which template to take in case of a credit note, was never called. https://github.com/odoo/enterprise/blob/eb1eff85d2119a34997067fedb602e963a5d6f02/sale_subscription/models/account_move_send.py#L9-L14 ## Steps to reproduce - Take an invoice created through a subscription, reverse it (credit note action) - Try to send it - See that the email template is "Invoice: Sending" and not "Credit Note: Sending" ## Fix A condition was added to differentiate an invoice from a credit note. opw-4455155
This fixes an issue where copying a document folder or document structure did not correctly update ownership on its child items. The change helps keep access and accountability consistent when teams duplicate document hierarchies.
Original PR description
Backport of 8d613a60, forward port of 3ad8bf85 where we forgot about these children. Task-4593290
Miscellaneous changes
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next day (UTC date) instead of today. This causes problems validating invoices in ARCA (ex AFIP), since when generating the invoice with the next day's date, no more invoices could be generated with today's date. ### Current behavior before PR: 1. Make e-commerce sales after 9 PM local time AR in
Original PR description
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next…
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next day (UTC date) instead of today. This causes problems validating invoices in ARCA (ex AFIP), since when generating the invoice with the next day's date, no more invoices could be generated with today's date. ### Current behavior before PR: 1. Make e-commerce sales after 9 PM local time AR in a website set as automatic invoicing = True (journal by default it is an electronic journal) 2. Try to generate another invoice after that day, A simple way to test it is to make an invoice and then validate it. 3. We will receive ARCA (ex-AFIP) error telling us that we can not generate the invoice with today's date, we can only validate invoices with a date equal to or greater than tomorrow. ### Desired behavior after PR is merged: 1. Make e-commerce sales after 9 PM local time AR in a website set as automatic invoicing = True (journal by default it is an electronic journal) 2. Try to generate another invoice after that day, A simple way to test it is to make an invoice and then validate it. 3. Manual invoice will be generated and validated in AFIP with today's date as the invoice date. NOTE: We took the same approach that was used in the [POS module](https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/models/pos_order.py#L615-L631) to set the date, in this case, always forcing the Argentina timezone --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192808
maxmind decided to remove support for `raw_response` and chhange the API of Country/City to take all the raw_response components by keywords instead (maxmind/GeoIP2-python@4518919151e1b39bd544df653b41cd155dc2f708). This leads to location mocking not working anymore, which leads to the failure of `:TestWebsiteSaleCart.test_cart_new_fpos_from_geoip` when using geoip2 5.0. When mocking the request with a country code set, just try the new API then fallback on the old one (note: the commit also
Original PR description
maxmind decided to remove support for `raw_response` and chhange the API of Country/City to take all the raw_response components by keywords instead (maxmind/GeoIP2-python@4518919151e1b39bd544df653b41cd155dc2f708). This leads to location mocking not working anymore, which leads to the failure of `:TestWebsiteSaleCart.test_cart_new_fpos_from_geoip` when using geoip2 5.0. When mocking the request with a country code set, just try the new API then fallback on the old one (note: the commit also removes the `locales` default fallback, so make that explicit). Forward-Port-Of: odoo/odoo#200980
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 Forward-Port-Of: odoo/odoo#200978
Original PR description
Normally a `date` and a `datetime` compare `False`. For some reason however a `datetime` and a `freezegun.api.FakeDate` compare equal as long as the datetime's date part matches the fakedate's... until Python 3.13, when it stop working. I've no idea why it ever worked, but it's completely unnecessary, we can just get the reference datetime's `date()` part and compare that to the date. upstream issue: spulec/freezegun#568 Forward-Port-Of: odoo/odoo#200978
In order to be created, virtual operators like "is", "not_set" need field definitions to be known. It turns out that in sub trees corresponding to sub domains for any/not_any operators), the virtual operators are not created because: - the option getFieldDef is not passed when constructing sub trees - the getFieldDef function does not collect info on paths in sub trees. Here we solve each problem so that when modifying the tree in some way all virtual operators are restored correctly. For i
Original PR description
In order to be created, virtual operators like "is", "not_set" need field definitions to be known. It turns out that in sub trees corresponding to sub domains for any/not_any operators), the virtual operators are not created because: - the option getFieldDef is not passed when constructing sub trees - the getFieldDef function does not collect info on paths in sub trees. Here we solve each problem so that when modifying the tree in some way all virtual operators are restored correctly. For instance if a condition involving a boolean field like "Active is not set" is found in a sub tree, and a condition is added/removed elsewhere, the above condition will remain the same and not become "Active = False". Forward-Port-Of: odoo/odoo#200592
Description of the issue/feature this PR addresses: Spurious log entries Current behavior before PR: Odoo [logs](https://github.com/odoo/odoo/blob/17.0/odoo/modules/registry.py#L653-L654) indexes created by [_sync_plan_column](https://github.com/odoo/odoo/blob/17.0/addons/analytic/models/analytic_plan.py#L281) as unexpected Desired behavior after PR is merged: No log entry for expected index Steps to reproduce: - create a new analytic plan, ie 'Test plan' - go to technical/database
Original PR description
Description of the issue/feature this PR addresses: Spurious log entries Current behavior before PR: Odoo [logs](https://github.com/odoo/odoo/blob/17.0/odoo/modules/registry.py#L653-L654) indexes…
Description of the issue/feature this PR addresses: Spurious log entries
Current behavior before PR: Odoo [logs](https://github.com/odoo/odoo/blob/17.0/odoo/modules/registry.py#L653-L654) indexes created by [_sync_plan_column](https://github.com/odoo/odoo/blob/17.0/addons/analytic/models/analytic_plan.py#L281) as unexpected
Desired behavior after PR is merged: No log entry for expected index
Steps to reproduce:
- create a new analytic plan, ie 'Test plan'
- go to technical/database structure/fields, search for the custom field created on model account.analytic.line, named `x_plan{the id of the plan you created in step 1}_id`
- observe the field is not marked as indexed, even though the code creates an index
- update the analytic module, observe there will be an entry of the form `Keep unexpected index account_analytic_line__x_plan{the id of the plan you created in step 1}_id_index on table account_analytic_line`
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#200764
Forward-Port-Of: odoo/odoo#189240Issue: ----- This issue happens in mobile view only. When a user without any HR access rights tries to assign an Employee to a piece of equipment, they don't see the list of employees as expected. Instead, they get a "No records found!" message. Steps to reproduce: ----- - Install Employees & Maintenance apps - Create a new user and set the following acces rights - Employees -> None - Switch to that user - Go to Maintenance -> Equipment and select an equipment - Ensure the page
Original PR description
Issue: ----- This issue happens in mobile view only. When a user without any HR access rights tries to assign an Employee to a piece of equipment, they don't see the list of employees as expected.…
Issue:
-----
This issue happens in mobile view only. When a user without any HR access rights
tries to assign an Employee to a piece of equipment, they don't see the list of
employees as expected. Instead, they get a "No records found!" message.
Steps to reproduce:
-----
- Install Employees & Maintenance apps
- Create a new user and set the following acces rights
- Employees -> None
- Switch to that user
- Go to Maintenance -> Equipment and select an equipment
- Ensure the page is in mobile display mode (refresh if not already in mode)
- Select an equipment & try to assign an Employee
-> The widget displays a "No records found!" message
Other issue discovered:
-----
There is also a problem for the department field, where the user has access to
the field when in desktop mode but gets an "Access error" in mobile mode.
Cause:
-----
The equipment model stores the owner by referencing a hr.employee. Depending on
the display type, the user will get a simple dropdown list in desktop mode or a
kanban view in mobile mode.
When the kanban view is loaded in mobile mode, since the user does not have read
access to the hr.employee model, the ORM tries to load from the cache. Since it
doesn't find the content of a field (avatar_128 here) in the cache, it clears
the whole record, leading to the "No records found!" message. The hr team has a
workaround for this issue in the form of a custom many2one widget for employee
avatars.
Ticket:
opw-4309746
Forward-Port-Of: odoo/odoo#195718- disable duplicate for interviewer_ids - add `(copy)` to the name Task: 4606811 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199935
Original PR description
- disable duplicate for interviewer_ids - add `(copy)` to the name Task: 4606811 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199935
### Steps to reproduce: - Create a manufacturing order - Navigate to the Miscellaneous tab and add an Analytic Distribution - Add a component to the manufacturing order with the quantity set to 10000, for example - Produce the manufacturing order - Navigate to the analytic account line associated with the stock move with 10000 units - Update the analytic account line’s date to be in the previous week - Navigate to Timesheets > Timesheets > All Timesheets and then navigate to the pr
Original PR description
### Steps to reproduce: - Create a manufacturing order - Navigate to the Miscellaneous tab and add an Analytic Distribution - Add a component to the manufacturing order with the quantity set to…
### Steps to reproduce: - Create a manufacturing order - Navigate to the Miscellaneous tab and add an Analytic Distribution - Add a component to the manufacturing order with the quantity set to 10000, for example - Produce the manufacturing order - Navigate to the analytic account line associated with the stock move with 10000 units - Update the analytic account line’s date to be in the previous week - Navigate to Timesheets > Timesheets > All Timesheets and then navigate to the previous week - Observe that your user has worked a very large amount of overtime ### Cause: This is happening because for MO when creating an analytic line in some cases we store the unit_amount as the quantity of the materials used. https://github.com/odoo/odoo/blob/ee7fbcb759fd8257ed2f52d1d5acfc6921d42870/addons/stock_account/models/stock_move.py#L437-L438 And when fetching the worked hours for the overtime indication we don't check if the analytic line is a timesheet or not https://github.com/odoo/enterprise/blob/ca935872fd70b9fc5b2d13359424916b3afa01eb/timesheet_grid/models/hr_employee.py#L120-L126 https://github.com/odoo/enterprise/blob/ca935872fd70b9fc5b2d13359424916b3afa01eb/timesheet_grid_holidays/models/hr_employee.py#L10-L16 ### Fix: Since we are only fetching timesheets so we will check if the project is set or not as if it is set it means that the record is a timesheet opw-4179137 Forward-Port-Of: odoo/enterprise#81026
Version: - 17.0 Steps to reproduce: - Create subscription order. - Add one product with an "Order-Based" invoice policy and another with a "Delivery-Based" invoice policy. - Create one downpayment invoice and cancel it. - Click on "Create Invoice" button. Issue: - The 'Already Invoiced' amount is calculated incorrectly. Cause: - The issue occurs because the system calculates `amount_invoiced` by subtracting `amount_to_invoice` from `amount_total`. For delivery-based products tha
Original PR description
Version: - 17.0 Steps to reproduce: - Create subscription order. - Add one product with an "Order-Based" invoice policy and another with a "Delivery-Based" invoice policy. - Create one downpayment…
Version: - 17.0 Steps to reproduce: - Create subscription order. - Add one product with an "Order-Based" invoice policy and another with a "Delivery-Based" invoice policy. - Create one downpayment invoice and cancel it. - Click on "Create Invoice" button. Issue: - The 'Already Invoiced' amount is calculated incorrectly. Cause: - The issue occurs because the system calculates `amount_invoiced` by subtracting `amount_to_invoice` from `amount_total`. For delivery-based products that are not yet delivered, their amounts are not included in `amount_to_invoice`. As a result, only the order-based product's amount is considered, leading to incorrect calculations of `amount_invoiced`. Solution: - For subscription order calculate the `amount_invoiced` based on the amounts of order-based policy products and For delivery-based products, include only the amounts corresponding to delivered quantities and avoid subtracting it from `amount_total`. task-4453645 Forward-Port-Of: odoo/enterprise#81046 Forward-Port-Of: odoo/enterprise#76869
Before this commit, the map view removed the routes after reordering the items. Now, the routes are kept and the path recalculated. task-4493063 Forward-Port-Of: odoo/enterprise#80359
Original PR description
Before this commit, the map view removed the routes after reordering the items. Now, the routes are kept and the path recalculated. task-4493063 Forward-Port-Of: odoo/enterprise#80359