Monday, December 23, 2024
19 changes · saas-17.4
Resolved issues and error corrections
Fixed an issue where the point of sale customer display could send an incomplete request to the IoT Box. This helps ensure customer-facing display information is retrieved reliably during checkout and closing flows.
Original PR description
Customer display "get" action was missing `params` key, required for the IoT Box to understand the request correctly.
This fixes an issue where Point of Sale logins for another company could show an invalid "NaN" value in the login number. Businesses using multiple companies now get proper, readable login references, reducing confusion during POS access and tracking.
Original PR description
Before this commit, in a multi-company setup, logging into the PoS for the second company would result in the login number being NaN, such as 00337-NaN-0004. opw-4425868 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures the Colombian electronic invoicing certification option can only be enabled when the test environment is also enabled. It prevents companies from saving an inconsistent configuration that could disrupt DIAN certification setup.
Original PR description
**Problem:** l10n_co_dian_certification_process (Activate the certification process) can still be checked if l10n_co_dian_test_environment (Test environment) is left unchecked. There are two ways to…
**Problem:** l10n_co_dian_certification_process (Activate the certification process) can still be checked if l10n_co_dian_test_environment (Test environment) is left unchecked. There are two ways to cause this: 1. | | l10n_co_dian_test_environment | l10n_co_dian_certification_process | |--------|--------|--------| | Start | False | False | | End | False | True | Here, the write call will trigger l10n_co_dian_certification_process is set from False to True without triggering the “if” condition since l10n_co_dian_test_environment is not set. 2. | | l10n_co_dian_test_environment | l10n_co_dian_certification_process | |--------|--------|--------| | Start | True | False | | End | False | True | Here, l10n_co_dian_test_environment is set from True to False from the first write call, which will trigger the “if” condition, causing it to also set l10n_co_dian_certification_process to False. However, then the l10n_co_dian_certification_process is set from False to True by the second original write call. **Purpose:** Make the l10n_co_dian_certification_process field a computed field such that l10n_co_dian_certification_process cannot be set to True if l10n_co_dian_test_environment is False. **Steps to Reproduce on Runbot:** 1. Install l10n_co_dian Case 1: 2. Start at the state, where both l10n_co_dian_test_environment and l10n_co_dian_certification_process are False 3. Check the box for l10n_co_dian_test_environment so that the box for l10n_co_dian_certification_process will also show up. Then check the box for l10n_co_dian_certification_process and uncheck the box for l10n_co_dian_test_environment. Finally save the new configuration. Case 2: 2. Start at the state, where l10n_co_dian_test_environment is True and l10n_co_dian_certification_process is False 3. Check the box for l10n_co_dian_certification_process then uncheck the box for l10n_co_dian_test_environment. Finally save the new configuration. opw-4225471
Miscellaneous changes
The domain for inverses is not always correct and may crash for computed fields. Resolve the `get_depends` using the `get_domain_list` whenever possible. task-4380712 odoo/enterprise#75965 *FIX for master* in https://github.com/odoo/odoo/pull/191351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191319
Original PR description
The domain for inverses is not always correct and may crash for computed fields. Resolve the `get_depends` using the `get_domain_list` whenever possible. task-4380712 odoo/enterprise#75965 *FIX for master* in https://github.com/odoo/odoo/pull/191351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191319
This PR fixes an issues about the terms & conditions overlapping the rest of the content on the `website_sale` payment page. Prior to this PR, the terms & conditions was positioned using a `position-absolute` with a `bottom-0`, resulting in the element extending to the topside if its content is very long. This led to some overlapping issues with the others elements of the view. To prevent this issue to happen, we position the element with a `top-100` and remove the `<div>` that aimed to ha
Original PR description
This PR fixes an issues about the terms & conditions overlapping the rest of the content on the `website_sale` payment page. Prior to this PR, the terms & conditions was positioned using a…
This PR fixes an issues about the terms & conditions overlapping the rest of the content on the `website_sale` payment page. Prior to this PR, the terms & conditions was positioned using a `position-absolute` with a `bottom-0`, resulting in the element extending to the topside if its content is very long. This led to some overlapping issues with the others elements of the view. To prevent this issue to happen, we position the element with a `top-100` and remove the `<div>` that aimed to handle the spacing at the bottom. We now manage this spacing with a utility class. opw-4373853 | 17.0 | This PR | |--------|--------| | <img width="472" alt="image" src="https://github.com/user-attachments/assets/6b4b768f-9764-45aa-84b8-94fcab059f30" /> | <img width="461" alt="image" src="https://github.com/user-attachments/assets/5cd8548e-9b8f-4036-84dd-3f224779af27" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191346
Currently when we validate a transfer with products tracked by serial number, we may run into a bottleneck when the `quality_mrp` module is installed. That's because there's 1 move_line by Serial Number and inside `_create_assign_production_lot` those move_lines are grouped by `(company_id, product_id, lot_name)`. As we are tracking by Serial Number, each of these group key will be unique. Also, the mls are grouped in key_to_mls using `__union__` which calls `browse` to produce a recordset, effe
Original PR description
Currently when we validate a transfer with products tracked by serial number, we may run into a bottleneck when the `quality_mrp` module is installed. That's because there's 1 move_line by Serial…
Currently when we validate a transfer with products tracked by serial number, we may run into a bottleneck when the `quality_mrp` module is installed. That's because there's 1 move_line by Serial Number and inside `_create_assign_production_lot` those move_lines are grouped by `(company_id, product_id, lot_name)`. As we are tracking by Serial Number, each of these group key will be unique. Also, the mls are grouped in key_to_mls using `__union__` which calls `browse` to produce a recordset, effectively setting the `_prefetch_ids` of the results to `_ids`. Therefore, in the sml `write` override in quality_mrp when there's a condition on `self.sudo().check_ids`, the `_prefetch_ids` of self will only be the id in self, leading to 1 SELECT query by SML, i.e. 1 SELECT query by serial number. This wouldn't be that much of an issue if `quality_check.move_line_id` was properly indexed but that's not the case. So this commit first adds a missing `btree_not_null` index on `quality_check.move_line_id` to change the query plan from Seq Scan to Index Scan. Then we manually set the `_prefetch_ids` in `_create_and_assign_production_lot` to reduce the number of queries. #### speedup In a 17 database with 750 000 quality checks, on hot cache, adding the index makes a single query go from ~50ms to 0.250ms. When doing a transfer of 1000 serial numbers, setting the `_prefetch_ids` reduce the number of queries from 1000 to 1. This query takes around 120ms on hot cache without the index. Both with the index and the `_prefetch_ids`, the total time of the `_create_and_assign_production_lot` method when validating a transer of 1000 serial numbers goes from 50ms * 1000 = 50s -> 2ms * 1 = 2ms. opw-4285293 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190479
Steps to reproduce - Create a new report with studio - Chose "External Business header/footer" - Try to add a /heading1 below the header - Crash ``` UncaughtPromiseError > TypeError Uncaught Promise > Cannot read properties of null (reading 'parentNode') TypeError: Cannot read properties of null (reading 'parentNode') ``` As `startContainerChild` and `endContainerChild` refers to a dom element that can be changed in the for loop, we can declare both of them after. opw-4368425
Original PR description
Steps to reproduce - Create a new report with studio - Chose "External Business header/footer" - Try to add a /heading1 below the header - Crash ``` UncaughtPromiseError > TypeError Uncaught Promise > Cannot read properties of null (reading 'parentNode') TypeError: Cannot read properties of null (reading 'parentNode') ``` As `startContainerChild` and `endContainerChild` refers to a dom element that can be changed in the for loop, we can declare both of them after. opw-4368425 Forward-Port-Of: odoo/odoo#190191
Description of the issue/feature this PR addresses: - In Mexico, failing to assign an appropriate account for cash basis movements can be considered illegal. Therefore, it's essential to set a default one for Mexican companies. Current behavior before PR: - When the 'Cash Basis' (`tax_exigibility`) setting is enabled (via Settings → Accounting → Taxes), no 'Base Tax Received Account' (`account_cash_basis_base_account_id`) is set by default for companies using the 'Mexico' fiscal localizatio
Original PR description
Description of the issue/feature this PR addresses: - In Mexico, failing to assign an appropriate account for cash basis movements can be considered illegal. Therefore, it's essential to set a…
Description of the issue/feature this PR addresses: - In Mexico, failing to assign an appropriate account for cash basis movements can be considered illegal. Therefore, it's essential to set a default one for Mexican companies. Current behavior before PR: - When the 'Cash Basis' (`tax_exigibility`) setting is enabled (via Settings → Accounting → Taxes), no 'Base Tax Received Account' (`account_cash_basis_base_account_id`) is set by default for companies using the 'Mexico' fiscal localization. Desired behavior after PR is merged: - For companies with Mexican fiscal localization, set the default *Base Tax Received Account* to the account with code `899.01.99`. This account, already defined in the [l10n_mx data](https://github.com/odoo/odoo/blob/17.0/addons/l10n_mx/data/template/account.account-mx.csv#L47), is specified by the SAT (_Servicio de Administración Tributaria_, Mexico's primary tax authority) for miscellaneous or generic adjustments (see their [official documentation](http://omawww.sat.gob.mx/fichas_tematicas/buzon_tributario/Documents/codigo_agrupador.pdf#page=22)). opw-[4393526](https://www.odoo.com/odoo/project.task/4393526) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190279
Users may give gift cards to their customers. Acting like a payment method, gift cards will lower the total amount of a sale order up to 0. Currently, in case of fixed tax applied in the order, the tax amount cannot be covered with the card balance Steps to reproduce - Generate a Gift Card of 100$ - Create a Sale Order with a product having: - price: 90$ - quantity: 1 - A fixed tax of 10$ - Add the gift card to the order Issue: Fixed tax amount will be left uncovered. This
Original PR description
Users may give gift cards to their customers. Acting like a payment method, gift cards will lower the total amount of a sale order up to 0. Currently, in case of fixed tax applied in the order, the tax amount cannot be covered with the card balance Steps to reproduce - Generate a Gift Card of 100$ - Create a Sale Order with a product having: - price: 90$ - quantity: 1 - A fixed tax of 10$ - Add the gift card to the order Issue: Fixed tax amount will be left uncovered. This is an issue because when using the gift card (or anyhow having the total 0), it means the fixed tax cost is supported by the merchant so it should be covered by the gift card opw-4422678 Forward-Port-Of: odoo/odoo#191321
## Description Previously, the scale ticks in Odoo charts did not respect localization settings. This PR resolves the issue by leveraging the formatValue method within the scale tick callback function. Task: [4273769](https://www.odoo.com/odoo/project/2328/tasks/4273769) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189562
Original PR description
## Description Previously, the scale ticks in Odoo charts did not respect localization settings. This PR resolves the issue by leveraging the formatValue method within the scale tick callback function. Task: [4273769](https://www.odoo.com/odoo/project/2328/tasks/4273769) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189562
This fixes the simple, yet very common case where: - You are creating an expense for one of your employee - The partner of said employee has its field `parent_id` set to be your own company - The expense move commercial_partner_id would then always be yourself - You never pay your employees, only yourself - ??? - Jail task-id: 4345465 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I ha
Original PR description
This fixes the simple, yet very common case where: - You are creating an expense for one of your employee - The partner of said employee has its field `parent_id` set to be your own company - The expense move commercial_partner_id would then always be yourself - You never pay your employees, only yourself - ??? - Jail task-id: 4345465 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#191347 Forward-Port-Of: odoo/odoo#187778
This commit prevents dropping an "inner content" block into an image field. Steps to reproduce: - Go to the "/shop" page. - Click on one of the products to go to its product page. - Enter edit mode. - Bug: It is possible to drop any "inner content" block into the "product" image field. This commit also fixes the following bug: - Go to the homepage in edit mode. - Drag and drop a "text-image" block onto the page. - Drag and drop a "badge" (or any other "inner content" block) un
Original PR description
This commit prevents dropping an "inner content" block into an image field. Steps to reproduce: - Go to the "/shop" page. - Click on one of the products to go to its product page. - Enter edit mode. - Bug: It is possible to drop any "inner content" block into the "product" image field. This commit also fixes the following bug: - Go to the homepage in edit mode. - Drag and drop a "text-image" block onto the page. - Drag and drop a "badge" (or any other "inner content" block) under the image. This is possible, and it's the intended behavior. - Click on the image and add a link to it. - Bug: Try dragging and dropping a "badge" under the image again, it is no longer possible. [opw-4273436](https://www.odoo.com/web#id=4273436&cids=1&menu_id=4720&action=333&active_id=1695&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#191200 Forward-Port-Of: odoo/odoo#190732
Steps to reproduce the issue: - Go to the settings and enable multi-routes. - Navigate to the warehouse and attempt to duplicate it. Problem: The operation types “Repair,” “Stock After Manufacturing Operation,” “Picking Before Manufacturing,” and “Manufacturing” are copied instead of creating new records. opw-4386529 Forward-Port-Of: odoo/odoo#189965
Original PR description
Steps to reproduce the issue: - Go to the settings and enable multi-routes. - Navigate to the warehouse and attempt to duplicate it. Problem: The operation types “Repair,” “Stock After Manufacturing Operation,” “Picking Before Manufacturing,” and “Manufacturing” are copied instead of creating new records. opw-4386529 Forward-Port-Of: odoo/odoo#189965
Currently, an error occurs when validating stock moves without location. Step to produce: - Install the `mrp_subcontracting` module (make a debugger on). - Create a product, add some quantities, and remove the value of 'Production Location' and 'Inventory Location' from it. - Click on the 'Bills of Materials' button which is in the breadcrumbs of the product form view to create a bom of this product, And set a 'BoM Type' as Subcontracting and add an Administrator as 'Subcontractors'. -
Original PR description
Currently, an error occurs when validating stock moves without location. Step to produce: - Install the `mrp_subcontracting` module (make a debugger on). - Create a product, add some quantities, and…
Currently, an error occurs when validating stock moves without location. Step to produce: - Install the `mrp_subcontracting` module (make a debugger on). - Create a product, add some quantities, and remove the value of 'Production Location' and 'Inventory Location' from it. - Click on the 'Bills of Materials' button which is in the breadcrumbs of the product form view to create a bom of this product, And set a 'BoM Type' as Subcontracting and add an Administrator as 'Subcontractors'. - Go to Inventory / Operations / Transfers / Receipts and create a new 'Receipts', add an Administrator as 'Receive From', and add product in 'Operations' which we created bom. - Open a form view of 'Receive From' (res.partner) and remove value from 'Subcontractor Location' filed which is in the 'Sales & Purchase' tab. - Again come to receipts form view and try to validate it. `ValueError: Expected singleton: stock.location()` This occurs because the system attempts to get 'location_id' from the stock move at [1], but it is not available. Link [1]: https://github.com/odoo/odoo/blob/231952114ae730bb8d4671f4a61f738e8b6dd5b8/addons/stock/models/stock_move.py#L1566 To resolve this issue, add a condition to check if location_id is not available then use the company's subcontracting location as the default value. Sentry-6156032937 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191005
Fixing permission access error in the test (user does not have access to crm.lead). task-4380712 odoo/odoo#191319 Forward-Port-Of: odoo/enterprise#75965
Original PR description
Fixing permission access error in the test (user does not have access to crm.lead). task-4380712 odoo/odoo#191319 Forward-Port-Of: odoo/enterprise#75965
**Issue:** When the currency symbol display position is set to `After Amount`, the currency sign of a negative amount (credit) in a bank journal entry overlaps with the amount.  **Expected:** The `Amount` field should consistently display the currency symbol after the amount when configured as such, even for negative values. **Steps to reproduce:** 1. Activate the
Original PR description
**Issue:** When the currency symbol display position is set to `After Amount`, the currency sign of a negative amount (credit) in a bank journal entry overlaps with the amount.  **Expected:** The `Amount` field should consistently display the currency symbol after the amount when configured as such, even for negative values. **Steps to reproduce:** 1. Activate the Accounting app. 2. Go to `Accounting / Configuration / Accounting / Currencies`. 3. Select the company's currency and enable debug mode. 4. Set the `Display` `Symbol Position` to `After Amount` and save.  5. Navigate to `Accounting / Dashboard` and open the `Bank` journal. 6. Locate an entry with a credit (negative) value. **Cause:** The negative sign (`-`) is correctly displayed before the input field, but it is not added to the "ghost field" used for layout alignment, causing the currency symbol to overlap with the amount. **Fix:** Ensure the negative sign is included before the ghost field as well, aligning the visual layout with the actual value.  opw-4348298 Forward-Port-Of: odoo/enterprise#75567
Add missing index on move_line_id to speedup checking the check_ids of a stock_move_line. See community PR for more info https://github.com/odoo/odoo/pull/190479 Forward-Port-Of: odoo/enterprise#75537
Original PR description
Add missing index on move_line_id to speedup checking the check_ids of a stock_move_line. See community PR for more info https://github.com/odoo/odoo/pull/190479 Forward-Port-Of: odoo/enterprise#75537
### Before The 'Invalid Statements' filter only considered the case of the Ending Balance not matching the Starting Balance + the sum of its transactions. We were not considering the case of the Starting Balance of the statement not matching the previous statement's Ending Balance. ### Now Fixed the condition of the filter to account for the second case. task-4397412 Forward-Port-Of: odoo/enterprise#75710
Original PR description
### Before The 'Invalid Statements' filter only considered the case of the Ending Balance not matching the Starting Balance + the sum of its transactions. We were not considering the case of the Starting Balance of the statement not matching the previous statement's Ending Balance. ### Now Fixed the condition of the filter to account for the second case. task-4397412 Forward-Port-Of: odoo/enterprise#75710
If Starshipit is configured with TNT service (Australia), the API does not return a pdf field for `orders/manifest` endpoint. This causes the transfer validation process to fail in Odoo. This fix does not resolve the core problem, but it will allow the stock picking to be marked as "Done", with tracking number and link available to the user. The downside is that the manifest PDF will not be available Task: 4195503 Forward-Port-Of: odoo/enterprise#75829 Forward-Port-Of: odoo/enterprise#74190
Original PR description
If Starshipit is configured with TNT service (Australia), the API does not return a pdf field for `orders/manifest` endpoint. This causes the transfer validation process to fail in Odoo. This fix does not resolve the core problem, but it will allow the stock picking to be marked as "Done", with tracking number and link available to the user. The downside is that the manifest PDF will not be available Task: 4195503 Forward-Port-Of: odoo/enterprise#75829 Forward-Port-Of: odoo/enterprise#74190