Daily updates from Odoo
Friday, March 15, 2024
51 changes · 17.0
Enhancements to existing features
This update refreshes the Spanish language translations for the localization reports module. The changes ensure that Spanish-speaking users see accurate and up-to-date text throughout the reporting features, improving the user experience for businesses operating in Spain.
Original PR description
Community: https://github.com/odoo/odoo/pull/157759
The Mexican EDI Extended module has been updated to use Odoo's standard file handling tools instead of outdated system path methods. This change improves reliability when locating files, particularly in complex system setups with symbolic links, and ensures the module works consistently across different environments.
Original PR description
Replace outdated realpath usage with odoo tools.file_open. Allows file_open to locate file from addons path rather than looking up through realpath. This will resolve potential issues with realpath not finding the proper path of files in certain situations (like a symlink). Worth noting that file_open uses abspath instead of realpath anyway. Forward-Port-Of: odoo/enterprise#58659 Forward-Port-Of: odoo/enterprise#58305
This update fixes an issue where discounts were being incorrectly recalculated when a sales order was confirmed. The change ensures that discounts applied to orders remain stable and are not recomputed during the confirmation process, which is particularly important for subscription-based sales. A test has been added to prevent this problem from occurring again in the future.
Original PR description
Add test to cover a problem fixed in `sale_subscription` opw-3740645 See also: https://github.com/odoo/enterprise/pull/58673 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves the performance of the accounting reconciliation process by adding a database index to the tax cash basis records. The optimization speeds up the deletion of reconciliation records, resulting in faster reconciliation operations for users working with accounts.
Original PR description
## Description Add missing index on FKey `tax_cash_basis_rec_id` to speed up deletion of `account.partial.reconcile` records during reconciliation. It's `btree_not_null` as the relationship is sparse. ## Reference opw-3649801 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157415
This update refreshes the Spanish language translations for the Odoo localization module. The changes ensure that Spanish-speaking users have accurate and up-to-date text throughout the system, improving their experience and usability.
Original PR description
Enterprise: https://github.com/odoo/enterprise/pull/58700
Resolved issues and error corrections
A help message that appears when lxml fails to decode an emoji was providing incorrect installation instructions. The message suggested using the `--nobinary` switch, but the correct syntax is `--no-binary`. This fix ensures users receive accurate guidance if they encounter this error.
Original PR description
If lxml fails to decode an emoji, it indicates to reinstall lxml using `--nobinary` switch, which is incorrect. If you use the suggested command will get a "no such option". The correct switch is `--no-binary`
This fix resolves an error that occurred when registering by-products with lot or serial number tracking in the Shop Floor interface. The system was missing required location information in the context, causing the process to fail. By adding the necessary location details, users can now successfully generate or import lot/serial numbers for by-products without encountering errors.
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-3719439This update fixes critical issues when importing Mexican invoices (CFDI) with unknown customers. The system now correctly identifies whether customers are domestic or foreign, properly sets required fields like country and zip code, and prevents incorrect "CFDI to public" settings. This ensures invoices are processed accurately and comply with Mexican tax requirements.
Original PR description
<strike> ## [FIX] l10n_mx_edi: Set "CFDI to public" to true for foreign invoices The field "CFDI to public" is currently only set to true in the domestic to public case (special VAT / Rfc value…
<strike>
## [FIX] l10n_mx_edi: Set "CFDI to public" to true for foreign invoices
The field "CFDI to public" is currently only set to true in
the domestic to public case (special VAT / Rfc value XAXX010101000).
After this commit "CFDI to public" will also be set to true in the
XEXX010101000 case.
related: task-3731058
</strike>
A part of the original PR was reverted before this PR was merged.
That part was left out in this FW port.
Reverting PR: https://github.com/odoo/enterprise/pull/58697
## [FIX] l10n_mx_edi: import: fix partner creation and detection logic
There are currently the following problems when importing an invoice
with an unknown partner. A new partner is created in this case.
For invoices with an unknown domestic partner (no special VAT values):
- (1) There may be a VAT validation error.
- (2) The "CFDI to public" field (l10n_mx_edi_cfdi_to_public) on the
invoice will be set to True. It should be False.
For invoices with an unknown foreign partner (no special VAT values):
- (3) The partner is created w/o country or VAT value (since only
the special VAT / Rfc value XEXX010101000 is used).
Thus the detection logic applied to the partner to decide
whether we are in the domestic non-public, domestic public or
foreign case does not work correctly.
The issues are solved after this commit by the following changes
- (A) The country is set to Mexico for all created partners that are not
from a foreign invoice (XEXX010101000).
- (B) The detection logic to decide the case is updated.
Also see (C).
- (C) The "Foreign Customers" fiscal position is set for partners
created during the import of foreign invoices.
Note on (B) / (C):
We still want to assume that partners without a country are Mexican
partners. This is done since (many) Mexican users will not set an
explicit country for Mexican customers.
(One would e.g. not put the country for domestic letters either.)
This is why we use the "Foreign Customers" fiscal position (C).
### Details
(1)
Due to the missing country the wrong VAT validation is used.
The same error can be reproduced on a runbot when creating a new
customer without country and VAT DEA040805DZ4
(works after setting the country to Mexico).
(2) / (3)
Due to the missing country on the partner the invoice is wrongly
interpreted as a domestic invoice to public (XAXX010101000).
This leads to the wrong "CFDI to public" value.
### task
task-3731058
Forward-Port-Of: odoo/enterprise#57516This fix restores payroll configuration records that were accidentally removed in a previous update to the Luxembourg payroll module. The records are being added back to ensure existing systems continue to work properly, while preventing them from affecting payslip calculations going forward.
Original PR description
In https://github.com/odoo/enterprise/pull/58054 by mistake one record has been removed, and one xml id has been changed. Which is errorious for stable. To solve the issue, we add back records. We added back l10n_lu_employees_atn_transport, in case it is referenced, but we make sure that it won't be added in in the payslip computation.
This fix ensures that when new employees or internal users are created without a profile image, the system automatically generates an avatar based on their name. This improves the user experience by providing a consistent visual identity for all team members from the moment they're added to the system.
Original PR description
Ensure an avatar is generated based on the employee/user name if no image is provided at the record creation (for internal users only). TaskID: 3637523
This fix corrects how credit notes created from the point of sale system reference the original document. Previously, the system was using the internal move name, but now it correctly uses the official document number. This ensures credit notes properly reference the original transaction for compliance and record-keeping purposes.
Original PR description
Before this commit, the origin doc number set when doing a credit note from the pos was the name of the reversed move instead of its l10n_latam_document_number which is now the case. Forward-Port-Of: odoo/enterprise#58480
This fix resolves an issue where developers using VSCode were not receiving autocomplete suggestions for OWL (Odoo Web Library) imports in the enterprise codebase. The fix adds a configuration file that properly exposes the OWL module to the TypeScript language server, improving the developer experience and reducing coding errors.
Original PR description
On an IDE (VSCode) with a TypeScript Server. For some reason, it was not possible to have imports suggestion to OWL in enterprise after commit [1]. Our main hypothesis is that, due to commit [1] who…
On an IDE (VSCode) with a TypeScript Server.
For some reason, it was not possible to have imports suggestion to OWL in enterprise after commit [1].
Our main hypothesis is that, due to commit [1] who points to odoo/addons, import lines in those files are resolved first in the scope of the odoo directory.
Consider a file in enteprise:
```js
import { registry } from "@web/core";
import { Component } from "@odoo/owl"
```
From the TSServer point of view it needs to resolve `@web` first, which itself has to resolve `@odoo/owl` in its directory scope, that is, in the scope of odoo community. It then keeps it in cache for later and importantly shadows the one present in enterprise/node_modules. Only then the explicit `@odoo/owl` is resolved with the odoo community's owl module from the cache.
Since that owl module from the cache is not explicitly available in enterprise, there are no imports suggestions.
This commit defines a main.d.ts file that only exposes the community's `@odoo/owl` explicitly. This hypothesis is confirmed by some hints that we discover during debugging:
- delete odoo/nodule_modules in enterprise: @odoo/owl becomes a suggestion again.
- comment the path line of @web/* in enterprise/jsconfig.json, owl is suggested.
- replace the copy of node_modules in enterprise by a symlink to odoo/node_modules, owl is suggested. This last one should also be considered as a valid fix for the current issue, as node_modules in odoo and enterprise *are the same*.
After this commit, owl is proposed for imports in VSCode.
[1]: 62cbb20
Forward-Port-Of: odoo/enterprise#58601This update resolves a crash that occurred when users attempted to export the intrastat report to PDF. The issue was caused by the system trying to process empty values incorrectly. The fix ensures that empty fields are properly handled during the PDF generation process, allowing users to successfully print their intrastat reports.
Original PR description
When a user tries to print in PDF the intrastat report, he gets a traceback because the pdf template tries to call `len()` on the name and the name equals `None`. The aim of this commit is using the `_build_column_dict` method instead of formatting the column by ourselves. By doing this, the `None` value are set for an empty string. no task id
This fix resolves an access error that occurred when creating batch payments for subsidiary companies or branches. The security rules have been updated to properly recognize parent company relationships, allowing users to successfully create and save batch payments across company hierarchies without encountering permission errors.
Original PR description
When creating a batch payment with a sub company, we get an access error. Steps: - Create a company X and a branch Y - Select branch Y - Create and validate a payment P - Create a batch payment with payment P and save -> AccesError: ... "Due to multi company" With this commit, we adapt the domain in the security rule to take the parent company into account. opw-3716721 Forward-Port-Of: odoo/enterprise#58526
This update removes the year value from Hong Kong payroll time off type names. Previously, the year was hardcoded in the name, which meant it wouldn't automatically update when the calendar year changed. By removing the year from the name, the time off types will remain accurate and relevant without requiring manual updates.
Original PR description
Steps to reproduce: - Install l10n_hk_hr_payroll Current behaviour: - Time off type name contain year value Expected behaviour: - Time off type name should not contain year value Explanation: - Year changed will not update the time off type name, therefore better to not include the year value inside the name X-original-commit: 224aa76
This update brings Portuguese Balance Sheet and Profit & Loss reports into compliance with the official general regime regulations. The financial statements now correctly align with the Portuguese accounting standards (SNC 2016), ensuring that companies using Odoo in Portugal will generate accurate regulatory reports that match government requirements.
Original PR description
In Portugal, there are four regimes of regulations, which include a CoA and financial statements: general regime, small companies, micro-companies and non-profits. Regulations are published at https://www.cnc.min-financas.pt/snc2016.html As a result of the refactor in https://github.com/odoo/odoo/pull/87572, the CoA (almost) perfectly follows the general regime regulation. However, the financial reports are not up-to-date. This commit implements the Portuguese Balance Sheet and Profit and Loss for companies under the general regime, as defined at pp.42-45, 53-55 of https://www.occ.pt/fotos/editor2/manualapoiosaf-t_1.pdf. The correspondence between account 'Taxonomy Codes' and account codes was taken from https://www.occ.pt/fotos/editor2/taxonomiasplanocontas_fev2019.pdf. Community PR: https://github.com/odoo/odoo/pull/157131 taskid:3060790 Forward-Port-Of: odoo/enterprise#58387
This update fixes a bug where the system could incorrectly select the wrong partner when multiple partners share the same name. The fix improves the accuracy of partner identification in accounting operations, ensuring the correct business partner is selected during bank reconciliation and invoice processing.
Original PR description
…ther This commit only improve the test according to change done in odoo/odoo. Community PR: odoo/odoo#155986 Forward-Port-Of: odoo/enterprise#58547 Forward-Port-Of: odoo/enterprise#57846
This fix corrects an issue where the helpdesk automatic ticket assignment feature was not properly balancing workload across team members when unassigned tickets were present. Previously, when a ticket without an assignee was created, the system would incorrectly assign subsequent tickets to the same person instead of distributing them equally. This update ensures fair and balanced ticket distribution across all team members.
Original PR description
# Issue: - When a ticket is created, the automatic assignment rule "Each user is assigned an equal number of tickets" is not being applied correctly in the scenario where we have a unassigned ticket…
# Issue: - When a ticket is created, the automatic assignment rule "Each user is assigned an equal number of tickets" is not being applied correctly in the scenario where we have a unassigned ticket that preceeds it. # Explanation: - When searching for the last_assigned_user in determine_user_to_assign method we get none which misses the count and we end up with wrong user to assign. # Steps To Reproduce: - Go to the helpdesk > Configuration > Teams. - For a team (E.g. Customer Care ) tick Random for Assignment Method. Then, add two users to the team. - Create a ticket and Note the Assigned to user. - Create a another one with empty 'Assigned to' field. - Create another ticket and notice how the automation did not apply and the ticket was assigned to the same user. # Solution: - add a filter in the search domain of the last_assigned_user to make sure it returns the actual last assigned user. opw-3746215 Forward-Port-Of: odoo/enterprise#58415 Forward-Port-Of: odoo/enterprise#58084
This fix prevents discounts from being unexpectedly recalculated when confirming non-subscription sales orders. Previously, the system was unnecessarily updating subscription settings during order confirmation, which triggered automatic discount recalculations. This change ensures discounts remain stable unless there's a genuine reason to update them.
Original PR description
`discount` field on `sale.order.line` model is configured in sale_subscription to be recomputed when the order `subscription_state` is modified. Therefore, updates to that field should be avoided unless necessary. Nevertheless, in the override of `action_confirm`, the subscription state was always updated to False for non subscription orders, leading to an unexpected recomputation of discounts. opw-3740645 See also: https://github.com/odoo/odoo/pull/157699
This update fixes an issue where users were not prompted to close video previews in the Documents module. The fix adds a missing step to the guided tour that instructs users how to properly close preview windows, improving the user experience when working with document previews.
Original PR description
Before this commit: - We do not get the prompt to close the YOUTUBE video preview. After this commit: - We get the prompt to close the preview. Task-3748193 Forward-Port-Of: odoo/enterprise#58519 Forward-Port-Of: odoo/enterprise#56812
SODA files sent via email were not being recognized properly because the system was treating them as plain text instead of XML files. This fix updates the file detection logic to correctly identify SODA files regardless of how they are received, ensuring they are processed correctly in the accounting system.
Original PR description
Bug === When we send a SODA file by email, it is not detected as a SODA file. Technical ========= Since odoo/odoo@82142475f70517045f1fbbd700e202b8dd0a522b the XML files are imported as plain text. But the check for the SODA file check only the mimetype XML. Task-3792364 Forward-Port-Of: odoo/enterprise#58568
Managers can now see and validate time off allocations without manually entering a description. Previously, when employees requested time off through the dashboard, the allocation description wasn't automatically filled in, forcing managers to manually add it before approving. This fix ensures the description is properly computed and available for managers during the approval process.
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
This fix resolves an error that occurred when registering serial numbers or lots for by-products in the Shop Floor manufacturing interface. The system was missing critical location information in the context, causing the serial/lot generation to fail. With this fix, users can now successfully register by-products with serial or lot tracking without encountering errors.
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
This fix resolves issues where updating received quantities in multi-step warehouse receipts was not properly synchronizing with internal transfer quantities. When users increased receipt quantities, the system now correctly updates all linked internal transfers to match the new amounts, ensuring accurate inventory tracking across warehouse steps.
Original PR description
Steps to reproduce: - Enable 2 step reciept in warehaouse settings Bug1: - Create and confirm a PO qty = 1 - Open reciept update qty to 4 and validate - The internal transfer qty is updated to 3 (the…
Steps to reproduce: - Enable 2 step reciept in warehaouse settings Bug1: - Create and confirm a PO qty = 1 - Open reciept update qty to 4 and validate - The internal transfer qty is updated to 3 (the difference) Bug2: - In inventory overview create a new reciept and mark it as todo - Update quantity and validate - Internal transfer is not updated Root cause: Initially in version 17 product_uom_qty was changed to indicate the demand before the move is done and it indicates the acutual done qty when the move is done. After https://github.com/odoo/odoo/pull/130342 product_uom_qty will always indicate the demand qty, and qty_done will always indicate actually done quantity. Fix: updating the quantity will create a new move for the difference that is used to trigger new push rule and then merged back in the original when merging product_uom_qty is not updated to keep track of the intial demand but pending linked moves should be updated to reflect the new quantity opw-3708740
A typo in the accounting system prevented users from properly grouping Profit & Loss reports by account. When users tried to save a report grouped by account and then reopen it, the system would display an error. This fix corrects the underlying code reference to restore this functionality.
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
A test for the calendar month view was failing when run before 9:00 AM due to incorrect event duration settings. This fix ensures the test properly sets the event duration when adjusting the start time, making the test reliable regardless of when it runs.
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
When creating a new product, the browser tab was incorrectly showing "Odoo - False" instead of "Odoo - New" until the product name was saved. This fix corrects the display name logic so new products show the proper "New" label, improving the user experience during product creation.
Original PR description
**Current behavior:** When creating a new product template record, the tab title will be *Odoo - False* until a new name is saved rather than *Odoo - New*. **Expected behavior:** When creating a new record in a form view, the tab title will be *Odoo - New* until the `name` field is filled out and the record gets saved (at which point it will be *Odoo - <name>*). **Steps to reproduce:** 1. Install `sale_management` and go to the product list view 2. Create a new product, observe the misnamed tab title **Cause of the issue:** In `product.template`'s _compute_display_name() method, some of the default values can have a 'False' (str) value which will evaluate to True (bool), setting the name to 'False'. **Fix:** Set the display_name field to a False (bool) value if the current record does not have a name field set. opw-3793588
This fix resolves an issue where PDF attachments uploaded via drag-and-drop to the message area were not displaying properly in the PDF viewer. The system now correctly reloads attachment data after drag-and-drop uploads, matching the behavior of regular file uploads, ensuring users can immediately view their uploaded documents.
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
This fix resolves an issue where conditional fields in website forms were not appearing when a date field was filled in. Previously, other fields would only show after additional text was entered. The fix ensures that when a date is selected, any fields that depend on that date being set will immediately become visible, improving the user experience when filling out forms with conditional logic.
Original PR description
Steps to reproduce [17.0+]: - Create a website form of any type in which you have: - One "Name" or other text field. - One field with the "Date" type. - One field "Email" with the visibility…
Steps to reproduce [17.0+]:
- Create a website form of any type in which you have:
- One "Name" or other text field.
- One field with the "Date" type.
- One field "Email" with the visibility condition: "Only visible if"
a field of type "Date" "Is set".
- When you complete the "Date" field, the "Email" one should show but it
does not > It shows if you also add at least two characters to the text
field.
Starting from [1], an OWL date picker component was introduced mainly to
replace the use of `TempusDominus` and `DateRangePicker` libraries.
After this change, an adaptation (from [2]) was done to completely
replace every usage of `TempusDominus` with the new OWL component
(including the form date[time]picker fields).
One of the lost features from `TempusDominus` was the trigger of an
"input" event on date [time] change, which also triggers the form field
visibility check.
The goal of this commit is to fix this behaviour by simply updating
fields visibility on every component value change.
[1]: https://github.com/odoo/odoo/commit/b5794e89e1ad29e2a86c7ddaf241e3fc24654b5f
[2]: https://github.com/odoo/odoo/commit/910897fc97d87b08f01627094ec8c159f5267628
opw-3778129This fix ensures that UTM parameters (tracking information from marketing links) are properly saved when customers accept the cookie consent bar. Previously, UTM data was lost because cookies were disabled by default until consent was given. Now, when customers click "I agree" on the cookie bar, any UTM parameters in the URL are immediately captured and stored, ensuring accurate sales attribution and proper display of personalized content.
Original PR description
Current behavior: --- When the cookie bar is activated, the cookies are deactivated by default, unless you click on I agree. This prevents UTMs from being set in the cookies Steps to reproduce: ---…
Current behavior: --- When the cookie bar is activated, the cookies are deactivated by default, unless you click on I agree. This prevents UTMs from being set in the cookies Steps to reproduce: --- 1. Install website_sale and sale_management 2. Go to Settings/Website 3. Activate Cookies Bar 4. Go to Link Tracker 5. Create a new link 6. Set the url as .../shop and Medium as LinkedIn 7. Open a private tab 8. Go to the tracked URL 9. Click on I agree on the cookie bar 10. Buy a product 11. Go back to Sales 12. Find the last public user quotation 13. Go to other info 14. Medium is empty Cause of the issue: --- UTMs are read from the cookies. When you activate the cookie bar, the cookies are deactivated by default. So when you go to the tracked url, and it redirects you to the page, it doesn't put the info from the url in the cookies. Clicking on I agree doesn't resolve the issue because it doesn't reload the page. Fix: --- When closing the cookie bar, forcing the info in the URL to be stored in the cookies if the key is a UTM. opw-3681927 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157630 Forward-Port-Of: odoo/odoo#154924
This fix resolves an error that occurred when upgrading the stock_account module after changing fiscal localization settings. The system was attempting to recreate default stock account properties that already existed, causing a database constraint violation. The solution checks for existing properties before creating new ones, preventing the error during module upgrades.
Original PR description
Steps to reproduce: - Create an empty database (without demo data) - Install stock_account - Go to Invoicing settings - Select Austria as Fiscal Localization - Go to Apps - Try to upgrade…
Steps to reproduce: - Create an empty database (without demo data) - Install stock_account - Go to Invoicing settings - Select Austria as Fiscal Localization - Go to Apps - Try to upgrade stock_account module Issue: A traceback is raised. The module tries to create the default stock accounts properties on the main company, but they already exist, which triggers a violation of the SQL unique constraint (ir_property_unique_index) of "ir.property" on the combination of (fields_id, company_id, res_id) fields. Cause: When "stock_account" module is installed/upgraded, the default stock accounts properties are created for the main company with forcecreate="True" option, which means they will be created if their "xml_id" doesn't exist, even if they are declared inside `<data noupdate="1">`. In this case, they are created with their "xml_id" at the module installation with the following values: - company_id: [the main company] - fields_id: ["property_stock_account_output_categ_id" field of "product.category" model] - res_id: False (to be used as a default value) - value: False When the Austrian localization (or other localizations defining their own stock accounts properties) is selected in the settings, these default properties are deleted and replaced by those coming from the localization package with some similar values but without "xml_id": - company_id: [the main company] - fields_id: ["property_stock_account_output_categ_id" field of "product.category" model] - res_id: False (to be used as a default value) - value: [depends on the localization package] Then, when upgrading "stock_account" module, as the "xml_id" of the default stock accounts properties cannot be found anymore, the upgrade process will try to re-create them and will trigger the SQL unique constraint. Solution: Move the creation of the default stock accounts properties in a python function to check if the default properties already exist based on the combination of "company_id", "fields_id" and "res_id" fields and not based on the "xml_id". opw-3682320 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156728
This fix resolves an issue where time off duration was incorrectly being set to zero when a contract's status changed from running to expired and back. The problem occurred because the system was checking the contract status before properly updating it, causing the calendar calculation to fail. After this fix, time off durations will be preserved correctly when managing contract statuses.
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
This update fixes a bug where reports in the system were appearing in random order, which could cause confusion and inconsistency for users. The fix ensures reports are now displayed in a consistent, predictable order every time.
Original PR description
Before this commit, ir.actions.report can be randomed orderer. @rco-odoo --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157031
This update ensures that images in website picture snippets display properly and don't overflow their containers, even when custom styling is applied. Previously, images could become too large if the default thumbnail styling was removed. This fix automatically applies responsive image formatting to new picture snippets, improving the visual consistency of websites built with Odoo.
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 fix resolves an issue where website navbar submenus would disappear when users tried to hover over them in "Hover" mode. The problem was caused by an unintended spacing gap introduced in a recent update. By removing this gap, submenus now stay visible and accessible when users hover over them, improving the navigation experience on websites built with Odoo.
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#157281
This fix ensures that Google Fonts display identically whether they are served from Google's servers or from your local Odoo server. Previously, fonts would appear different depending on which option was selected, causing inconsistent text styling on website pages. The issue has been resolved by correcting a missing parameter in the font download process.
Original PR description
[This other commit] introduced a method to serve Google fonts from the local server. Then it has been back-ported to previous versions with [this commit]. Unfortunately, the font was not identical…
[This other commit] introduced a method to serve Google fonts from the local server. Then it has been back-ported to previous versions with [this commit]. Unfortunately, the font was not identical when the user chose to load the font from Google servers versus from the local server. This discrepancy was due to a missing parameter when downloading the font file to serve it from the local server. This commit fixes the issue by adding the missing parameter. Steps to reproduce the issue fixed by this commit: - Drop a text block onto a website page. - Make the text bold. - Go to the theme tab. - Change the font to https://fonts.google.com/specimen/Poppins => The text style changes depending on whether you checked the "Serve font from Google servers" option or not. [This other commit]: https://github.com/odoo/odoo/commit/b06ce21eba6388ce34bbffffadcb489f0e8557dd [this commit]: https://github.com/odoo/odoo/commit/04ab4e255b7fef1608ee2c70a3a005f3064bc4f3 opw-3775683 Forward-Port-Of: odoo/odoo#157734
This update corrects minor inconsistencies in the Portuguese Chart of Accounts to ensure full compliance with official regulatory requirements. The changes align the account structure with the published guidelines from the Portuguese accounting authority, ensuring accurate financial reporting for Portuguese companies.
Original PR description
In #87572, the CoA was refactored to follow the regulation for companies under the general regime, which can be found at https://www.occ.pt/fotos/editor2/taxonomiasplanocontas_fev2019.pdf This commit fixes minor discrepancies between our version and the published regulation. Enterprise PR: https://github.com/odoo/enterprise/pull/58387 taskid:3060790 Forward-Port-Of: odoo/odoo#157131
This fix resolves an error that occurred when customers made payments and the system automatically created invoices. The issue was caused by incorrect permission handling during the invoice creation process. The fix ensures invoices are created properly without triggering errors, allowing automatic invoice generation to work smoothly when payments are received.
Original PR description
Before this commit, when the automatic invoice setting is enabled, a traceback would be shown when customers pay and the post-processing of the transaction tries to create an invoice. The problem is that the invoice is created in sudo, but it's unsudoed before logging invoices in the chatter. Now, the invoice will stay sudoed if the method is called in sudo. opw-3700576
Fixed an issue where the Mail Group name was displaying as template code instead of the actual group name when sending guidelines through the Website app. This ensures users see the correct mailing list name in their email notifications.
Original PR description
Steps to reproduce:
------------------
- Have Website and Mail Group installed
- Send Guidelines for a mailing list through the Website app
Issue
-----
{{ object.mail_group_id.name }} appears in the body of the "Mail Group: Send Guidelines" mail template instead of the actual mail group name.
opw-3778512
Forward-Port-Of: odoo/odoo#157591
Forward-Port-Of: odoo/odoo#156569This fix resolves a problem that occurred when copying a payment provider with a journal configured. Previously, the system would incorrectly create a duplicate payment method line and cause errors when changing the company of the copied provider. This update ensures journals are not duplicated during the copy process, preventing configuration errors.
Original PR description
During the copy of provider if the journal is set, it create a new account.payment.method.line, and if you change the company of the new provider you have an error when you try to create a new journal. https://www.odoo.com/web#model=project.task&id=3778226 opw-3778226 Forward-Port-Of: odoo/odoo#157715 Forward-Port-Of: odoo/odoo#149423
The Point of Sale sales report was displaying incorrect values in the "Total (VAT Excluded)" column, showing tax-included amounts instead of the correct tax-excluded totals. This fix corrects the calculation so that the report now accurately reflects the pre-tax sales amounts, ensuring accurate financial reporting and reconciliation.
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#157451
This fix addresses an issue where bank statement reconciliation would incorrectly match payments to the wrong partner when multiple partners in the system share the same name. Previously, the system would always select the most recently created partner with that name. Now, when partners cannot be uniquely identified by name alone, no partner is automatically selected, preventing incorrect reconciliation matches.
Original PR description
In a single database, you could have two partners who are called John Doe. Before this commit, any statement line where the partner_name was set with 'John Doe' would return the last one being…
In a single database, you could have two partners who are called John Doe. Before this commit, any statement line where the partner_name was set with 'John Doe' would return the last one being created, due to the _order attribute on res.partner model, even if the statement line was generated from a payment of the other 'John Doe' (ie first one created). With this commit, we ensure that the wrong partner is not selected, in case we cannot differentiate one from the other. Description of the issue/feature this PR addresses: In case you have two partners with the same name in your DB, and you import a bank statement having a payment from the first created partner, the reconciliation widget will display a filter matching invoices of the last created partn. Current behavior before PR: Last partner created is selected for the filter. Desired behavior after PR is merged: No partner is selected for the filter if we have multiple ones sharing the same name. Enterprise test PR: odoo/enterprise#57846 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157470 Forward-Port-Of: odoo/odoo#155986
This fix resolves an issue where the profile button was not displaying correctly when both the user and the person being viewed work across multiple companies. The system now properly checks for employee records regardless of company assignment, ensuring the profile button appears as expected for all users.
Original PR description
Currently, when the user and the target both are in multiple companies, the profile button cannot be displayed correctly. Since the employee_id uses `('company_id', '=', self.env.company.id)` rather than `in`.
This commit fixes the issue by checking employee_ids directly and if it is found, the profile button will be displayed correctly.
We don't care about which employee_id is used if there are multiple, since the user are in multiple companies as well. If looking for a specific profile, the employee can be found in the HR application.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixed an issue where the product configurator dialog wasn't appearing when customers tried to add products with custom or non-variant attributes to their cart from the shop page. Now the configurator properly displays whenever a product has any type of configurable attributes, ensuring customers can customize their selections before purchase.
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
Fixed a bug in the payment registration wizard where selecting multiple invoices incorrectly allowed users to choose any bank journal, regardless of the payment method required. Now the system properly restricts available journals based on the payment methods needed for the selected invoices, ensuring accurate payment processing.
Original PR description
Create an invoice to partner A, confirm Create an invoice to partner B, confirm From Invoice list view, select just one invoice and hit register payment It will be possible to only select journals having inbound payment method Now select both invoices and hit register payment It will be possible to select any Bank journal, even if both invoice payment should be incoming opw-3757686 Forward-Port-Of: odoo/odoo#157665 Forward-Port-Of: odoo/odoo#156578
This update fixes an issue where users who directly access the Microsoft Account login callback URL without proper data would encounter a system error. The fix now displays a proper error message instead, improving the user experience when the login process is interrupted or accessed incorrectly.
Original PR description
When a user tries to access the URL directly, at that time the value of dictionary `kw` is not available. So the error will be generated. Traceback in sentry: ``` KeyError: 'state' File…
When a user tries to access the URL directly, at that time the value of dictionary `kw` is not available. So the error will be generated.
Traceback in sentry:
```
KeyError: 'state'
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1840, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/microsoft_account/controllers/main.py", line 15, in oauth2callback
state = json.loads(kw['state'])
```
see-
https://github.com/odoo/odoo/blob/9460c82c4724f347a665cae27db60c4c9a6a950b/addons/microsoft_account/controllers/main.py#L15
This commit will solve the above issue by raising the `BadRequest` if the value of dictionary `kw` does not available.
sentry-4377121133
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#131340This fix prevents users from accidentally selecting incorrect payment methods when switching between bank accounts during payment creation. Previously, if a user quickly changed the bank account and selected a payment method before the system finished updating, they could save a payment with a mismatched payment method. The system now validates and requires users to re-select the payment method if this situation occurs.
Original PR description
When you create or register a payment, the domain of the payment method lines is based on a computed field dependent of the selected journal. The issue is that the interface isn't blocked when…
When you create or register a payment, the domain of the payment method lines is based on a computed field dependent of the selected journal. The issue is that the interface isn't blocked when waiting for the onchange return. So if the user changes the journal, then select the payment method quickly enough while the onchange is still pending, he will be able to select outdated values. It is a limitation of the js framework, so to avoid the user encoding wrong datas, the fix here is to raise a `ValidationError` telling to re-select the payment method. To reproduce: - create second bank journal, with outbound payment method lines having different names than the ones of the first bank journal (in order to distinct them). - slow down the `_compute_payment_method_line_fields` method - create a vendor payment, switch the journal to the one created and select the second payment method (before the onchange ends). - save the payment. -> The payment has a payment method line from a different journal opw-3587241 Enterprise PR: https://github.com/odoo/enterprise/pull/56602 Forward-Port-Of: odoo/odoo#157784 Forward-Port-Of: odoo/odoo#147583
This update fixes how product images are reordered in the online shop. Previously, moving images to the first or last position would swap them with existing images, and the main product image would jump around unexpectedly. Now, images are properly inserted in their new positions while maintaining the correct order, and the main image stays in the first position as intended.
Original PR description
This change fixes the unexpected behavior of product image reordering: 1. Previously, when moving an image to the first or last postion, it was swapped with the first or last image. Now, it is inserted in the first or last postion, while keeping the relative ordering of the other images unchanged. 2. Previously, the main image could be in any position, but as soon as it was reordered, it would jump to the first position. Now, the main image is always in first position. task-3581895 Forward-Port-Of: odoo/odoo#150207
This update improves the visual presentation of notes in sale order reports by applying text justification. The change ensures that note text is properly aligned and formatted for a more professional appearance when customers receive their sale order documents.
Original PR description
opw-3725405
This fix corrects a display issue in the mail module where the word "false" was incorrectly shown when a recipient didn't have an email address. Now, when a contact has no email, it will properly display "[name] (no email address)" instead, making the interface clearer and more professional for users managing email recipients.
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#157431
The spreadsheet application has been updated to the latest version (17.0.15) with several important bug fixes. These fixes address issues with chart resizing, proper cleanup when deleting sheets, and sheet renaming in read-only mode. This update ensures spreadsheets work more reliably and prevents data loss or display issues.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/e02add99e [REL] 17.0.15 https://github.com/odoo/o-spreadsheet/commit/0695b634e [FIX] figures: deleting a sheet will remove all figures https://github.com/odoo/o-spreadsheet/commit/6d5aea9bd [FIX] FiguresContainer: chart resizing broken https://github.com/odoo/o-spreadsheet/commit/1e7367209 [FIX] sheet_interactive: rename sheet in readonly mode