Daily updates from Odoo
Tuesday, December 9, 2025
209 changes
10 changes
Enhancements to existing features
This update enables users to send multiple attachments when sending invoices through the Peppol network. The attachments are now embedded within the invoice XML file using a standard 'AdditionalDocumentReference' tag, improving the efficiency of electronic invoice exchange. This enhancement aligns with Peppol standards and simplifies document handling.
Original PR description
[IMP] account: multiple embed files peppol This commit allows user to send multiple attachments through peppol. The attachments will be embedded into the xml under the `AdditionalDocumentReference` tags task-5103539 Forward-Port-Of: odoo/odoo#238662 Forward-Port-Of: odoo/odoo#234339
Resolved issues and error corrections
This update ensures that certain tests are automatically skipped when the 'accountant' module is not installed in Odoo. This prevents unnecessary test execution and improves the efficiency of the testing process. The change corrects a previous issue where tests were incorrectly run without the accountant module.
Original PR description
Some tests were meant to be skipped if accountant was not installed.
This update fixes a visual issue on the website where a product's variant section would incorrectly appear empty when no product attributes were selected. The fix ensures this section is only visible when actual product attributes are present, improving the user experience and preventing confusing empty sections.
Original PR description
### Issue: Variant section which only contains multi-value attributes is visible when none of the attributes are visible. #### To reproduce: 1- Create a product with a single value attribute. 2- Navigate to product page on the website. 3- As seen there is an empty extra section under price. <img width="626" height="296" alt="image" src="https://github.com/user-attachments/assets/cbf0e9e2-b17a-4b1b-94e0-f4b94780dab3" /> #### Cause: This section is to show custom or multi-value attributes. However, when product only contains attributes which have single and non-custom values, the attributes will not be visible. In this cases the section is visible but empty. This fix propose to hide variants when no visible line exists. opw-5241432
This update corrects a critical issue where Swiss account translations were missing, particularly for payroll documents. This ensured all official documents were consistently translated, preventing mixed language content and maintaining compliance standards. The fix was made in collaboration with multiple Odoo team members.
Original PR description
Some Swiss account translations were missing, mainly related to payroll. This resulted in payroll documents having mixed languages, which is not acceptable for official documents. opw-5343680 Forward-Port-Of: odoo/odoo#239122 Forward-Port-Of: odoo/odoo#239001
This update prevents a potential memory error that could occur when installing the HR Timesheet module on databases with many existing accounting records. The change ensures that new data fields are created efficiently, improving the installation process and preventing performance issues. This enhances the stability and speed of adding the HR Timesheet to existing Odoo databases.
Original PR description
Description ----------- On databases with a large count of existing `account.analytic.line` records, installing modules like `hr_timesheet`, which adds compute stored or related stored fields to this model can trigger a memory error due to the volume of records that need to be recomputed. This commit creates the columns manually with the correct default value that is inferred from the state and implementation of said fields. Reference --------- opw-5234833 opw-5255382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239024
This update fixes a limitation in how barcodes handle rental transactions within Odoo. A new hook mechanism has been added, allowing for overrides specifically for the 'sale_stock_renting' process. This ensures accurate barcode scanning and tracking during rental operations.
Original PR description
Add a hook method to be used in barcode that can be overriden for `sale_stock_renting`. As there is no common module for these two module, this was put in their common ancestor. opw-5265874 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238753
This update fixes an issue where rental receipts weren't being validated correctly when scanned through the barcode app. The change ensures that rental receipts are handled as partial receipts, even when linked to deliveries, preventing validation errors. This improves the reliability of the rental process.
Original PR description
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate…
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate Issue: The receipt is validated without issues nor warning, despite being incomplete. This is due to a bad mix of two changes: - #60801, which always sets the rental receipt as return of the delivery - #48788, which removes the backorder check for returns in barcode For regular returns made in barcode, it makes sense to avoid the backorder check, as from here we're processing a full picking return and we'd have the confirmation pop every time. However, things are different for rental receipts, as despite them being set as returns of the delivery, they're proper receipts that need to handle the partial receipt. To avoid the issue, rather than removing the backorder check whenever there's a return linked to the picking, now also checks that there isn't a rental order linked to the picking. opw-5265874 Forward-Port-Of: odoo/enterprise#101387
This update fixes a bug in the Mexican Point of Sale (POS) localization that caused incorrect invoices when refunds with global discounts were processed. The fix prevents refunds from exceeding the original order total, ensuring accurate invoice generation for Mexican businesses. This resolves a potential invoicing issue and improves data integrity.
Original PR description
When refunding an order that originally had a global discount, if you didn't refund the discount, the refund total amount would exceed the original order total. This would cause issues when trying to…
When refunding an order that originally had a global discount, if you didn't refund the discount, the refund total amount would exceed the original order total. This would cause issues when trying to generate a global invoice for the mexican localization. Steps to reproduce: ------------------- * Activate the global discount option in any PoS * Open PoS and make a sale with a global discount * Refund the sale without including the discount * Go to the backend * Go to the order list and select the 2 orders you made * Now try to create a global invoice > Observation: The global invoice is in error because the negative lines cannot be distributed correctly. Why the fix: ------------ To avoid this issue with the global invoice we simply prevent the user to generate a refund with a greater amount than the original order. We only apply this limit to the mexican localization because it's the only module that is affected by this issue. Other localizations can still refund without restrictions even if this work flow does not really make sense. opw-4899501 Forward-Port-Of: odoo/enterprise#100780 Forward-Port-Of: odoo/enterprise#93101
This update resolves an issue where outdated sub-channels were repeatedly unpinned during routine system maintenance, leading to unwanted notifications. Additionally, the change prevents unpinning sub-channels if members still have unread messages, preserving the functionality of the pin feature for accessing those threads. This ensures a cleaner and more efficient notification system.
Original PR description
Before this commit, outdated sub-channels were unpinned each time the vacuum ran. It occurs because a condition on sub-channel being pinned is missing. In practice, it's not a big deal funtionnaly but leads to useless notifications being sent. While at it, this PR prevents unpins when there are still unread messages in the sub-channel: the pin feature is used to see unread messages on otherwise hidden threads. Forward-Port-Of: odoo/odoo#239073 Forward-Port-Of: odoo/odoo#238493
This update corrects an issue where the payment term line name wasn't updated when changing the 'Customer Reference' on an invoice. The fix addresses a technical detail within the system's calculations, ensuring that the payment term name accurately reflects the new reference. This improves invoice clarity and consistency.
Original PR description
### Issue: When changing the "Customer Reference" on an invoice, the name of the payment term line is not updated. ### Steps to reproduce: - Create an invoice with payment terms, confirm it - Modify…
### Issue:
When changing the "Customer Reference" on an invoice, the name of the payment term line is not updated.
### Steps to reproduce:
- Create an invoice with payment terms, confirm it
- Modify its "Customer Reference" to 'test' for example
- In the page "Journal Items" the name of the terms line has been recomputed to "test - INV/2025/XXXXX"
- Modify again its "Customer Reference" to 'abcdef' for example
- In the page "Journal Items" the name of the terms line was not recomputed
### Cause:
In `_compute_name()` we only write the name if this condition is `True`:
```py
if n_terms > 1 or not line.name or line._origin.name == line._origin.move_id.payment_reference or (
line._origin.move_id.payment_reference and line._origin.move_id.ref
and line._origin.name == f'{line._origin.move_id.ref} - {line._origin.move_id.payment_reference}'
):
line.name = name
```
The purpose of this line is to keep the name of the line if it was manually inputted. So the logic is: we only write the computed name if the previous name was computed. To check this, we check if `line._origin.name == f'{line._origin.move_id.ref} - {line._origin.move_id.payment_reference}'`.
The issue comes from the use of `_origin` in a compute. `_origin` refers to the record before we make any change. But it is meant to be used for `onchange` methods, in these the values are not yet written so `_origin` refers to the record before saving.
Here, when saving, `line._origin` is the same as `line`, so
- `line._origin.move_id.ref` is the new ref.
- `line._origin.name` uses the old ref (it's currently being recomputed).
### Solution:
Unfortunately, in the compute, there are no trace left of what were the previous values as the write already occurred.
The initial complaint justifying to keep custom line names was that on bills, the line name is empty. So when inputting a custom line name, it was removed by the compute method. The previous fix wanted to be more general by always keeping custom line names.
Considering this, this commit removes part of the previous fix: Now we only keep the custom line name when the compute method wants to remove it. So we keep the previous fix for bills.
### Note
There was a test verifying exactly that when manually deleting the line name, in the end
the line does not have a name. This will no longer be the case but a decision must be made between:
1. updating the line name when changing the ref
2. not recomputing line name when it has been changed manually
3. removing the line name when it's manually deleted
We can have 2 and 3 but not with 1 afaik.
opw-5246917
Forward-Port-Of: odoo/odoo#2377106 changes
Resolved issues and error corrections
This update fixes a problem where Swiss account translations were missing, particularly for payroll documents. This ensured that all official documents were consistently translated, avoiding mixed language issues and maintaining compliance standards. The fix was driven by a specific request to improve the quality of Swiss-localized financial reports.
Original PR description
Some Swiss account translations were missing, mainly related to payroll. This resulted in payroll documents having mixed languages, which is not acceptable for official documents. opw-5343680 Forward-Port-Of: odoo/odoo#239122 Forward-Port-Of: odoo/odoo#239001
This update resolves a potential memory issue that could occur during HR Timesheet installations on databases with many existing accounting records. The change ensures that new data fields are created efficiently, preventing the system from running out of memory and improving the overall installation process. This enhances stability and reduces potential delays for users.
Original PR description
Description ----------- On databases with a large count of existing `account.analytic.line` records, installing modules like `hr_timesheet`, which adds compute stored or related stored fields to this model can trigger a memory error due to the volume of records that need to be recomputed. This commit creates the columns manually with the correct default value that is inferred from the state and implementation of said fields. Reference --------- opw-5234833 opw-5255382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239024
This fix addresses a bug in the Mexican localization (l10n_mx_edi_pos) where refunding orders with global discounts could create incorrect invoices. The update now prevents refunds from exceeding the original order total, ensuring accurate invoice generation for Mexican users. This resolves a potential issue with invoice distribution.
Original PR description
When refunding an order that originally had a global discount, if you didn't refund the discount, the refund total amount would exceed the original order total. This would cause issues when trying to…
When refunding an order that originally had a global discount, if you didn't refund the discount, the refund total amount would exceed the original order total. This would cause issues when trying to generate a global invoice for the mexican localization. Steps to reproduce: ------------------- * Activate the global discount option in any PoS * Open PoS and make a sale with a global discount * Refund the sale without including the discount * Go to the backend * Go to the order list and select the 2 orders you made * Now try to create a global invoice > Observation: The global invoice is in error because the negative lines cannot be distributed correctly. Why the fix: ------------ To avoid this issue with the global invoice we simply prevent the user to generate a refund with a greater amount than the original order. We only apply this limit to the mexican localization because it's the only module that is affected by this issue. Other localizations can still refund without restrictions even if this work flow does not really make sense. opw-4899501 Forward-Port-Of: odoo/enterprise#100780 Forward-Port-Of: odoo/enterprise#93101
This update adds an index to the `sale.order.project_id` field, significantly speeding up the loading time of the project settings page. Previously, the system was performing a slow scan of the database, but this change optimizes the query for faster performance, especially with large sales orders.
Original PR description
Description ----------- Following odoo/odoo@238a41e35280256382f6509182b9e900fb4f7aba, the domain for `sale.order.line` in `_get_sale_order_items_query` was modified to search based on the relevant…
Description ----------- Following odoo/odoo@238a41e35280256382f6509182b9e900fb4f7aba, the domain for `sale.order.line` in `_get_sale_order_items_query` was modified to search based on the relevant `order_id` `id` or `project_id`. `project_id` is not indexed, leading to a heavy non-selective scan on the primary key for databases with many `sale. order` records. There is poor selectivity with the filter on `sale. order.line` resulting in a heavy join between `sale.order` and `sale.order.line`. This commit adds the missing index, allowing for `Bitmap Heap Scan` on both indexes and leveraging the selectivity of the project being currently opened. Benchmark --------- On a database with 3.5M `sale.order`, 12M `sale.order.line`, opening the "Settings" page of a project with a few sale lines associated with it took: | | Before | After | |--------------|--------|-------| | Timing (hot) | 9.1s | 5ms | Reference --------- opw-5280364 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238995
This update fixes a limitation in how barcodes handle rental sales within Odoo. A new hook has been added, allowing businesses to override the standard barcode behavior when processing rental transactions. This ensures accurate tracking and reporting for both barcode scanning and rental sales operations.
Original PR description
Add a hook method to be used in barcode that can be overriden for `sale_stock_renting`. As there is no common module for these two module, this was put in their common ancestor. opw-5265874 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238753
This update fixes an issue where rental receipts were incorrectly validated without warnings, even when incomplete. The change ensures that rental receipts, which are treated as proper receipts needing partial handling, are processed correctly by adding a check to prevent errors when linked to a stock picking.
Original PR description
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate…
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate Issue: The receipt is validated without issues nor warning, despite being incomplete. This is due to a bad mix of two changes: - #60801, which always sets the rental receipt as return of the delivery - #48788, which removes the backorder check for returns in barcode For regular returns made in barcode, it makes sense to avoid the backorder check, as from here we're processing a full picking return and we'd have the confirmation pop every time. However, things are different for rental receipts, as despite them being set as returns of the delivery, they're proper receipts that need to handle the partial receipt. To avoid the issue, rather than removing the backorder check whenever there's a return linked to the picking, now also checks that there isn't a rental order linked to the picking. opw-5265874 Forward-Port-Of: odoo/enterprise#101387
6 changes
Resolved issues and error corrections
This update resolves an issue where the LWF report incorrectly included data from previous runs when selecting a department. The fix ensures that the report accurately reflects employee data based on the currently chosen department, improving report reliability and data consistency. This change impacts the LWF report generation process.
Original PR description
Step to reproduce: - Install l10n_in_hr_payroll. - Create 3-4 employee with labour welfare fund, all in different departments. - Open the LWF report wizard and do not select any department. -…
Step to reproduce: - Install l10n_in_hr_payroll. - Create 3-4 employee with labour welfare fund, all in different departments. - Open the LWF report wizard and do not select any department. - Download report , all employee will come in report. - Now select any department and download report again. - All employee(It is fetching previous data) + employee from selected department will come in report. Cause: - In '_compute_line_ids()' wizard computed field 'line_ids' doesn't properly reset previous lines as a result previous data remains in lines. - When the department is changed, the wizard id remain same, so previously lines added to wizard are coming with new lines. - Using `Command.link()` for new lines is invalid because it requires an existing database record ID, but wizard lines are creating inside a compute method so their IDs are only saved after the flush. Fix: - Since this is a stable version, clear the previously existing lines using 'Command.clear()' before creating new ones. Task - 5366498
This update resolves issues with generating snailmail follow-up reports, specifically addressing address formatting, cover page functionality, and PDF layout compatibility with the Pingen service. The fix ensures accurate address generation, allows for cover page options, and corrects PDF dimensions, preventing letter delivery failures and providing clearer feedback to users.
Original PR description
#### [FIX] snailmail_account_followup: fix address, cover page and layout Currently there is the following potential problem when sending the followup report via snailmail. 1. The address generation…
#### [FIX] snailmail_account_followup: fix address, cover page and layout
Currently there is the following potential problem when sending
the followup report via snailmail.
1. The address generation is not adjusted for snailmail. That can
lead to problems with the service we use to send the actual letter.
They validate the address rather strictly.
2. The cover page option does not work; it does not add a cover page.
So we can not work around problems with the address generation
by adding a cover page.
3. The layout / dimensions / margins of the generated document / PDF may not work
with our current snailmail provider (Pingen). But there is no error
message about it. (Although we do have something in the usual
snailmail flow)
4. In case the address is invalid we do not try to "print" / send the letter,
so the user does not receive any feedback.
This could be an issue in case multiple follow-up reports are sent
at the same time.
This commit fixes these issues. (See below for details.)
(1)
The logic for this already exists but it is only activated when
a context key is set. This is not the case currently.
After this commit we do set the key.
(2) & (3)
The issue is that we generate the PDF attachment before creating the
'snailmail.letter' record.
In the usual snailmail flow the PDF attachment generation is handled during the sending and
printing (in function `_fetch_attachment` on model 'snailmail.letter').
There is some special logic to
- add a cover page to the report PDF (if the option is selected)
- make sure the page dimensions of the PDF are okay
- overwrite the margins of the PDF with white to make sure the PDF is
not rejected by Pingen because of this
But all this only happens if we do not have an attachment already.
(So it does not happen currently with the followup report)
For this a function called `_generate_report_pdf` was extracted from `_fetch_attachment`
in the related community commit to generate the report PDF (and its
filename). The function is extended here to be able to generate the
followup report.
(4)
We try to print / send the letter even if the address is invalid
Reproduce (i.e. for the cover page issue; but it explains how to get
the PDF that will be sent in general)
1. Install `snailmail_account_followup`
2. Create an overdue invoice
3. Set the "Add a Cover Page" option
(Settings -> Accounting -> section "Customer Invoices")
- enabled to test for the cover page
- disabled to test that the address generation is adjusted
4. Send a follow-up report:
- On 17.0: Accounting -> menu: "Customers" / "Follow-up Reports"
-> click on a line / partner -> button "Follow up"
- On 18.0+: partner form view -> tab "Accounting"
-> section "invoice follow-ups" -> button "Send"
5. Go to the snailmail letter:
In debug mode: Settings -> menu: "Technical" -> section: "Email" -> "Snailmail Letters"
(or just search for "snailmail" in the main screen)
And select the letter
6. Download the PDF document
#### [FIX] snailmail_account_followup: forbid regenerating failed letters
The wizard to resend failed letters which allows to change the
cover page option is broken: The follow-up report can not be regenerated
correctly because it requires special follow-up specific `options` that are
lost after the initial pdf generation for the letter.
Currently it can happen that the follow-up PDF is regenerated but
without (actual) content (table listing the overdue amounts).
After this commit we cancel the snailmail letters and show an
error notification indicating that the followup needs to be done again to
create a new letter.
Reproduce
(needs credit on IAP or locally edit this function https://github.com/odoo/odoo/blob/3ffd51f1cb18e3f4fb0367c4a498d7438e0c0357/addons/snailmail/static/src/core_ui/message_patch.js#L11
to open the resend wizard `this.openFormatLetterAction()` for `sn_credit` error or always)
1. Install `snailmail_account_followup`
2. Create an overdue invoice
3. Ensure the address of the partner causes issues with Pingen
4. Ensure the cover page option is disabled:
Settings -> Accounting -> section "Customer Invoices"
5. Send a follow-up report:
- On 17.0: Accounting -> menu: "Customers" / "Follow-up Reports"
-> click on a line / partner -> button "Follow up"
- On 18.0+: partner form view -> tab "Accounting"
-> section "invoice follow-ups" -> button "Send"
6. Make some modifications like editing the follow-up message or a custom attachment
7. Download the snailmail letter PDF (see previous commit for details)
8. In the chatter go to the message saying "Letter sent by post with Snailmai"
9. Click on the red symbol (paper plane) next to the name
10. A "Format Error" wizard should show up
11. Select "Add a Cover Page"
12. Click the button "Update Config and Re-Send"
13. Download the snailmail letter PDF (see previous commit for details)
14. Compare PDFs from 7 and 13; they are different (not just the cover page)
#### references
opw-5160121
opw-5209504
opw-5226366
Forward-Port-Of: odoo/enterprise#101498
Forward-Port-Of: odoo/enterprise#99491This update resolves an issue where by-products weren't being correctly added to manufacturing lines when using the barcode app. The fix ensures that by-products are properly registered as pre-production and production locations, streamlining the 3-step manufacturing process. This issue is now resolved in version 18.2.
Original PR description
### Steps to reproduce: - In the settings enable By-Products an Multi-step routes - Put your warehouse in manufacturing in 3 steps - Create two storable products: - Final Product (FP) with an empty…
### Steps to reproduce:
- In the settings enable By-Products an Multi-step routes
- Put your warehouse in manufacturing in 3 steps
- Create two storable products:
- Final Product (FP) with an empty bom
- By Product (BP)
- Go to the barcode app > Operations > Manufacturing > New
- Scan FP > Register By-Products
- Scan BP
#### > The line is created with pre-prod as location and prod as destination
### Cause of the issue:
Since no existing line refers to the by product, a new line is created and its `location_id` and `location_dest_id` are provided by the `_getNewLineDefaultValues`:
https://github.com/odoo/enterprise/blob/17fd46b04d87585b7ed46c00d9559414daa17384/stock_barcode/static/src/models/barcode_model.js#L562-L566 However, at this point nothing had set the `params.newByProduct` in the `processBarcode`:
https://github.com/odoo/enterprise/blob/17fd46b04d87585b7ed46c00d9559414daa17384/stock_barcode_mrp/static/src/models/barcode_mrp_model.js#L375-L383 In fact, the only thing indicating that we are creating a by prodcut line at this point is the `displayByProduct`.
### Note:
The issue is no longer reproducible in 18.0+ as this change has already been applied in 2d5dbb93e6b33c2be786f9b2361c993f715d1a7f
opw-5350222
Forward-Port-Of: odoo/enterprise#101135
Forward-Port-Of: odoo/enterprise#101087This update resolves technical issues causing errors during the generation of WPS payroll reports. The fix corrects an incorrect usage of a function, ensuring reports are now created without errors. This improves the reliability of payroll reporting for Saudi Arabia.
Original PR description
this commit addresses traceback errors occured due to incorrect usage of `_` function. task-5310946
This update fixes an issue where rental receipts were incorrectly validated without warnings, even when incomplete. The change ensures that rental receipts are processed correctly, handling partial receipts as expected, due to a previous misconfiguration. This improves the reliability of the rental picking process.
Original PR description
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate…
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate Issue: The receipt is validated without issues nor warning, despite being incomplete. This is due to a bad mix of two changes: - #60801, which always sets the rental receipt as return of the delivery - #48788, which removes the backorder check for returns in barcode For regular returns made in barcode, it makes sense to avoid the backorder check, as from here we're processing a full picking return and we'd have the confirmation pop every time. However, things are different for rental receipts, as despite them being set as returns of the delivery, they're proper receipts that need to handle the partial receipt. To avoid the issue, rather than removing the backorder check whenever there's a return linked to the picking, now also checks that there isn't a rental order linked to the picking. opw-5265874 Forward-Port-Of: odoo/enterprise#101387
This update resolves an issue where invoice sequences without spaces caused errors during processing. The change uses a regular expression to reliably extract the folio number, regardless of the sequence format (space, slash, or hyphen). This ensures accurate invoice generation and prevents data processing failures.
Original PR description
Before this commit, the method `_get_last_sequence` assumed that the document sequence always contained a space separator (e.g., "INV 12345") It attempted to extract the folio number using `res.split(" ")[-1]`.
If the sequence format did not contain a space, such as the standard Odoo format `INV/2025/01234`, the split would return the entire string. This caused a `ValueError` when trying to cast the non-numeric string to an integer:
ValueError: invalid literal for int() with base 10: 'INV/2025/01234'
This commit fixes the issue by using a regular expression to extract the last group of digits from the sequence string. This ensures the folio number is correctly retrieved regardless of the separator used (slash, space, or hyphen).
opw-5401509
Forward-Port-Of: odoo/enterprise#10166517 changes
New functionality added to Odoo
This update introduces a new feature allowing users to easily create templates from existing knowledge articles, streamlining the process for non-technical users. Additionally, administrators can now manage templates directly within the gallery, including deleting unused ones, improving organization and efficiency.
Original PR description
This PR will add a new button to the Knowledge kebab menu to enable the user to turn an existing article to a template. This new feature will ease template creation for non-technical users. In the template gallery, we will also add a trash button next to each template to enable the administrators to manage the template and delete the ones they don't want or need. task-4247544
This update adds new reporting capabilities for Czech tax returns, specifically VAT control statements, tax returns, and sales reports. These additions streamline the process of generating and submitting required tax reports, improving compliance and data accuracy for Czech businesses using Odoo Enterprise.
Original PR description
- add ec_sales_list return type and wizard - add tax_return return type and wizard - add vat_control_statement return type and wizard taskId: 4825850
Enhancements to existing features
This update clarifies the label for a key work entry type within the Hong Kong payroll module. The term 'Use 713' has been replaced with 'ADW Calculation' for better clarity and understanding. This change improves the user experience and ensures accurate payroll processing.
Original PR description
- changed the string for `l10n_hk_use_713` to be `ADW Calculation` instead of `Use 713` task-id: 5084137 Forward-Port-Of: odoo/enterprise#95253
This update optimizes how data is displayed in Odoo’s account reports. By minimizing the complexity of column dictionaries, the system now renders reports more efficiently, leading to faster loading times and a smoother user experience. This change focuses on internal performance improvements without impacting how users view their financial reports.
Original PR description
task-5145573
This update simplifies how the IoT Box communicates with Odoo by allowing direct responses to the action controller. This reduces unnecessary network requests and streamlines the process of handling responses from the IoT Box, ultimately improving performance and stability.
Original PR description
To reduce the amount of network request and simplify the driver's response handling IoT Box side, we now provide the response directly to the action controller. see odoo/odoo#237586 Task: 5048746
This update replaces account tags with tax tags in the SI (Silurian) localization module's sales reports. This change ensures more accurate reporting aligned with local tax regulations for Electronic Commerce Sales List transactions. It improves the reliability of sales data for SI customers.
Original PR description
Before this commit: We are using account tags for EC Sales list. After this commit: Replaced account tags from l10n_si as it will now use tax tags. Community PR: https://github.com/odoo/odoo/pull/233747 Upgrade PR: https://github.com/odoo/upgrade/pull/8730 Task-5046099
This update simplifies the process for employees to request signatures by consolidating the 'Signature Request' button within the existing cog wheel menu. This eliminates duplication and provides a more consistent user experience for requesting signatures within the Odoo Enterprise system.
Original PR description
Before: Employees had a separate 'Signature Request' button and the default 'Request Signature' option in the cog wheel, causing duplication. After: Moved the "Signature Request" button to the cog wheel and remove the standard 'Request Signature' option for employees. Task - 4879265
This update simplifies the process of selecting users and resources when booking appointments. Instead of a separate step, the selection is now integrated directly into the date and time selection, offering a more intuitive and efficient user experience. This change also corrects a previous issue where the system wasn't accurately reflecting available resources.
Original PR description
BEFORE THIS CHANGE ================== When website_appointment was installed, and when the appointment type was configured with date_first=False, is_auto_assign=False, then the appointment main route…
BEFORE THIS CHANGE ================== When website_appointment was installed, and when the appointment type was configured with date_first=False, is_auto_assign=False, then the appointment main route rendered a different page content in order for the booker to select first the user / resource, each having a large card with picture (or placeholder) and name (as well as function and website_description for users). It had a dedicated chevron in the progressbar and was referred to as the operator selection step. There was an option to 'skip user / resource selection' and see the full availability. AFTER THIS CHANGE ================= In order to ease the user experience, we now inline the user and resource selection on the date & time selection step. It takes the form of a grid of smaller cards, that can be selected when the same conditions are met. They are rendered above the calendar. Their content is the same. The user can click on the card and the calendar will update accordingly. They can change and see updated availability directly, which was not possible before, as the page was different. In order to reproduce the 'skip user/resource selection' feature, a dedicated card 'No preference' is used and put at the end of the grid of cards. This will in turn compute full availability using all available resources / users. As before, when coming back from an error or using the chevrons hyperlinks, the selection is remembered and the default selection (user / resource / no preference) is kept and the availability computed accordingly when landing on the page (unless having skipped selection). The whole behavior is now available directly in appointment (no need for website) and replaces the dropdown used previously. Corner cases (no availabilty screens, manage capacity or not) are handled as well. A test is modified to reflect these changes. USER DEFAULT / SELECTED SIMPLIFICATION ====================================== A simplification of a rather hard-to-maintained flow ramification was done as well, as the meaning of 'selected' has evolved. Before, for manual selection starting with user / resource, having staff_user_id or resource_selected_id set meant selection was done and only that user / resource was to be considered. Now, this is not the case anymore, as one can change the user / resource on the date and time selection page. This means we only use that 'selected' value for an initial selection: if the user / resource has availability, then we use it. Otherwise, we use the first available one (see `_get_slots_values`). Therefore we move mostly the logic on x_default and `get_slots_values`. The resource_selected_id and staff_user_id are now used when coming back from an error or using the chevrons to navigate between steps. AUTO ASSIGN SIMPLIFICATION ========================== While simplifying, the x_default and x_selected were simply removed from the controller logic when is_auto_assign is True. There was a case of having a single staff user that lead to seeing its information on the side bar. This has been removed as this was not consistent, nor with resource behavior, nor with the 'auto assign' philosophy. We now never show the user / resource in date and time, details steps. We also do not propagate resource_selected_id to the registration page. TO SUMMARIZE ============ There are three flows depending on the appointment configuration: (e.g. here for resources) 1. auto assign: no use of resource_selected_id. no display of the selected resource / user even if there is only one, in the right column. 2. time then resource: no use of resource_selected_id since we need to compute for each slot all available resources. 3. resource then time: resource_selected_id, set for instance using a chevron, is used to initialize the selection. If not available, we still initialize to the first available resource. The value is propagated in the url. LINKS ===== UPG PR: https://github.com/odoo/upgrade/pull/8724 Task-5187767
Resolved issues and error corrections
This update ensures that the 'Night' and 'Nights' labels used in the sale renting module are fully translatable. The team took a pragmatic approach to avoid a potential translation issue, initially delaying full translation to monitor for any inconsistencies with website language settings.
Original PR description
Not sure why the existing `SINGULAR_LABELS` is lazy translated whereas the not single units (i.e. `self._fields['unit']._description_selection(self.env))[self.unit]`) is not, so we assume that in this case it's fine to not lazy translate both "Night" and "Nights" and see if a bug pops up later on (maybe via mismatching website language?) opw-5392109 Forward-Port-Of: odoo/enterprise#101613
This update corrects a styling issue within the VoIP module by explicitly defining the input type for browser elements. Previously, browsers treated plain input fields as text, causing some styles to be missed. This ensures consistent and correct styling for VoIP input fields, improving the user experience.
Original PR description
Even though a browser treats a plain <input> as a text field by default, the CSS selector cannot "see" that default behavior. Input without `type="text"` will miss some style, for example: https://github.com/odoo/odoo/blob/4f5594a911c1960f620d902d507e563cdab167b9/addons/web/static/src/webclient/webclient.scss#L163-L177 we add input type in this commit to apply those style.
This update significantly speeds up the Knowledge module on odoo.com by optimizing how user permissions are calculated and articles are searched. The changes reduce loading times, especially when viewing a large number of articles, leading to a faster and more responsive experience for users.
Original PR description
On odoo.com, we noticed that Knowledge can be slow when there are a lot of articles: For 4365 articles, it takes between 1.5 and 2.3 seconds to load the list view listing all the articles the user…
On odoo.com, we noticed that Knowledge can be slow when there are a lot of articles: For 4365 articles, it takes between 1.5 and 2.3 seconds to load the list view listing all the articles the user has access to. This PR will try to optimize the performance and the scalability of the Knowledge module by reworking the methods used to compute the permissions of a user on an article and the methods used to search the articles the user has access to or the articles the user can edit. Those methods are computationally expensive and are used extensively in Knowledge. They are the main hot spots of the module: The search method is for instance used in the `domain_force` of the ACL rules for some group of users (see: `user_has_access` and `user_has_write_access`). They are hence used each time the user opens an article. It is therefore important to optimize those functions to make Knowledge blazing fast and responsive. # Benchmark To assess the performance of the new query and indexes, we wrote custom scripts that will perform a server call with the same configuration as the main list view and form view of Knowledge. This should ensure that we optimize the response time of the views we frequently use. For 10k articles, we got the following results: ## List view Before: | User | Avg | Std | |-------|-----------|--------| | Admin | 58.21ms | 8.53 | | Demo | 1139.65ms | 179.37 | After: | User | Avg | Std | |-------|-----------|--------| | Admin | 85.95ms | 7.48 | | Demo | 174.17ms | 4.98 | ## Form view Before: | User | Avg | Std | |-------|-----------|--------| | Admin | 56.66ms | 8.03 | | Demo | 469.51ms | 15.48 | After: | User | Avg | Std | |-------|-----------|--------| | Admin | 35.81ms | 4.74 | | Demo | 64.45ms | 17.41 | task-3771333
Google recently updated its Firebase API, causing Odoo's push notifications to stop working. This update requires upgrading Odoo's Firebase dependencies and API calls to ensure continued functionality. This change restores the ability for users to receive push notifications from Odoo.
Original PR description
Recently, Google upgraded the Firebase API and now unsupports the API version we are using (i.e: the version 6.3.4). As a result, the Odoo push notifications no longer work. see: https://firebase.google.com/docs/cloud-messaging/migrate-v1 This commit will upgrade the dependencies and the API calls to ensure that people can send push notifications from Odoo. task-4247811
This update corrects the visual alignment of buttons within the account journal views for the Be Codabox localization module. This ensures a cleaner and more professional user experience for users managing financial data. The change improves the overall usability of the system.
Original PR description
This commit aims to fix the alignment of codabox buttons in the account journal views. task-5269488
This update resolves a bug that prevented correct pay run calculations when employees had multiple contract versions. The fix ensures the correct contract end date is used, preventing type errors and ensuring accurate payroll processing. This improves the reliability of our payroll system.
Original PR description
### Steps to Reproduce: 1. Create a new employee 2. Give him another version 3. Enter contract start date for the first version ### Reason: - There was a bug while computing pay run issues. The `date_end` and `contract_date_end` fields were mixed up. - The `date_end` field got a default value but `contract_date_end` was None resulting in a type error. ### Solution: - Changed `date_end` to `contract_date_end` as it's our source of truth Task: 5391975
This update corrects a bug preventing the automatic installation of localized payroll account modules (e.g., l10n_xx_hr_payroll_account) when a corresponding country company wasn't yet defined. The fix removes a dependency check that caused the modules to fail to install, ensuring they are correctly added to new Odoo instances.
Original PR description
Steps to reproduce: 1. Run odoo for a fresh database with -i hr_payroll_account,l10n_xx_hr_payroll (except for us). 2. The corresponding l10n_xx_hr_payroll_account won't be installed. Cause: The l10n_xx_hr_payroll_account had 'countries': ['xx'] in their manifest, but there is no company from that country yet. When installing modules, the framework first checks if there can be modules to auto-install as well, but since the demo data with the company of the country does not yet exist, there is no such company. Hence, the module is not installed. Fix: Remove all occurrences of 'countries': ['xx'] for modules that are auto-installed and that depend on other modules with countries already defined in their manifest. Task: 5384292
Code cleanup and technical improvements
This update replaces the Knowledge dropdown menus with a standardized Odoo component, resulting in a more stable and consistent user experience. By leveraging this component, we've reduced development effort and simplified maintenance for these menus.
Original PR description
For the dropdown menus of Knowledge, we used the standard dropdown menus of Bootstrap. It turns out that there exists a Dropdown component in owl that we can use to create a dropdown menu. Using that component will offer the following advantages: - With the component, the content of the dropdown menu will be lazy loaded. It means that we no longer have to re-implement that mechanism in our component. We can therefore reduce the amount of custom code. - The structure of the dropdown menu is simplified. We will not necessarily have to update our component if the layout of the dropdown menu changes. The dropdown menu will always be consistent with the other dropdown menus of Odoo (given that everyone uses the Dropdown component). - The dropdown menu can easily be customized. - The display is less glitched. task-3072845
This update consolidates IoT scale logic within the dedicated `pos_iot` module for better organization. It also streamlines the scale functionality by transitioning from a service to a utility class, mirroring best practices for printers. This change enhances the overall consistency and maintainability of the point-of-sale system.
Original PR description
To maintain consistency, we moved IoT connected scales logic from `point_of_sale` to `pos_iot`. We also switched from a service to an utility class, same as printers. see odoo/odoo#238635
32 changes
Enhancements to existing features
This update enhances the documentation system by enabling developers to receive complete server error tracebacks when errors occur. A new component, DocErrorDialog, manages the display of these tracebacks, providing more detailed information for troubleshooting. This improves the developer experience and helps quickly identify and resolve issues within the documentation.
Original PR description
This commit updates the /doc controllers from 'http' type to 'json2' to allow the frontend to receive the full server traceback on errors. This change required modifying `http.Json2Dispatcher.is_compatible_with` to also accept requests with no content-type when content-length is 0. It introduces a new component, `DocErrorDialog`, to manage error display and server traceback. The general error handling flow for the api_doc fetch calls is also improved. task-5172546 task-5349157
Resolved issues and error corrections
This update fixes an issue where form fields without labels weren't being submitted. Now, all form fields, even those without labels, are correctly transmitted when the 'send' button is clicked. Additionally, the system now prevents users from removing labels, ensuring data integrity.
Original PR description
Before this commit, a form input without a label would not send its data when clicking send. Steps to reproduce - go to the website editor - add a form - choose any field - delete the field label - save and exit the editor - now in the website, fill the form and click send => the fields without a name label are not sent After this commit fields without a label get sent with a placeholder "unknown_field" task-5062575 Forward-Port-Of: odoo/odoo#237805 Forward-Port-Of: odoo/odoo#225545
This update corrects a bug where work entry durations were not accurately calculated, leading to potential conflicts when editing or adding entries on the same day. The fix ensures that the system correctly sums the duration of all work entries for a given day, regardless of whether they are new or existing, improving data accuracy.
Original PR description
Problem ---------- Work entries on the same day were in conflict only if a work entry was created with a duration > 1000h Even if we write an existing work entry with a duration > 1000h => no conflict. Event if we create multiple work entries, it will only make the sum of work entries created and not existing ones Solution ---------- Check the sum of duration for a day between 0 and 24 hours. Fetch all work entries matching the date of the check to make the sum of durations task-5349515
This update fixes a bug that caused the system to crash when uninstalling the Invoicing module. The issue stemmed from leftover data related to the account.asset model, which wasn't being properly removed during uninstallation. The fix adds an uninstall hook to clean up this data, ensuring a smoother module removal process.
Original PR description
**Steps to reproduce:** - Install `Accounting` module without demo data. - Go to Accounting > Configuration > Settings > Set fiscal localization as `United States`. - Go to `Apps > Accounting >…
**Steps to reproduce:** - Install `Accounting` module without demo data. - Go to Accounting > Configuration > Settings > Set fiscal localization as `United States`. - Go to `Apps > Accounting > uninstall`. - Now try to uninstall `Invoicing` module. [`l10n_us_account`](https://github.com/odoo/odoo/blob/e1dd3852b118eacc8d77e9e3d8c7769195c6edb1/addons/l10n_us_account/data/template/account.asset-us.csv#L2-L8) defines data for the `account.asset` model. When removing `account_accountant`,`account_asset` module and model are removed, but their data is still in `ir.model.data`. As a result, when trying to uninstall the `Account` module, it attempts to delete records of a model that no longer exists, leading to a traceback. `KeyError: 'account.asset'` Since this issue occurs in multiple modules, we need to ensure that all related `account.asset` records are unlinked from `ir.model.data`. We added an `uninstall_hook` in the `account_asset` module to remove these records during uninstallation. Other modules are: `l10n_be,l10n_eg,l10n_pk,l10n_uk,...` **sentry-6938852090**
This update corrects a bug in Odoo 19.0 where setting an employee's timezone to 'None' would cause an error. Now, if the timezone field is left blank, Odoo will display a validation error, ensuring accurate data entry and preventing potential issues with employee records. This improves data integrity and reliability.
Original PR description
Description of the issue/feature this PR addresses: On Odoo 19.0 and master, setting an employee’s timezone to None would cause a traceback when creating or updating the employee. Current behavior before PR: a traceback when creating or updating the employee. Desired behavior after PR is merged: A Validation Error occurs because it missing required value for the field 'Timezone' (tz). Model: 'Resources' (resource.resource) task-5257749 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where accountants were blocked from opening invoices due to lack of POS access rights. The change adjusts how access rights are checked, allowing accountants to process invoices by searching in sudo mode and returning records without requiring POS permissions. This improves usability for a key user group.
Original PR description
The aim of this commit is to allow accountants to open the invoices without getting blocked because they don't own the pos access rights. Context: It seems that the ORM is now checking the access rights over M2M which creates a lot of access rights issues. Before this commit: The computation of `l10n_mx_edi_update_sat_needed` and the method `l10n_mx_edi_cfdi_try_sat` would cause an access right issue. Cause: The method `_get_update_sat_status_domain` could be override in l10n_mx_edi_pos and add a check on `<l10n_mx_edi.document>.pos_order_ids` on which the accountant might not have access. (The same issue would happens to a user processing a stock picking) After this commit: We search the domain in sudo mode and return unsudoed records allowing the user to pursue its task. opw-5263759 opw-5263824
This update ensures that VIES validation remains accurate when a company is created for a contact, even if the initial validation fails due to network issues. Previously, a failed VIES check could lead to incorrect B2C fiscal positions being applied to future orders. This fix maintains the validated status, guaranteeing correct B2B fiscal handling.
Original PR description
Use case: - prerequisite: enable "vies" validation on the company - a customer create from an account from the website - from /my/account he edit his information, filling in: * the company name * the…
Use case: - prerequisite: enable "vies" validation on the company - a customer create from an account from the website - from /my/account he edit his information, filling in: * the company name * the vat number The VIES validation succeed and for future orders/invoices the B2B fiscal position will be correctly applied. - then later, a backend user go the user's contact form and click on the `create company` button. Here when creating the new "company" partner and then linking the contact to it, we will trigger the recomputation of the `vies_valid` field on the new "company" partner. At that time, if the new VIES validation performed fail because of an network error or because the service is overloaded (`MS_MAX_CONCURRENT_REQ`) the `vies_valid` will be reset to `False`; and on future orders/invoices a wrong fiscal position (B2C) will be applied. This commit ensure we keep the previously performed VIES validation when creating the company of a contact. opw-5365258 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where inactive accounts were incorrectly displayed in financial reports. The change, related to a new 'active' field, prevents the system from processing inactive accounts in report calculations and auditing, ensuring accurate reporting. This improves data integrity and reporting reliability.
Original PR description
In replacing the deprecated field with the special `active` field the account_codes prefix engine no longer displays values for accounts that are inactive.
This disables the active test in:
- computing the domain for accounts
- auditing the value (since the domain is `('account_id.code', 'in'...)`
opw-5226153
Forward-Port-Of: odoo/enterprise#100885This update corrects an issue in the l10n_ar_stock delivery guide report where a critical message about invoice validity was missing. The fix also eliminates duplicate report names and numbers, ensuring consistent and accurate reporting. This improves the reliability of financial reports for Arabic-speaking customers.
Original PR description
The mention "Document not valid as an invoice" is missing in the delivery guide report. And we shouldn't duplicatethe report name and number. opw-5004345 Forward-Port-Of: odoo/odoo#234506
This update resolves an issue where clicking a record in the Field Service module's Kanban view with the middle mouse button opened the record in the same tab instead of a new one. The fix ensures that middle-mouse clicks correctly open records in new tabs, improving user workflow and efficiency.
Original PR description
Steps to reproduce: 1. Install `industry_fsm` 2. Open Field service module 3. In the kanban view, click a record with the middle mouse button Issue: - The record opens in the same tab instead of a new tab. Cause: - `FsmMyTaskKanbanRecord` overrides `onGlobalClick` without propagating the `newWindow` argument, preventing the expected new-tab behavior. Solution: - Forward the `newWindow` parameter to the parent implementation to restore the correct handling of the middle mouse click opw-5351842 Forward-Port-Of: odoo/enterprise#100926
This update ensures that online self-order and kiosk payments are automatically sent to the kitchen (PDIS) upon confirmation, regardless of whether the user sees a confirmation page. Previously, reliance on the confirmation page was unreliable, leading to potential delays and confusion. This change improves order processing efficiency and accuracy.
Original PR description
pos_online_payment* = pos_online_payment_self_order_preparation_display Task: [#5217268](https://www.odoo.com/odoo/project/1737/tasks/5217268) --- Previously, when an online payment was made, the…
pos_online_payment* = pos_online_payment_self_order_preparation_display Task: [#5217268](https://www.odoo.com/odoo/project/1737/tasks/5217268) --- Previously, when an online payment was made, the user was supposed to be redirected to a payment confirmation page which, once the transaction succeeded, sent the related order to the kitchen (PDIS). However, in some cases, the user never reaches this page. For example, the user may see the payment succeed in their banking app and close the tab before the redirection happens. For POS self-orders, we must send the order to the kitchen as soon as the payment is confirmed to avoid confusion between the customer, the cashier, and the kitchen staff. Relying solely on the confirmation page was therefore unreliable. --- To fix this, we now leverage the cron that post-processes payment transactions: we gather all transactions made in self-order or kiosk mode that are not yet post-processed, and send their corresponding orders to the kitchen. This ensures that orders reach the PDIS even when the user never lands on the confirmation page. Forward-Port-Of: odoo/enterprise#99249
This update fixes a bug that prevented invoices from being sent to Peppol when certain special characters were present in the data. The fix ensures that invoice data conforms to XML standards, preventing errors and ensuring successful Peppol communication. This improves the reliability of our Peppol integration.
Original PR description
## Issue: When a character that's not compatible with XML is in an invoice, and you send it to Peppol, a traceback was raised: `ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters` ## Cause: `dict_to_xml` converts each invoice field into XML, but certain control characters (e.g., `\x02`) are not allowed in XML according to the specification: https://www.w3.org/TR/xml/#charsets If such a character appears in the data (e.g., imported through a product CSV), the XML generation crashes ## Steps to produce: - Install `account_peppol` and `l10n_be` (to get the BE Company CoA) - Import a product containing a control character: `echo -e "name,default_code\nTest\x02Product,ABC123" > products.csv` - Create an invoice for the BE company using the product `Test\x02Product` - Send it via Send > by Peppol - A traceback is raised opw-5114648 Forward-Port-Of: odoo/odoo#239053 Forward-Port-Of: odoo/odoo#236836
This update fixes an issue where holiday pay recovery wasn't correctly applied to employees with older contracts. Previously, reopening contracts could incorrectly trigger the recovery process as if the employee was newly hired. This change ensures holiday pay recovery is applied accurately for all employees, regardless of contract history.
Original PR description
Purpose ======= Normally contracts start and end dates should be configured without being closed and reopened at each version date. But, if it is the case, holiday pay recovery could be applied on older employees because it is considered the employee just joined the company, and there is an amount to recover. Forward-Port-Of: odoo/enterprise#101564
This update resolves an issue preventing the payroll demo data installation from working correctly at the start of the year. The fix sets a fixed past year for Mitchell Admin's contract, ensuring the demo data aligns with current payroll calculations. This resolves a technical error reported by automated testing.
Original PR description
Before this commit, the relative date used to generate Mitchell Admin's contract was always at January 1st of the current year, making the payroll demo data install fail when at the start of the year. This commit sets a fixed year in the past for Mitchell's contract. runbot error 234623 and 234612 Forward-Port-Of: odoo/odoo#238711
This update ensures online payment orders are processed immediately, regardless of whether the user reaches the confirmation page. Previously, delays caused confusion for customers and cashiers. Now, the system automatically triggers order processing after receiving payment confirmation, leading to faster and more accurate order updates.
Original PR description
..., pos_online_payment_self_order Task: [#5217268](https://www.odoo.com/odoo/project/1737/tasks/5217268) --- Previously, when an online payment was made, the user was supposed to be redirected to a…
..., pos_online_payment_self_order Task: [#5217268](https://www.odoo.com/odoo/project/1737/tasks/5217268) --- Previously, when an online payment was made, the user was supposed to be redirected to a payment confirmation page, which triggered the payment transaction post-processing. However, in some cases, the user never reaches this page. For example: the user sees that the payment succeeded in their banking app and closes the tab before being redirected to the confirmation page. To still process the orders, a cron runs every 10 minutes to post-process transactions that were not processed yet. However, for POS self-orders this is not ideal: we need the order to be processed as soon as possible since we are in direct contact with the user. A situation where the customer insists their payment went through but the cashier sees no updated order creates unnecessary confusion. --- To fix this, we now trigger the cron directly after receiving the callback from the payment provider. This ensures that the transaction (and therefore the order) is always post-processed immediately and kept up-to-date, even if the user never reaches the confirmation page. Forward-Port-Of: odoo/odoo#238407 Forward-Port-Of: odoo/odoo#235254
This update fixes a technical issue within the HTML editor that caused a traceback when users selected a link and then applied a color. The fix ensures the editor correctly handles selections involving special characters like 'feff', preventing errors and improving the overall stability of the HTML editing functionality. This resolves a potential disruption for users.
Original PR description
Problem: When the user selects a link to color and the selection falls on a `feff` character, a traceback occurs. Cause: After commit 927f4b973932d14961c148e13473017651a60dc0, we preserve the…
Problem: When the user selects a link to color and the selection falls on a `feff` character, a traceback occurs. Cause: After commit 927f4b973932d14961c148e13473017651a60dc0, we preserve the selection at: https://github.com/odoo/odoo/blob/bee7fc1f955c52a88b527ad9a2ddf0021529bbc7/addons/html_editor/static/src/main/font/color_plugin.js#L247-L247 and then call `getFonts()`, which internally uses `this.dependencies.split.splitAroundUntil()`. If the selection is on a `feff` node, `splitAroundUntil()` can clear those nodes because `splitElement()` inside it dispatches to `clean_handlers` with the selected element containing the `feff`. Since the preserved cursor offset refers to the node before the `feff` was removed, restoring it throws: `The offset x is larger than the node's length (y).` Solution: After `splitAroundUntil()`, adjust the preserved cursor offsets if the nodes were mutated to ensure they remain valid. Steps to reproduce: It is difficult to reproduce manually, but the issue occurs when coloring a link with the selection on a `feff`. A test case replicating the situation can be based on the original failing template in the customer’s database. opw-4953943 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238922 Forward-Port-Of: odoo/odoo#234328
This update fixes an issue where timesheets weren't correctly reflecting new employee's time off requests. The change ensures that only global time off requests are considered, resolving a problem caused by incorrectly configured time-off records. This improves the accuracy of timesheet reporting.
Original PR description
**Steps to reproduce** 1. Have a future `resource.calendar.leaves` without a `calendar_id` but with a `resource_id`. To achieve this, you can for example install Payroll and Attendance, create a contract with the work entry source being attendances and with no working schedule. Then, create a time off in hours for that employee and validate it. In that case, the `hr.leave` has no `resource_calendar_id` as computed in `_compute_resource_calendar_id`. This leads to a `resource.calendar.leaves` record without a `calendar_id` once the time off is validated. 2. Create a new employee. A timesheet corresponding to the previously created time off is created. **Change** Make sure only global time offs are considered. opw-5248992 Forward-Port-Of: odoo/odoo#237773
This update corrects a critical issue where Swiss account translations were missing, particularly for payroll documents. This ensured all official documents were consistently translated, preventing mixed language content and maintaining compliance standards. The fix improves the accuracy and professionalism of Odoo's Swiss localization.
Original PR description
Some Swiss account translations were missing, mainly related to payroll. This resulted in payroll documents having mixed languages, which is not acceptable for official documents. opw-5343680 Forward-Port-Of: odoo/odoo#239122 Forward-Port-Of: odoo/odoo#239001
This update resolves a technical issue where setting image field widths in list views caused a system crash. The change clarifies that image field widths should be controlled through list view configurations, not the image field itself, ensuring stability and proper functionality for image displays in lists.
Original PR description
Before this commit, if one set the `width` attribute on an image field in a list view arch, there was a props validation crash (in debug mode). The `width` attribute is relevant to be set in list view archs as it allows to specify the width of the column. That attribute isn't meant to be used by the image field itself, where the option `size` can be used to specify the size of the image as a pair `[width, height]`. opw~5392068 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#239069
This update prevents a potential memory error that could occur during HR Timesheet installations on databases with many existing accounting records. The change ensures that new data fields are created efficiently, improving the installation process and reducing the risk of system slowdowns. This enhances the overall stability and performance of the HR Timesheet module.
Original PR description
Description ----------- On databases with a large count of existing `account.analytic.line` records, installing modules like `hr_timesheet`, which adds compute stored or related stored fields to this model can trigger a memory error due to the volume of records that need to be recomputed. This commit creates the columns manually with the correct default value that is inferred from the state and implementation of said fields. Reference --------- opw-5234833 opw-5255382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239024
This update resolves a visual bug where the version timeline in the HR module would disappear when zoomed below 100%. Now, all versions remain visible regardless of the zoom level, ensuring a consistent and user-friendly experience for managing employee timelines.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: . When you zoom below 100%, the other versions from the version bar disapear, leaving only the active one Desired behavior after PR is merged: . When you zoom below 100%, all versions on timeline appears normally task-5401380 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents misleading 'Duplicate' warnings when reverting a payslip in the HR payroll module. Previously, reverting a payslip created related payslips flagged as duplicates, causing confusion. Now, the system correctly identifies these as related and avoids the duplicate warning, streamlining the payroll process.
Original PR description
## Steps to Reproduce 1. Create a payslip and validate it. 2. Mark it as Paid. 3. Click on Revert and it will create a new payslips related to the other payslip. ## Issue When reverting a payslip, it is flagged as a "Duplicate". When there is a payslip that has "Related payslips", it should not be considered as a duplicate. ## Fix Duplicate warnings now ignore the original and refund payslips linked to each other (`origin_payslip_id/related_payslip_ids`) are removed from the duplicate recordset. task - [5240436](https://www.odoo.com/odoo/project/1251/tasks/5240436)
This update resolves an issue where users couldn't select items within locked pills in the Gantt chart. Now, users can initiate selections on locked pills without the locking style being applied, providing a more intuitive and functional experience. This enhancement improves usability for managing tasks and dependencies.
Original PR description
This commit allows users to initiate multi-selection on locked pills. When starting a selection on a locked pill, the locked styling is no longer applied, and the selection behaves normally. task-5118978
This update fixes a potential issue where test results in Odoo's sale stock module could be inconsistent due to timing differences. The change ensures tests run predictably regardless of the machine's speed, improving the reliability of test results. This enhances the overall stability of the sale stock functionality.
Original PR description
In the case the test runs a machine not fast enough, by the time we reach either assert, there could be at least a millisecond difference between the two dates. Now freeze the time to ensure the test doesn't fail depending on its running speed. runbot-233470 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A test related to date handling in the stock account module was failing in community builds. This change corrects the issue by aligning the test's date locking behavior with established practices in the account module, ensuring consistent test results. This resolves a technical impediment to the stock account functionality.
Original PR description
…test_backdate_picking_with_lock_date ### Issue: The test `test_backdate_picking_with_lock_date` added in https://github.com/odoo/odoo/commit/4ea1853108a73f3d6b593785432f10b41ccc0041 fails in community builds. ### Cause of the issue: The `account.change.lock.date` model is defined in `account_accountant`: https://github.com/odoo/enterprise/blob/b3679bc04d4fcef1da7251e5ca061dfeabe89eae/account_accountant/wizard/account_change_lock_date.py#L11-L16 However, this module is not a dependency of the `stock_account` module. ### Fix: We set the lock_dates directly just as in the `account` tests: https://github.com/odoo/odoo/blob/e91c3817574af8bd48a634e3fb0b2f0e08b21ee9/addons/account/tests/test_account_move_date_algorithm.py#L52-L53 runbot-234673 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where rental receipts weren't being validated correctly in the barcode app. The change ensures that rental receipts, which are treated as partial deliveries, are handled properly, preventing validation errors. This improves the reliability of the rental process.
Original PR description
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate…
Steps to reproduce: - Enable Rental pickings - Create a rental for a product, for 4 quantity - Process the delivery - Open the barcode app and open the reception - Scan the product once and validate Issue: The receipt is validated without issues nor warning, despite being incomplete. This is due to a bad mix of two changes: - #60801, which always sets the rental receipt as return of the delivery - #48788, which removes the backorder check for returns in barcode For regular returns made in barcode, it makes sense to avoid the backorder check, as from here we're processing a full picking return and we'd have the confirmation pop every time. However, things are different for rental receipts, as despite them being set as returns of the delivery, they're proper receipts that need to handle the partial receipt. To avoid the issue, rather than removing the backorder check whenever there's a return linked to the picking, now also checks that there isn't a rental order linked to the picking. opw-5265874 Forward-Port-Of: odoo/enterprise#101387
This update corrects an issue where the payment term line name wasn't updated when changing the invoice's 'Customer Reference'. The fix addresses a technical detail within the system's calculations, ensuring consistent naming conventions for invoices and improving data accuracy. It resolves a discrepancy in how the system handles reference updates.
Original PR description
### Issue: When changing the "Customer Reference" on an invoice, the name of the payment term line is not updated. ### Steps to reproduce: - Create an invoice with payment terms, confirm it - Modify…
### Issue:
When changing the "Customer Reference" on an invoice, the name of the payment term line is not updated.
### Steps to reproduce:
- Create an invoice with payment terms, confirm it
- Modify its "Customer Reference" to 'test' for example
- In the page "Journal Items" the name of the terms line has been recomputed to "test - INV/2025/XXXXX"
- Modify again its "Customer Reference" to 'abcdef' for example
- In the page "Journal Items" the name of the terms line was not recomputed
### Cause:
In `_compute_name()` we only write the name if this condition is `True`:
```py
if n_terms > 1 or not line.name or line._origin.name == line._origin.move_id.payment_reference or (
line._origin.move_id.payment_reference and line._origin.move_id.ref
and line._origin.name == f'{line._origin.move_id.ref} - {line._origin.move_id.payment_reference}'
):
line.name = name
```
The purpose of this line is to keep the name of the line if it was manually inputted. So the logic is: we only write the computed name if the previous name was computed. To check this, we check if `line._origin.name == f'{line._origin.move_id.ref} - {line._origin.move_id.payment_reference}'`.
The issue comes from the use of `_origin` in a compute. `_origin` refers to the record before we make any change. But it is meant to be used for `onchange` methods, in these the values are not yet written so `_origin` refers to the record before saving.
Here, when saving, `line._origin` is the same as `line`, so
- `line._origin.move_id.ref` is the new ref.
- `line._origin.name` uses the old ref (it's currently being recomputed).
### Solution:
Unfortunately, in the compute, there are no trace left of what were the previous values as the write already occurred.
The initial complaint justifying to keep custom line names was that on bills, the line name is empty. So when inputting a custom line name, it was removed by the compute method. The previous fix wanted to be more general by always keeping custom line names.
Considering this, this commit removes part of the previous fix: Now we only keep the custom line name when the compute method wants to remove it. So we keep the previous fix for bills.
### Note
There was a test verifying exactly that when manually deleting the line name, in the end
the line does not have a name. This will no longer be the case but a decision must be made between:
1. updating the line name when changing the ref
2. not recomputing line name when it has been changed manually
3. removing the line name when it's manually deleted
We can have 2 and 3 but not with 1 afaik.
opw-5246917
Forward-Port-Of: odoo/odoo#237710This update fixes a limitation in how barcodes handle rental sales within Odoo. A new hook has been added, allowing businesses to customize barcode behavior specifically for rental transactions. This ensures accurate and consistent barcode scanning for both standard sales and rental operations.
Original PR description
Add a hook method to be used in barcode that can be overriden for `sale_stock_renting`. As there is no common module for these two module, this was put in their common ancestor. opw-5265874 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238753
This update fixes a visual issue where form fields, specifically those using 'Text' type, were displaying a placeholder of 'null' instead of an empty field. This change ensures that all form fields appear correctly, providing a consistent and user-friendly experience when editing website forms. It's a minor cosmetic fix that improves usability.
Original PR description
Steps to see the issue: - Open website and start editing - Drop a form - Add a new field, or click on an optional field, the type of which we can modify - Set the field type to 'Selection' or 'Radio Buttons' (or any other that does not have placeholders) - Set the field type back to 'Text' => Field's placeholder is `'null'`, but it should just be empty. task-5383835 Forward-Port-Of: odoo/odoo#238710
This update corrects a previous issue where employees working less than 6 months were incorrectly denied PFA (Pension Funds Agreement) eligibility. The change adjusts the system to verify an employee's start date is at least 6 months prior, rather than requiring a full 6-month employment period. This ensures accurate PFA calculations for all employees.
Original PR description
If you worked less than 6 months, you could have the right to the PFA. Instead of verifying that the employee worked for 6 full months, we should check that he started at least 6 months ago. task-5405293
This update corrects a display issue where single-value product attributes were appearing twice when the 'accordion' style was selected for product specifications. The fix utilizes a simple SCSS style adjustment, avoiding the need for complex view updates and ensuring consistent product display across the website.
Original PR description
### Issue: In this issue, when specification is set to accordion style, single value attributes is still displayed, making single value attributes duplicated. #### To reproduce: 1- Create a product…
### Issue: In this issue, when specification is set to accordion style, single value attributes is still displayed, making single value attributes duplicated. #### To reproduce: 1- Create a product with a multi-value and a single-value attribute. 2- Using editor on product website page, from style tab, change style of specification to `in accordion`. 3- As you see, single value-attribute is displayed twice. Once in accordion, and one in single-value attributes section. ### Cause: When `specification` is set to other than `None`, IMHO we need to not display `product_accordion` as single values are already displayed: https://github.com/odoo/odoo/blob/ea01165d9486572269c44597a1db49b31bf8aba3/addons/website_sale_comparison/views/website_sale_comparison_template.xml#L196-L209 When `specification` is set to `Bottom of Page`, this is already the case using xpath replace: https://github.com/odoo/odoo/blob/ea01165d9486572269c44597a1db49b31bf8aba3/addons/website_sale_comparison/views/website_sale_comparison_template.xml#L91-L94 However, we cannot do the same in `accordion_specs_item` as it is not inheriting `website_sale.product`. We can instead fix this using scss style, which also won't require updating views. opw-5365375
This update resolves a technical issue that prevented the correct extraction of invoice sequences, specifically when sequences didn't include spaces. The fix uses a regular expression to reliably identify the invoice number, regardless of the separator used (space, slash, or hyphen), ensuring accurate VAT processing.
Original PR description
Before this commit, the method `_get_last_sequence` assumed that the document sequence always contained a space separator (e.g., "INV 12345") It attempted to extract the folio number using `res.split(" ")[-1]`.
If the sequence format did not contain a space, such as the standard Odoo format `INV/2025/01234`, the split would return the entire string. This caused a `ValueError` when trying to cast the non-numeric string to an integer:
ValueError: invalid literal for int() with base 10: 'INV/2025/01234'
This commit fixes the issue by using a regular expression to extract the last group of digits from the sequence string. This ensures the folio number is correctly retrieved regardless of the separator used (slash, space, or hyphen).
opw-5401509
Forward-Port-Of: odoo/enterprise#10166521 changes
Resolved issues and error corrections
This update resolves an issue related to how production order states are calculated, ensuring accurate reservations and preventing errors. A previous fix inadvertently caused problems, and this change corrects the underlying dependencies between related states. The workorder revamp in a later release also addresses these dependencies.
Original PR description
Due to the dependencies between mo state, components_availability_state, reservation state and wo state, we had to make sure that the state is always computed before the reservation_state. This is…
Due to the dependencies between mo state, components_availability_state, reservation state and wo state, we had to make sure that the state is always computed before the reservation_state. This is the purpose of (1) merged in 17.0 A non-related mrp_account fix (2) has been merged in 18.0 with the side-effect of firing a reservation_state compute with no state, invalidating the previous fix. As _post_inventory occurs under button_mark_done which changes at least the mo's state and may fire the computes on another mos, we have to make sure reservation_state and state are computed in one go, the correct order being handled by (1). Please note that of workorder revamp (3) has been merged in 18.3, solving the dependencies. (1) https://github.com/odoo/odoo/pull/185092 (2) https://github.com/odoo/odoo/pull/201764 (3) https://github.com/odoo/odoo/pull/194841 task: 5247116 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 resolves an issue where invoice sequences without spaces caused errors during processing. The change uses a regular expression to correctly extract the folio number from various sequence formats (spaces, slashes, or hyphens), ensuring invoices are processed accurately. This improves data reliability and prevents potential disruptions to financial workflows.
Original PR description
Before this commit, the method `_get_last_sequence` assumed that the document sequence always contained a space separator (e.g., "INV 12345") It attempted to extract the folio number using `res.split(" ")[-1]`.
If the sequence format did not contain a space, such as the standard Odoo format `INV/2025/01234`, the split would return the entire string. This caused a `ValueError` when trying to cast the non-numeric string to an integer:
ValueError: invalid literal for int() with base 10: 'INV/2025/01234'
This commit fixes the issue by using a regular expression to extract the last group of digits from the sequence string. This ensures the folio number is correctly retrieved regardless of the separator used (slash, space, or hyphen).
opw-5401509This update fixes an inconsistency in how Odoo calculates rental prices based on time zones. Previously, using relativedelta with time-zoned dates resulted in incorrect price calculations. This change ensures that rental prices are consistently calculated regardless of the rental's start and end dates, addressing potential pricing discrepancies.
Original PR description
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work on time-zoned dates. Example: Consider a website in UTC+1 (Brussels timezone DST off). And a rental from the 01/12/2025 to the 31/12/2025 = by design, from the 01/01/2025 00h00 (start_date) to the 31/12/2025 23h59 (end_date). Converted in UTC for the back-end, we have: from the 30/11/2025 23h00 to the 31/12/2025 22h59. relativedelta(end_date, start_date) = time between the 2 dates is calculated as follow: 30/11/2025 23h00 + 1 month = 30/12/2025 23h00 +23h59 = 31/12/2025 22h59. Time difference = 1 month, 23 hours, 59 minutes. Price = 2 months. Consider a second rental from the 01/01/2026 to the 31/01/2026. 31/12/2025 23h00 + 30 days = 30/01/2026 23h + 23h59 = 31/01/2026 22h59. Time difference = 30 days, 23 hours, 59 minutes. Price = 1 month. opw-5130762
This update resolves a potential memory issue that could occur during HR Timesheet installations on databases with many existing accounting records. The change ensures that new data fields are correctly initialized, preventing the system from running out of memory and improving installation speed and stability. This addresses a previous technical problem.
Original PR description
Description ----------- On databases with a large count of existing `account.analytic.line` records, installing modules like `hr_timesheet`, which adds compute stored or related stored fields to this model can trigger a memory error due to the volume of records that need to be recomputed. This commit creates the columns manually with the correct default value that is inferred from the state and implementation of said fields. Reference --------- opw-5234833 opw-5255382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239024
This update fixes an issue where clipboard text was incorrectly added after the user's signature in emails. The change ensures clipboard text is inserted before the signature, streamlining the email composition process and eliminating manual adjustments for users. This improves the user experience when sharing knowledge articles via message.
Original PR description
When a user is viewing a page, clicks on the Knowledge Book icon, opens an article, and selects the "Send As Message" button in a Knowledge Clipboard block, the macro system performs several actions: it restores the initial view, opens the full mail composer, and inserts the clipboard block's text at the very end of the editor. Recent updates introduced automatic inclusion of the user's signature in the email body when the full mail composer is opened. As a result, the clipboard text is inserted after the user signature, which is undesirable because users must manually adjust the message to position the signature correctly. To insert text before the user signature but after the user text, the clipboard macro will now trigger a "click" event on the button opening the full mail composer and set on that event the text to insert. The chatter will then read that value and insert the text at the right place. Task-4428445
This update significantly speeds up Odoo's financial reports (Balance Sheet, P&L, Executive Summary) by caching pre-aggregated account balances. Previously, each report formula re-calculated these balances repeatedly, leading to slow performance. Now, a single calculation is stored and reused, dramatically reducing report generation times.
Original PR description
### Issue Large financial reports are slow to compute due to repeated re-aggregation of account_move_line balances for each formula, even when most formulas share the same base domain (usually…
### Issue
Large financial reports are slow to compute due to repeated re-aggregation of account_move_line balances for each formula, even when most formulas share the same base domain (usually filtered by account_id fields).
### Analysis
Each report line formula independently aggregates balances from account_move_line, even when their domains only differ on account_id-related fields such as account_id.account_type or account_id.non_trade.
This leads to redundant scanning and aggregation of the same dataset multiple times within a single report execution.
### Solution
Introduce a lightweight in-memory caching layer for aggregated balances by account_id, stored in self.env.cr.cache.
For each (options, date_scope) pair:
The report engine now computes once the mapping
{account_id: {'amt': total_balance, 'count_aml_lines': count}}.
This mapping is stored in the cursor cache and reused across all formulas whose domains filter exclusively on account_id fields.
A small domain transformation step allows AML domains based on account_id.* fields to be evaluated directly against the cached account aggregates.
This approach avoids redundant SQL aggregation, remains fully read-only (no database writes), and is safe for execution on read replicas.
### Benchmarks
Profiling get_report_information_readonly on different reports. Database has ~11.6 million account_move_lines, 305 account_accounts, and 16 account_types
| Report Name | Before | After | % Speed Up |
| --- |---|---|---|
| Balance Sheet | 35s | 6.2s | ~550% |
| Profit and Loss | 7.2 | 2.1 | ~300% |
| Executive Summary | 24s | 6.3 | ~400% |
### References
opw-5130725This update adds a new account for 'Salaries & Wages Payable' within the Odoo accounting system for Hong Kong. This resolves a previous misconfiguration and ensures accurate tracking of payroll liabilities under Hong Kong's NET rules, improving payroll reporting.
Original PR description
Adds a new Salaries & Wages Payable account of type current liabilities in order to use it in payroll for the NET rules and solve a misconfiguration in the default data. task-5042786 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue in the Hong Kong payroll system where the default account for net salary payments was incorrect. The change implements a new 'Salaries & Wages Payable' account, ensuring accurate payslip payments and resolving payment problems. This improves the reliability of payroll processing for Hong Kong businesses.
Original PR description
Fixes the default account for NET salary rules in the Hong Kong payroll, which is using the wrong account type and causes issues when trying to pay payslips. It is replaced by a new Salaries & Wages Payable account, and we also set it for the structures other than 'Monthly Pay' task-5042786
This update resolves an issue where loyalty reward rules using 'not ilike' operators weren't functioning correctly. The fix corrects a double negation problem within the system's domain processing, ensuring that rewards are applied as intended when filtering products based on exclusion criteria. This prevents rewards from being missed when using 'not ilike' domains.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Create a loyalty program; 2. Create a reward; 3. Add a Product domain to the reward containing the `not ilike` operator; 4. Load the POS; 5. Try to trigger…
Versions
--------
- 18.0+
Steps
-----
1. Create a loyalty program;
2. Create a reward;
3. Add a Product domain to the reward containing the `not ilike` operator;
4. Load the POS;
5. Try to trigger the Loyalty program;
6. The Reward is not applied when the domain is satisfied
Issue
-----
Loyalty Program rewards containing `not ilike`-based product domains are not applied when they should.
Cause
-----
The `_replace_ilike_with_in` function in loyalty_reward.py converts the `ilike` and `not ilike` operators by first fetching the records that very the domain with the operator used, and then by replacing the domain by `in` or `not in` with the returned records ids. This is problematic as in the case of `not ilike`, it leads to a double negation.
Example
-----
For `ilike`: `['categ_id', 'ilike', 'service']`
-> Search for all categories that contain "service": `_search([('display_name', 'ilike', 'service')])`
-> Return new domain `['categ_id', 'in', matching_ids]`
Which is correct.
For `not ilike`: `['categ_id', 'not ilike', 'service']`
-> Search for all categories that **do not contain** "service": `_search([('display_name', 'not ilike', 'service')])`
-> Return new domain `['categ_id', 'not in', matching_ids]`
Which is incorrect, as the matching_ids are already the ids that are not like "service". (i.e., *categ_id not in the categories that do not contain "service"* <=> *categ_id in the categories that contain "service"*, opposite of what is expected.)
Solution
--------
1. Perform the initial search with `ilike` for both operators
opw-5182818
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes a confusing issue on Odoo POS receipts where all tax amounts (CGST, SGST, IGST) were displayed together. Now, receipts accurately show only the relevant tax column – either CGST+SGST or IGST – based on the transaction, improving clarity for users and ensuring accurate reporting.
Original PR description
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be…
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be displayed, not all three. Current behavior before PR: - The receipt always displays CGST, SGST, and IGST columns at the same time. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/5c8487c7-c497-4c82-ad80-8cf0e98fbf38" /> Desired behavior after PR is merged: - The receipt shows only the correct tax columns based on the transaction: - Shows CGST and SGST when GST applies. - Shows IGST when IGST applies. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/68d2fb58-9e15-4861-a71f-ccb2d978e544" /> Changes implemented in this commit: - Added `t-if="l10n_in_hsn_summary.has_gst"` to CGST and SGST headers. - Added the same condition to CGST and SGST values in the item rows. task-5268935 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where Turkish language translations weren't properly applied after installing the 'l10n_tr_nilvera' module. The fix ensures that all module translations are updated, providing accurate Turkish language support for new databases and company configurations. This improves the user experience for Turkish-speaking customers.
Original PR description
### Issue: When installing "l10n_tr_nilvera" on a new DB the Turkish language is installed but the translation of previously installed modules are not updated. ### Steps to reproduce: - Install 'l10n_tr_nilvera' and switch to a Saudi company - Check the view "report_invoice_document" - Click the translation icon on the view - No Turkish translations are loaded ### Cause: When installing "l10n_gcc_invoice" the Arabic language is installed ([src](https://github.com/odoo/odoo/blob/70404624d7ea6f971182cbe4f4fe8fc064d2afd8/addons/l10n_gcc_invoice/__init__.py#L4-L5)). But the method [`_activate_lang()`](https://github.com/odoo/odoo/blob/70404624d7ea6f971182cbe4f4fe8fc064d2afd8/odoo/addons/base/models/res_lang.py#L161-L169) only activates the language, it does not update the translations. ### Solution: Create a new method that activate the language and calls `_update_translations()` on the installed modules. opw-5219783
This update corrects a display issue on the Odoo portal where users were seeing outdated document notifications. The system now accurately shows users only the documents they are currently required to sign, improving the user experience and preventing confusion. This ensures users are only alerted to new documents when it's their turn.
Original PR description
Version: - 18.0 Steps to reproduce: - Install sign - Upload document. - Add multiple signers - Set a sequential signing order Issue: - When documents require sequential signing, portal users see a banner saying there’s a new document to sign, even if it’s not yet their turn. Solution: - Update the counter to show only the documents that the user can currently sign. Impact: - Portal users now only see documents when it’s their turn to sign. Task-5226240
This update ensures stock tests consistently pass by freezing time during execution. Previously, slight timing differences could cause tests to fail intermittently. This change guarantees the test accurately reflects the intended behavior, improving overall test reliability.
Original PR description
In a previous fix in #174442, we ensured that the order of moves when freeing reservation would remain deterministic, even if move dates were the same. In the test however, we didn't make sure that both moves were created at the exact same time, meaning that in some case, a millisecond could pass between the two moves creation, making the later assert checking if both dates are the same wrong, and making the test irrelevant. Now freeze the time at an irrelevant date just to make sure the test always does what it was intended to do. runbot-233470 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where invoice totals didn't update correctly when changing the unit price or product. Previously, changes required a full save of the invoice. Now, the totals dynamically adjust immediately when the unit price or product is modified, ensuring accurate calculations.
Original PR description
**Steps to reproduce:** - Install Accounting - Create an invoice with an invoice line - Save the invoice - Change the unit price => The totals should change - Change the product => The unit price and…
**Steps to reproduce:** - Install Accounting - Create an invoice with an invoice line - Save the invoice - Change the unit price => The totals should change - Change the product => The unit price and the totals should change - Change the unit price again **Issue:** After this point, the totals don't change anymore, even if the unit price is changed several times. Only saving the form will adapt the totals correctly. **Cause:** When changing the unit price the first time, a "price_unit "key is added in the onchange values. When changing the product, a "product_id" key is added after the price key. Changing the product triggers an onchange of the price with the price of the new product. However, when the price is changed again, as the "price_unit" key already exists, it's reused and its position is still before "product_id" key even if it should be computed after. This order results in the use of the price of the second product instead of the one entered manually when computing the "tax_totals". **Solution:** If "product_id" and "price_unit" are the values of the onchange method, the list of values is reordered to make sure that "product_id" is computed first. opw-5012125 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#232684
This update corrects a technical issue where text labels within confirmation windows were not being properly prepared for translation within Odoo. Specifically, the 'confirm-title' attribute of buttons was missing from the translation files. This ensures that these labels can now be translated into different languages, improving the user experience for international users.
Original PR description
Description of the issue/feature this PR addresses: The texts from the "confirm-title" attribute of a tag are missing from the POT files. Current behavior before PR: In this line there is a text (the caption of the confirmation window): https://github.com/odoo/odoo/blob/19.0/addons/mass_mailing/views/mailing_mailing_views.xml#L66 "Ready to unleash emails?" - This text is missing from the POT file. Desired behavior after PR is merged: * These texts will apeear in POT files * Someone needs to translated them * It will show up as translated texts in UI --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239034
This update resolves a problem where invoices generated in Arabic were sometimes printed incorrectly, with missing logos or repeated headers. The fix reduces the number of invoices processed at once, allowing the printing software to render them correctly. This ensures consistent and professional invoice output for all customers.
Original PR description
Repro steps: 1. Create a customer whose language is Arabic 2. Create 16 or more invoices for that customer 3. Send these invoices together all at once Issue: PDFs generated for the invoices are strange, some have missing logo in the header, while others have the header repeated multiple times on the page. Root cause: wkhtmltopdf does not have enough time to render all these PDFs at once, so it fails to render them properly leading to these half-rendered PDFs. Solution: This commit solves this issue by reducing the number of invoices that the cron processes at once from 20 to only 10 (the default of the function _cron_account_move_send). This would ensure that wkhtmltopdf has enough time to process and render a batch of invoices at once. opw-4997495 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a technical error that prevented shipping rate calculations when a customer partner lacked address information (country, state, and city). The fix ensures that the Envia Shipping module can now correctly process quotations even for partners with incomplete address details, improving the user experience.
Original PR description
Currently, an error is raised when trying to fetch the shipping rate if the partner does not have the required geolocation fields (country, state, and city). **Steps to Reproduce:** 1. Install and…
Currently, an error is raised when trying to fetch the shipping rate if the partner does not have the required geolocation fields (country, state, and city). **Steps to Reproduce:** 1. Install and configure the **Envia Shipping** module. 2. Create a partner without an address (only name + phone). 3. Create quotation for that partner with a deliverable product (e.g; Conference Chair). 4. Click "**Add Shipping**", choose _Envia Shipping_ Method, and then click "**Get Rate**". **Error:** `TypeError - quote_from_bytes() expected bytes` **Cause:** At [1], the system tries to compute Envia shipping rates based on the partner’s country, state, and city. If any of these fields are not set, an error is raised. **Fix:** This commit adds a check for the required fields (country, state, and city). If any are missing, `_geolocate_zip` returns False, leading to a proper validation error instead of a traceback. - [2] [1] - https://github.com/odoo/enterprise/blob/f1a02626a1fbe76add104832e151c647307f3ae7/delivery_envia/models/envia_request.py#L591-L593 [2] - https://github.com/odoo/enterprise/blob/f1a02626a1fbe76add104832e151c647307f3ae7/delivery_envia/models/envia_request.py#L617-L624 sentry-7063870478
This update fixes a potential issue where the system was incorrectly removing outdated sub-channels. The change ensures that the cleanup process only targets actual sub-channels, preventing unintended data modifications and maintaining channel organization. This improves the stability and reliability of the email and discussion features.
Original PR description
In [1], the `_gc_unpin_outdated_sub_channels` method was updated to avoid unpinning sub-channels multiple times. However, a condition is missing on `parent_channel_id` to restrict this gc to actual sub- channels. [1]: https://github.com/odoo/odoo/pull/238493 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 addresses a change in Facebook's data reporting, specifically regarding audience trends. Due to a rapid response needed, the team temporarily bypassed verification of 'unfollows' to quickly resolve the issue. Now, the system utilizes total page follows to accurately reflect audience changes, ensuring reliable Facebook integration data.
Original PR description
Bug === Facebook deprecated some of the endpoints related to statistics https://developers.facebook.com/docs/platforminsights/page/deprecated-metrics We fixed all metric except the audience trend,…
Bug === Facebook deprecated some of the endpoints related to statistics https://developers.facebook.com/docs/platforminsights/page/deprecated-metrics We fixed all metric except the audience trend, because we needed a fix rapidly, and we wasn't sure about unfollow. And indeed, `page_daily_follows` only count for positive value, unlike the old `page_fan_adds` / `page_fan_removes`, and there's no equivalent of `page_fan_removes`... Example of data for a month: ``` page_follows 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 page_daily_follows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 page_follows 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 page_daily_follows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ``` So we now use `page_follows`, so the total value at a given time, and we look for the newest and oldest value (note that if we could do the same for `page_post_engagements`, then we could just make 2 APIs calls for the year stat). Task-5353390 Forward-Port-Of: odoo/enterprise#100275
This update resolves a bug where the OCR process incorrectly assigned foreign currencies to expense reports, particularly when linked to products with standard prices. Now, users can correct the total amount after the OCR, and the system prevents the currency from being locked, ensuring accurate reimbursements. This improves the reliability of expense reporting.
Original PR description
Fixes a bug where the OCR would sometimes put a foreign currency on an expense with a product having a cost. Making it impossible to switch back to the company currency (because the currency cannot be changed). This also allows the user to change the total amount after the OCR pass, so it can be corrected if needed task-4873236 Forward-Port-Of: odoo/enterprise#89093
This update corrects a bug in the sale loyalty discount system. Previously, discounts weren't accurately calculating based on the quantity of each item, leading to incorrect discount amounts. The change ensures that the cheapest line is discounted correctly, aligning with discount limits and improving accuracy.
Original PR description
Discounts based on the cheapest line were not accounting for the quantity on the line and this was causing issues with the computations when using a maximum discount amount. Changing the discountable value to be a ratio of the quantity on the line allows the cheapest product to be discounted at the correct amount without messing with the discount factor. opw-4998557 Forward-Port-Of: odoo/odoo#222564
8 changes
Resolved issues and error corrections
This update fixes inaccuracies in the module description for the Danish localization (l10n_dk) within Odoo. The changes ensure accurate and clear information for users and stakeholders regarding the module's functionality. This improves the overall user experience and documentation.
Original PR description
There were some mistakes in the Danish part of the module description. This commit corrects those mistakes.
This update addresses a change in Facebook's data reporting, specifically regarding audience trends. Due to a rapid fix needed, the trend calculation wasn't fully verified, but the system now utilizes total page follows to account for potential unfollows, ensuring more accurate reporting. This improves the reliability of Facebook insights for our users.
Original PR description
Bug === Facebook deprecated some of the endpoints related to statistics https://developers.facebook.com/docs/platforminsights/page/deprecated-metrics We fixed all metric except the audience trend,…
Bug === Facebook deprecated some of the endpoints related to statistics https://developers.facebook.com/docs/platforminsights/page/deprecated-metrics We fixed all metric except the audience trend, because we needed a fix rapidly, and we wasn't sure about unfollow. And indeed, `page_daily_follows` only count for positive value, unlike the old `page_fan_adds` / `page_fan_removes`, and there's no equivalent of `page_fan_removes`... Example of data for a month: ``` page_follows 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 page_daily_follows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 page_follows 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 page_daily_follows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ``` So we now use `page_follows`, so the total value at a given time, and we look for the newest and oldest value (note that if we could do the same for `page_post_engagements`, then we could just make 2 APIs calls for the year stat). Task-5353390 Forward-Port-Of: odoo/enterprise#100275
This update corrects a bug where records in the `ir.model.data` table weren't properly removed when a model was unlinked. This prevented data inconsistencies and potential errors. The fix ensures data integrity by cleaning up related records, improving system stability.
Original PR description
When a model is unlinked, the `ir.model.data` related to that model wasn't cleaned up. This leaves dangling records that can generate issues. sentry-6938852090
This update ensures that users' presence status is consistently updated after they return from periods of inactivity. Previously, the system didn't always track these status changes, leading to inaccurate user presence information. This fix guarantees a more reliable and accurate representation of user availability.
Original PR description
Before this commit, the user's presence might not be updated after returning from inactivity. This occurs because the status service only sends an update if the user was away during the previous update. However, this condition doesn't account for cases where the update was never sent.
This update fixes a problem where blog post publication tests were unreliable due to inconsistent timing. By freezing time during key test steps, the tests now produce consistent results, ensuring accurate performance measurements. This improves the reliability of our blog performance metrics.
Original PR description
Some blog post are published with a post_date matching the time the test is run meaning that they are not considered published. We have multiple possibilities when _get_url_hot_query is called: - all call to /blog are executed before the publication date: 9 - some call to /blog are executed after the publication date: 11 - only the last call is executed after the publication date: ~40-50 Using freezetime after the publication date ensures a consistent result This can be easily reproduced by freezing the time on the first calls in _get_url_hot_query and not on the last one. Runbot error [55754](https://runbot.odoo.com/odoo/error/55754)
This update ensures that Luxembourg (`l10n_lu`) companies' general ledger reports correctly include vendor invoices in the required FAIA XML format. A recent change in FAIA reporting standards necessitates the addition of a 'PurchaseInvoices' tag, and this PR implements the necessary template to meet these requirements.
Original PR description
Since version 2.01 of FAIA, it is a requirement to include the `PurchaseInvoices` tag in the FAIA XML. With a `l10n_lu` company: - Create a vendor bill. - In the general ledger, download the FAIA XML report. In the generated XML document, the vendor bill will not appear under `PurchaseInvoices`. The `PurchaseInvoices` section is meant to mirror the `SalesInvoices` section and contains the exact same structure. This PR implements a generic template for both. **Specs and source** (in `FAIA_v2.01_full`): https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-5360572
This update adds a specific group to the teleworking field within the HR contract and employee records. This ensures accurate reporting of employee benefits for Swiss tax compliance (ELM transmission), addressing a previous reporting issue. The change improves the accuracy of payroll calculations for Swiss businesses using the Enterprise module.
This update resolves an issue where Odoo's demo data installation caused problems when used with databases that don't use US dollars. The fix ensures the demo data integrates correctly with various currency settings, improving compatibility across different company setups. The change is a minor correction to avoid a complex refactoring.
Original PR description
Currently in the `_merge_move_itemgetter` the system call `self.company_id.currency_id.decimal_places`. However the demo data of stock create a database with US currency and some `stock.move` in it. If we have an existing database with EUR for example. The upper call will return a `currency_id.decimal_places` since we have multiple currency. The best solution, would be to split `_action_confirm` to do a loop by company. But it would need a small refactoring and we will do a minimal diff to fix this issue. Using the smallest currency among all the company is not always correct but it's a super edge case and we should probably remove this code since it went to far. Close #230965, #234078