Daily updates from Odoo
Wednesday, January 14, 2026
400 changes
4 changes
Resolved issues and error corrections
This update resolves an issue where the Shopee API testing environment no longer works due to a recent change by Shopee. The update corrects the API path used in our testing, ensuring continued functionality for our Shopee integration. This ensures our testing remains aligned with Shopee's current system.
Original PR description
Shopee has changed the API path and the original testing API paths are no longer valid. Forward-Port-Of: odoo/enterprise#103939
This update corrects a bug where delivery fees weren't accurately calculated when sales orders and company currencies differed. The fix ensures that delivery fees are now correctly priced based on the sales order's currency, preventing discrepancies in pricing. This improves the reliability of delivery cost calculations.
Original PR description
Issue ----- When the SO and the company use different currencies, the picking currency is correctly set to the SO's but the amount is still computed using the company's currency. Example: Sale in…
Issue ----- When the SO and the company use different currencies, the picking currency is correctly set to the SO's but the amount is still computed using the company's currency. Example: Sale in EUR, Company in USD and 1.5 EUR = 1 USD rate. Sell for 15 EUR of products => the delivery picking shows 10 EUR Steps to reproduce ----- - Activate EUR currency at 1.5 EUR = 1 USD rate - Setup company in USD - Setup INTL FEDEX delivery method - Create a dummy product with a 10 USD sale price - Create a pricelist using the EUR currency - Create a sale for some INTL client - set pricelist to EUR - add dummy product - add INTL FEDEX shipping - confirm the sale - Confirm the linked delivery > Message in chatter shows a price of 10 EUR instead of 15 EUR Cause ----- The problem is with the `carrier_price` field of `stock.picking`. https://github.com/odoo/odoo/blob/7c443175f563b9b12a7b8f638524f7f625962dc2/addons/stock_delivery/models/stock_picking.py#L21 The value is set by https://github.com/odoo/odoo/blob/7c443175f563b9b12a7b8f638524f7f625962dc2/addons/stock_delivery/models/stock_picking.py#L155 which gets its' value from the response of https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/delivery_fedex.py#L157 We then go through https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L382 where we call https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L484 The problem is that in `_decode_pricing` we take the first line matching the `rateType` with no regard to the currency of the rate https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L594-L598 we should also filter to ensure the rate matches the order's specified currency. ----- Ticket: opw-5419724 Forward-Port-Of: odoo/enterprise#103737 Forward-Port-Of: odoo/enterprise#103232
This update ensures that loyalty programs with pricelist restrictions are properly considered when a customer makes a purchase in the POS. Previously, the system would incorrectly apply loyalty programs even if the customer's purchase didn't match the program's pricing rules. This fix corrects a bug related to pricelist availability and ensures accurate loyalty program application.
Original PR description
Before this commit, if a loyalty program had pricelist restrictions, the POS would not consider them when loading the applicable loyalty programs. This could lead to scenarios where a loyalty program was applied in a POS session even if the session's pricelist was not allowed by the program. This happened when the pricelist was also not available in the POS configuration and program.pricelist_ids was empty. opw-5467990 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242279
This update resolves a problem where clients were incorrectly using outdated number ranges when syncing data with DIAN. The fix ensures that the latest available number range is always used, preventing invoice errors and improving data accuracy. This impacts invoice processing with Colombian DIAN regulations.
Original PR description
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE**…
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE** According to the DIAN documentation, the GetNumberRange service is only available in the production environment. So i'm not sure if we can safely test this. The repro steps would be something like: 1. Request a range. 2. Exhaust all number from this range by sending invoices to DIAN. 3. Request a new range. 4. sync with DIAN. (notice the range selected is still the old one). 5. Try sending a new invoice to DIAN and notice there is an error. **CAUSE** In `l10n_co_dian/models/account_journal.py` the function `_l10n_co_dian_get_journal_values()` loops on all the xml `NumberRangeResponse` node and store the last range values encountered for each prefix. We don't check if the this last range is still valid, if it's the newest created (could be checked with the xml field `ResolutionDate`, but the date could be the same if the range were created the same day), if it's the latest in term of number range (DIAN start with range 1-100, then 101-something etc.). Forward-Port-Of: odoo/enterprise#103943
10 changes
Resolved issues and error corrections
This update fixes several issues within the o_spreadsheet component, ensuring it's aligned with the latest version of Odoo 18.4. The changes improve the spreadsheet's performance and functionality, particularly related to calculations and data selection. This ensures a stable and reliable spreadsheet experience for users.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/0364f563a [REL] 18.4.24 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/0364f563a [REL] 18.4.24 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/b456055e0 [FIX] Pivots: Recompute measure on indirect dependency update [Task: 5349782](https://www.odoo.com/odoo/2328/tasks/5349782) https://github.com/odoo/o-spreadsheet/commit/cfc56f825 [FIX] demo: add import osheet [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/060d8d456 [FIX] f&r: the searched range should follow the active sheet [Task: 5423885](https://www.odoo.com/odoo/2328/tasks/5423885) https://github.com/odoo/o-spreadsheet/commit/efe0d5b6f [FIX] Composer: Capture the correct selection on `F2` [Task: 5462713](https://www.odoo.com/odoo/2328/tasks/5462713) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes a scheduling issue in the autovacuum cron job that was causing delays in database maintenance. The change ensures the cron job correctly reports partial progress, allowing for timely rescheduling. This improves the efficiency and reliability of database upkeep.
Original PR description
**NOTE** the problem regarding the auto-vacuum was fixed in 18.3 and above (including master) at https://github.com/odoo/odoo/pull/216483, this PR now solely exists for branlette intellectuelle. Have…
**NOTE** the problem regarding the auto-vacuum was fixed in 18.3 and above (including master) at https://github.com/odoo/odoo/pull/216483, this PR now solely exists for branlette intellectuelle. Have a ir cron action with the following code: time.sleep(MIN_TIME_PER_JOB) self.env['ir.cron']._commit_progress(remaining=1) return The code looks stupid, but we tracked down a bug we had in the autovacuum cron in 18.3, and the minimum code to reproduce the problem is that above line of code. Since there are remaining stuff to do, the cron worker should report a `PARTIALLY_DONE` status, and reschedule to call the cron action asap. But the system currently determine a `FULLY_DONE` status and reschedule the cron action *later* (next day for a cron with an interval of 1 day). It is pretty bad for the autovacuum cron in 18.3 We used the opportunity to rework the `status` computation to one big match-case, for extra readability. 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 a problem where clients were incorrectly using outdated number ranges when syncing data with DIAN. The fix ensures that the latest, valid number range provided by DIAN is always used, preventing invoice errors and improving data accuracy. This impacts invoice processing with Colombian DIAN regulations.
Original PR description
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE**…
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE** According to the DIAN documentation, the GetNumberRange service is only available in the production environment. So i'm not sure if we can safely test this. The repro steps would be something like: 1. Request a range. 2. Exhaust all number from this range by sending invoices to DIAN. 3. Request a new range. 4. sync with DIAN. (notice the range selected is still the old one). 5. Try sending a new invoice to DIAN and notice there is an error. **CAUSE** In `l10n_co_dian/models/account_journal.py` the function `_l10n_co_dian_get_journal_values()` loops on all the xml `NumberRangeResponse` node and store the last range values encountered for each prefix. We don't check if the this last range is still valid, if it's the newest created (could be checked with the xml field `ResolutionDate`, but the date could be the same if the range were created the same day), if it's the latest in term of number range (DIAN start with range 1-100, then 101-something etc.). Forward-Port-Of: odoo/enterprise#103943
This update corrects a minor issue in the demo data for the recruitment module. Previously, the system was incorrectly referencing user records instead of partner records, which caused problems with the demo data. This fix ensures the demo data accurately reflects the expected data structure, improving the usability of the demo.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data. Forward-Port-Of: odoo/odoo#241260
This update resolves an issue where users could incorrectly modify attendance records for employees they didn't manage. The change ensures that unauthorized updates are blocked, preventing data inconsistencies and maintaining accurate attendance tracking. Test coverage has been added to guarantee this fix.
Original PR description
Closes [odoo/odoo#226007](https://github.com/odoo/odoo/issues/226007). Description of the issue/feature this PR addresses: Prevents a user from updating their attendance record by changing the employee to the one whose attendance is not managed by the current user. Current behavior before PR: - Assign the Officer Group of Attendance group to a user. - Assign the user as the attendance manager of itself. - Login with that user. - Create an attendance record for the employee and save it. - Try to change the employee and save; an error will be thrown as expected. - Go to the Attendance menu; the record will still be saved. Desired behavior after PR is merged: This commit ensures that un-allowed write does not take place + test coverage added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243573 Forward-Port-Of: odoo/odoo#226335
This update corrects a bug that occurred when a leave request was linked to a refused allocation and the system's automated cleanup process ran. Specifically, an error was triggered due to an empty data structure, preventing the system from correctly processing leave requests. This fix ensures the system handles refused allocations without causing errors.
Original PR description
When a leave is linked to a refused allocation and the cron ``Time Off: Cancel invalid leaves`` runs, a traceback occurs. Steps to reproduce the error: - Install ``hr_holidays`` without demo data -…
When a leave is linked to a refused allocation and
the cron ``Time Off: Cancel invalid leaves`` runs, a traceback occurs.
Steps to reproduce the error:
- Install ``hr_holidays`` without demo data
- Create a new Time Off Type > Time Off Requests, Approval: No Validation >
Allow Negative Cap: True > Maximum Excess Amount: 2
- Create an Accrual Plan using default values
- Create a New Allocation
- Allocation Type: Accrual Allocation
- Set the Time Off Type and Accrual Plan created above
- Allocation: 1 day > Approve
- Create a new Time Off in the near future (in the current month) and select the Time Off Type created above
- Go back to the Allocation > Refuse
- Run the cron ``Time Off: Cancel invalid leaves``
Traceback:
``IndexError: list index out of range``
https://github.com/odoo/odoo/blob/bc5f24195a486112574900015ecbcf0e3ba32145/addons/hr_holidays/models/hr_leave.py#L1535-L1536
Here, ``leave_type_data`` becomes ``defaultdict(<class 'list'>, {})``
because when the allocation is refused and the cron runs,
the ``get_allocation_data`` method returns an empty defaultdict.
As a result, accessing the index leads to the above traceback.
sentry-6874651972
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#243505
Forward-Port-Of: odoo/odoo#227201This update corrects a bug where menu entries were incorrectly linked to the last created page, even when multiple pages with the same name were created. Now, menu entries are only updated when a new page is created, ensuring accurate page linking and a consistent user experience. This prevents confusion and ensures correct navigation.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update corrects a potential issue with how payroll data is locked for tax reporting in Switzerland (ELM transmission). By using a reference date, the system now accurately reflects the period for which data is secured, ensuring compliance and reliable reporting. This change enhances the accuracy of Swiss tax filings.
Original PR description
Forward-Port-Of: odoo/enterprise#104269
A recent update to Odoo's website functionality caused a test to fail intermittently. This fix ensures that snippets dropped during a tour are properly removed from popups, preventing errors and improving the stability of the tour experience. This was triggered by a performance optimization introduced in a previous release.
Original PR description
**Problem** Before this commit, the tour `test_03_snippets_all_drag_and_drop` could fail with the error `Element (:iframe .o_snippet_preview_wrap[data-snippet-id="s_popup"]) has not been found`. The…
**Problem** Before this commit, the tour `test_03_snippets_all_drag_and_drop` could fail with the error `Element (:iframe .o_snippet_preview_wrap[data-snippet-id="s_popup"]) has not been found`. The failure was reproducible locally and appeared non-deterministically on runbot. **Cause** The tour steps could occasionally execute too quickly, leading to non-determinist behavior where snippets were dropped inside a popup that had been inserted but not yet closed. When the dropzone is inside an open popup, some snippets (e.g. `s_popup`) are excluded from the Snippet Viewer, resulting in the error reported above. **Solution** The tour flow is modified such that popup snippets are removed after being dropped, as already happens for every other snippet category. This completely removes the risk that new snippets are dropped into a popup. **Note** This bug was already fixed starting from version 19.0 by [1]. The performance boost indroduced by [2] made the same bug appear also on 18.4, thus the need for this commit. [1]: https://github.com/odoo/odoo/pull/242231 [2]: https://github.com/odoo/odoo/pull/243102 runbot-233328
This update fixes an issue where follower list menus displayed avatars with incorrect aspect ratios, particularly for non-square images. The change utilizes a standard Odoo class for avatars to ensure consistent and proper image scaling, improving the visual appearance of follower lists. This ensures all user avatars look their best.
Original PR description
Before this commit, follower list menu had avatar that do not preserve ratio of avatars. This is noticeable for avatars that have ratio quite different from 1:1, like 3:2 or 2:3 or even less squarish. This happens because of missing `.o_object_fit_cover`, that [1] erroneously removed from REF of follower template part into its own component. This commit uses an equivalent but more official solution: `.o_avatar`, which is a classname dedicated for avatars, which has `.o_object_fit_cover` property. Task-5412078 Before / After <img width="638" height="526" alt="Screenshot 2026-01-12 at 17 23 54" src="https://github.com/user-attachments/assets/b8d3a921-52a8-48b7-a0d0-5fbfdd33a92c" /> <img width="640" height="528" alt="Screenshot 2026-01-12 at 17 23 33" src="https://github.com/user-attachments/assets/8070420c-f341-4085-bcb2-2fba060765f0" /> [1]: https://github.com/odoo/odoo/pull/200382 Forward-Port-Of: odoo/odoo#243328
9 changes
Enhancements to existing features
This update adds a 'Reload Data' button to error dialogs in the Point of Sale system, providing users with a simple way to resolve common issues. Previously, users only had an 'Ok' button, making it difficult to recover from errors. This change reduces downtime and improves the overall user experience for POS operations, particularly for Restaurant orders.
Original PR description
Purpose: ------------ - On Error dialogs, users only had "Ok" or could close the dialog, with no guidance on what to do next. - Many blocking issues are resolved simply by reloading POS data. Before this commit: ----------- - Error dialogs only had an "Ok" button. After this commit: ------------------ - Added a "Reload Data" button for quick recovery of common blocking issues. - Added a warning message in the reload data popup - For POS Restaurant, orders will attempt to sync before reloading data, reducing the risk of data loss. Task-5353590
Resolved issues and error corrections
This update fixes several issues within the o_spreadsheet component, ensuring it's running the latest version (18.3.32). These fixes improve the functionality and stability of the spreadsheet feature, particularly related to calculations and data selection within the application.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/8d1d32160 [REL] 18.3.32 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/8d1d32160 [REL] 18.3.32 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/3d2d2e6da [FIX] Pivots: Recompute measure on indirect dependency update [Task: 5349782](https://www.odoo.com/odoo/2328/tasks/5349782) https://github.com/odoo/o-spreadsheet/commit/de60a1cd2 [FIX] demo: add import osheet [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/61bbf4ce1 [FIX] f&r: the searched range should follow the active sheet [Task: 5423885](https://www.odoo.com/odoo/2328/tasks/5423885) https://github.com/odoo/o-spreadsheet/commit/42d525737 [FIX] Composer: Capture the correct selection on `F2` [Task: 5462713](https://www.odoo.com/odoo/2328/tasks/5462713) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes an issue where website menu entries incorrectly pointed to the last created page when multiple pages with the same name were created. The change ensures menu entries are only updated with the correct page ID upon initial page creation, preventing confusion and ensuring accurate page linking across the website.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update corrects a potential issue in the transmission of Swiss payroll data (ELM) by ensuring the correct reference date is used when locking payroll periods. This improves the accuracy of data sent to tax authorities, reducing the risk of errors and potential delays in processing. The change is a technical fix focused on data integrity.
Original PR description
Forward-Port-Of: odoo/enterprise#104269
This update resolves an issue where the original invoice linked to a reversed transaction was not being displayed correctly. Previously, when reversing an invoice, the 'Source Document' field in the invoice list view would be blank. This fix ensures that the correct original invoice is always linked, improving reporting accuracy and traceability of financial transactions. This was a regression identified and corrected in the Odoo system.
Original PR description
### Issue: Reverse moves miss `invoice_origin` field. #### To reproduce: 1- Create a SO. 2- Create an invoice and confirm. 3- In invoice list view make the `Source Document` visible. 4- Create a credit note and reverse the move. From invoice list view, you can observe that `Source Document` is empty for reverse move. ### Cause: This is a regression introduced by #236656. opw-5362055 Forward-Port-Of: odoo/odoo#240439
This update resolves an issue where manually changed currency rates on invoices weren't correctly applied, leading to data loss. Now, the system only updates rates and invoice lines if the user has manually adjusted the rate, ensuring accurate calculations and preserving user input. This improves invoice accuracy and reliability.
Original PR description
in case the user would enter manually a different rate than the default one, but does not fill the invoice date; odoo was setting today as the invoice date, which was changing the rate and recomputing all the lines... Effectively losing everything the user just encoded. So now, we only recompute the rate and the lines if the user didn't change it. Fix: https://github.com/odoo/odoo/pull/226124/changes/1b48d141d7260a262075555c4ab9cedc691d3551 Issue with Fix: Invoices posted on dates different from their creation date do not update their currency rates, even though they should. Comparing `invoice_currency_rate` to the expected rate at creation is a better guess. task-5477481 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243126 Forward-Port-Of: odoo/odoo#242800
This update enhances the HTML editor's functionality by resolving issues with nested selections and cursor synchronization. The change introduces a more robust system for managing cursor states, ensuring accurate updates across different editor contexts and preventing data inconsistencies. This improves the overall stability and reliability of the HTML editor.
Original PR description
Summary: Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate…
Summary:
Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate independently while keeping cursor updates synchronized across active contexts.
Problem:
Using a single stored cursor caused issues in nested calls to `preserveSelection()`:
1. **State overwrite:** Inner calls could overwrite or clear the outer cursor.
2. **Stale references:** If an inner function replaced a DOM node, the outer cursor could still point to a removed node and fail on restore.
Solution:
Use an array of cursor subscribers
- **Shared updates:** When calling `remapNode` on a cursor, it iterates over all active subscribers in the stack. This ensures node replacements performed in inner contexts also update outer cursor references.
- **Scoped cleanup:** `restore()` now removes only the corresponding cursor instance from the stack, ensuring proper lifecycle management.
Example:
The key improvement is that outer scopes receive updates performed by inner scopes.
```javascript
// Function A (outer)
function wrapperFunction() {
const cursor = this.preserveSelection();
replaceTextWithSpan();
cursor.restore();
}
// Function B (inner)
function replaceTextWithSpan() {
const innerCursor = this.preserveSelection();
const oldNode = document.querySelector('text');
const newNode = document.createElement('span');
oldNode.replaceWith(newNode);
innerCursor.remapNode(oldNode, newNode);
innerCursor.restore();
}
```
opw-5386862
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#238989This update fixes a potential issue where applicants could re-sign previously completed job offers, leading to incorrect offer statuses. The change blocks access to these fully signed offers, ensuring data integrity and preventing users from unintentionally modifying offer details. This improves the reliability of the applicant workflow.
Original PR description
This commit improves the offer validation logic to avoid invalid or unintended signature attempts. Fixes included: - Block access to offers that are already fully signed, preventing applicants from reopening the link and unintentionally reverting the offer to a partially signed state. These changes ensure that expired or fully processed offers no longer expose active signature links and that offer validity is consistently enforced at the database level. task-5405456 Forward-Port-Of: odoo/enterprise#103527 Forward-Port-Of: odoo/enterprise#101834
This update resolves a technical issue preventing the correct saving of order details related to Swedish point-of-sale systems. The fix ensures that crucial data is properly recorded, improving the reliability of order information. It also includes updates for compatibility with new IoT box images.
Original PR description
In commit 807420a, the `pos.order` fields in `pos_l10n_se` were renamed to add `sweden_` at the start. However, these fields were not renamed in the JS code. The result is that the fields were not being saved to the DB. This commit fixes the issue by renaming the fields in the frontend. It also adds some fixes to ensure compatibility with the newest IoT box image. opw-5253585 Forward-Port-Of: odoo/enterprise#104218 Forward-Port-Of: odoo/enterprise#104180
9 changes
Resolved issues and error corrections
This update fixes an issue where loyalty programs with pricelist restrictions weren't properly considered during POS transactions. Previously, if a POS session's pricelist didn't match a loyalty program's restrictions, the loyalty program would still be applied. Now, the system correctly checks pricelist compatibility, ensuring loyalty programs are only applied when the session's pricing aligns with the program's rules.
Original PR description
Before this commit, if a loyalty program had pricelist restrictions, the POS would not consider them when loading the applicable loyalty programs. This could lead to scenarios where a loyalty program was applied in a POS session even if the session's pricelist was not allowed by the program. This happened when the pricelist was also not available in the POS configuration and program.pricelist_ids was empty. opw-5467990 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242279
This update fixes an issue where the system was incorrectly using outdated number ranges when syncing data with DIAN. Previously, the system didn't properly check for the latest available ranges, leading to errors when clients requested new ranges. This ensures accurate DIAN data synchronization for our Colombian clients.
Original PR description
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE**…
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE** According to the DIAN documentation, the GetNumberRange service is only available in the production environment. So i'm not sure if we can safely test this. The repro steps would be something like: 1. Request a range. 2. Exhaust all number from this range by sending invoices to DIAN. 3. Request a new range. 4. sync with DIAN. (notice the range selected is still the old one). 5. Try sending a new invoice to DIAN and notice there is an error. **CAUSE** In `l10n_co_dian/models/account_journal.py` the function `_l10n_co_dian_get_journal_values()` loops on all the xml `NumberRangeResponse` node and store the last range values encountered for each prefix. We don't check if the this last range is still valid, if it's the newest created (could be checked with the xml field `ResolutionDate`, but the date could be the same if the range were created the same day), if it's the latest in term of number range (DIAN start with range 1-100, then 101-something etc.). Forward-Port-Of: odoo/enterprise#103943
This update resolves an issue where group channels (DMs with fewer than 3 members) were displaying incorrect information, such as a 'back on' banner and an IM status. The fix prevents the system from incorrectly identifying these channels, resulting in a more accurate and consistent user experience.
Original PR description
Before this commit, the "correspondent" property of Thread would be computed for channels of type group (group DMs) having less than 3 members. This would lead to various confusing behaviours, including: 1. The "back on" banner being shown. 2. The chat bubble showing an IM status. 3. The notification item not showing the message author's name. This commit fixes the issues by not computing `correspondent` for channels of type group. task-5462395 Forward-Port-Of: odoo/odoo#242058
This update resolves a technical issue where demo data for the recruitment module was incorrectly referencing user records instead of partner records. This fix ensures the demo data accurately reflects the expected data structure, improving the usability and reliability of the recruitment demo.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data. Forward-Port-Of: odoo/odoo#241260
This update resolves an issue where users could incorrectly save attendance records after attempting to change the associated employee. The fix ensures that only authorized users can update attendance records, improving data integrity and preventing potential errors. Test coverage has been added to confirm this change.
Original PR description
Closes [odoo/odoo#226007](https://github.com/odoo/odoo/issues/226007). Description of the issue/feature this PR addresses: Prevents a user from updating their attendance record by changing the employee to the one whose attendance is not managed by the current user. Current behavior before PR: - Assign the Officer Group of Attendance group to a user. - Assign the user as the attendance manager of itself. - Login with that user. - Create an attendance record for the employee and save it. - Try to change the employee and save; an error will be thrown as expected. - Go to the Attendance menu; the record will still be saved. Desired behavior after PR is merged: This commit ensures that un-allowed write does not take place + test coverage added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243573 Forward-Port-Of: odoo/odoo#226335
This pull request updates the core spreadsheet component within Odoo. It addresses several minor bugs and improves performance related to calculations and sheet selection, ensuring a smoother user experience. This update was made by a team of developers to maintain the stability and functionality of the spreadsheet feature.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/755a787c4 [REL] 18.2.40 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/755a787c4 [REL] 18.2.40 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/2322bd78f [FIX] Pivots: Recompute measure on indirect dependency update [Task: 5349782](https://www.odoo.com/odoo/2328/tasks/5349782) https://github.com/odoo/o-spreadsheet/commit/2783ff635 [FIX] demo: add import osheet [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/673dd2ee7 [FIX] f&r: the searched range should follow the active sheet [Task: 5423885](https://www.odoo.com/odoo/2328/tasks/5423885) https://github.com/odoo/o-spreadsheet/commit/ef7b40f5c [FIX] Composer: Capture the correct selection on `F2` [Task: 5462713](https://www.odoo.com/odoo/2328/tasks/5462713) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes an issue where menu entries were incorrectly updating across multiple pages with the same name. Now, menu entries are only updated when a new page is created, preventing confusion and ensuring accurate page linking. This improves the consistency of the website navigation.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update corrects a potential issue with the transmission of Swiss payroll data (ELM) by ensuring the correct reference date is used when locking payroll periods. This improves the accuracy of data sent to tax authorities, reducing the risk of errors and potential delays in processing. The change is a technical fix focused on data integrity.
Original PR description
Forward-Port-Of: odoo/enterprise#104269
This update resolves an issue where the 'Source Document' field was missing when reversing invoices. This meant critical information about the original invoice wasn't accurately reflected in the reversed transaction. The fix ensures that the 'Source Document' field correctly displays the original invoice details during reverse moves, improving data accuracy and reporting.
Original PR description
### Issue: Reverse moves miss `invoice_origin` field. #### To reproduce: 1- Create a SO. 2- Create an invoice and confirm. 3- In invoice list view make the `Source Document` visible. 4- Create a credit note and reverse the move. From invoice list view, you can observe that `Source Document` is empty for reverse move. ### Cause: This is a regression introduced by #236656. opw-5362055 Forward-Port-Of: odoo/odoo#240439
43 changes
New functionality added to Odoo
This update adds support for Xendit's new payment channels in Thailand, Malaysia, and Vietnam. This expansion allows our business to accept payments through these local payment methods, broadening our reach and improving customer convenience.
Original PR description
Xendit has expanded to TH, MY and VN supporting the local payment channels. This commit is to add the supported pamyent channels according to what they have added. task-4334511 Forward-Port-Of: odoo/odoo#243430 Forward-Port-Of: odoo/odoo#189527
This update adds a new service within Odoo that can decode EPC (Electronic Product Code) barcodes. It allows the system to translate these barcodes into their corresponding URIs or Element Strings, improving the ability to identify and track products. The decoder supports common EPC formats like SGTIN and SSCC, enhancing data capture and integration.
Original PR description
Add an EPC decoder as a front-end service. The decoder takes an EPC as a hexadecimal input and return the resulting URI or Element String. On incorrect input or unsupported decoding, the returned value is null. Currently support SGTIN-96, SGTIN-198, SSCC-96, SGLN-96, SGLN-195. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This pull request introduces support for GS1 EPC codes, a standard for identifying products using RFID tags. The changes include the necessary data structures and logic to encode and decode these codes, enabling better tracking and inventory management. The work is currently focused on testing and refining the encoding process, with future development planned for automation.
Original PR description
# Current State Overview <details><summary>$${\color{red}Deferred}$$ Backend/Python</summary> <p> Deferred: decoding doesn't make sense in the backend, and manufacturing isn't ready for EPC write…
# Current State Overview
<details><summary>$${\color{red}Deferred}$$ Backend/Python</summary>
<p>
Deferred: decoding doesn't make sense in the backend, and manufacturing isn't ready for EPC write automation, such that encoding isn't a priority.
Encode & Decode :
- sgtin-96
- sgtin-198
- sscc-96
- sgln-96
- sgln-195
TODO :
- Replace compute by explicit calls : more efficient and less complicated
- Implement logical segment bit count at scheme template level
Simple test :
```
# model: Electronic Product Code Scheme, gs1.epc.scheme
vals = [
#SGTIN
{'uri_tag': "urn:epc:tag:sgtin-96:3.0614141.812345.6789"},
{'raw_value': 0X3074257bf7194e4000001a85},
{'uri_tag': "urn:epc:tag:sgtin-198:3.0614141.812345.6789"},
{'raw_value': 0X3674257bf7194e5b3770e4000000000000000000000000000000},
{'uri_tag': "urn:epc:tag:sgtin-198:3.0614141.712345.32a%2Fb"},
{'raw_value': 0X3674257bf6b7a659b2c2bf100000000000000000000000000000},
#Others
{'uri_tag': "urn:epc:tag:sscc-96:3.0614141.1234567890"},
{'raw_value': 0X3174257bf4499602d2000000},
{'uri_tag': "urn:epc:tag:sgln-96:3.0614141.12345.5678"},
{'raw_value': 0X3274257bf46072000000162e},
{'uri_tag': "urn:epc:tag:sgln-195:3.0614141.12345.32a%2Fb"},
{'raw_value': 0X3974257bf46072cd9615f8800000000000000000000000000000},
]
schemes = model.create(vals)
message = []
for scheme in schemes:
message.append(f"Uri : {scheme.uri_tag}\nHex : {scheme.hex_value}\n") # Bit : {scheme.raw_value:b}\n
log('\n'.join(message))
```
Result :
```
Uri : urn:epc:tag:sgtin-96:3.0614141.812345.6789
Hex : 3074257bf7194e4000001a85
Uri : urn:epc:tag:sgtin-96:3.0614141.812345.6789
Hex : 3074257bf7194e4000001a85
Uri : urn:epc:tag:sgtin-198:3.0614141.812345.6789
Hex : 3674257bf7194e5b3770e4000000000000000000000000000000
Uri : urn:epc:tag:sgtin-198:3.0614141.812345.6789
Hex : 3674257bf7194e5b3770e4000000000000000000000000000000
Uri : urn:epc:tag:sgtin-198:3.0614141.712345.32a%2Fb
Hex : 3674257bf6b7a659b2c2bf100000000000000000000000000000
Uri : urn:epc:tag:sgtin-198:3.0614141.712345.32a%2Fb
Hex : 3674257bf6b7a659b2c2bf100000000000000000000000000000
Uri : urn:epc:tag:sscc-96:3.0614141.1234567890
Hex : 3174257bf4499602d2000000
Uri : urn:epc:tag:sscc-96:3.0614141.1234567890
Hex : 3174257bf4499602d2000000
Uri : urn:epc:tag:sgln-96:3.0614141.12345.5678
Hex : 3274257bf46072000000162e
Uri : urn:epc:tag:sgln-96:3.0614141.12345.5678
Hex : 3274257bf46072000000162e
Uri : urn:epc:tag:sgln-195:3.0614141.12345.32a%2Fb
Hex : 3974257bf46072cd9615f8800000000000000000000000000000
Uri : urn:epc:tag:sgln-195:3.0614141.12345.32a%2Fb
Hex : 3974257bf46072cd9615f8800000000000000000000000000000
```
</p>
</details>
<details><summary>$${\color{orange}In \space Progress}$$ Frontend/Javascript</summary>
<p>
Decode Only :
- sgtin-96
</p>
</details>
To compare and test :
- https://www.gs1.org/services/epc-encoderdecoder
- TDS 2.1, part E.3 (https://ref.gs1.org/standards/tds/2.1.0/, p.242)
[Task #4256189](https://www.odoo.com/odoo/project.task/4256189)Enhancements to existing features
This update enhances the offline experience by visually disabling unavailable menus, view switchers, and records within kanban and list views. The system now intelligently uses IndexedDB to track visited items, ensuring a more responsive and user-friendly offline experience. This prepares for a future offline search bar feature.
Original PR description
With this commit, when being offline, menus, view switchers and records (in kanban and list views) that aren't available are disabled (i.e. displayed with opacity and not-allowed cursor). Those disabled elements are still clickable though, but it's highly unlikely that clicking on them would lead to anything but an empty screen (due to the lack of connection). All such items aren't disabled though: we store in indexeddb the list of visited items (actions, view types, records), s.t. we know what is available in cache, and what is then accessible offline. This commit also prepares the ground for the next task, which is to have an offline search bar, allowing to select among previously enabled filters, in kanban and list views. Task~5424765
This update improves the Odoo Enterprise application's performance when operating offline. Specifically, the home menu now intelligently disables unavailable menus, preventing users from attempting to access features that aren't supported in offline mode. This enhances the user experience and reduces potential errors.
Original PR description
This commit is the counterpart of https://github.com/odoo/odoo/pull/242494. When being offline, we disable menus that aren't available offline in the home menu. Task~5424765
This commit updates the o_spreadsheet component with new styling options for pivot tables, enhancing their visual appearance and functionality. The changes allow for more flexible and dynamic styling of pivot tables directly within formulas, improving the user experience for data analysis. This improves the presentation and usability of pivot tables.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/e5cbf1807 [REL] 19.2.0-alpha.3 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits:
https://github.com/odoo/o-spreadsheet/commit/e5cbf1807 [REL] 19.2.0-alpha.3 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)
https://github.com/odoo/o-spreadsheet/commit/c206f46b4 [FIX] Pivots: Recompute measure on indirect dependency update [Task: 5349782](https://www.odoo.com/odoo/2328/tasks/5349782)
https://github.com/odoo/o-spreadsheet/commit/c1c00f4d9 [IMP] pivots: implement pivot table styles [Task: 4552232](https://www.odoo.com/odoo/2328/tasks/4552232)
https://github.com/odoo/o-spreadsheet/commit/fcdef4757 [IMP] renderer: draw cell background over grid lines [Task: 4552232](https://www.odoo.com/odoo/2328/tasks/4552232)
https://github.com/odoo/o-spreadsheet/commit/a865dbf2c [IMP] style: add `skipCellGridLines` style option [Task: 4552232](https://www.odoo.com/odoo/2328/tasks/4552232)
https://github.com/odoo/o-spreadsheet/commit/86856abfd [REF] table style: add `bold` to table style presets [Task: 4552232](https://www.odoo.com/odoo/2328/tasks/4552232)
https://github.com/odoo/o-spreadsheet/commit/351919f8f [REF] subtotal: extract SUBTOTAL tracking to generic plugin [Task: 4552232](https://www.odoo.com/odoo/2328/tasks/4552232)
https://github.com/odoo/o-spreadsheet/commit/4dee81dbe [IMP] Added some shortcuts [Task: 5231802](https://www.odoo.com/odoo/2328/tasks/5231802)
https://github.com/odoo/o-spreadsheet/commit/c7180d1f7 [FIX] tests: fix useless shortcuts tests [](https://www.odoo.com/odoo/2328/tasks/)
https://github.com/odoo/o-spreadsheet/commit/a30272f1f [IMP] Autocompletion of curly brackets {} [](https://www.odoo.com/odoo/2328/tasks/)
https://github.com/odoo/o-spreadsheet/commit/21e3d6155 [FIX] f&r: the searched range should follow the active sheet [Task: 5423885](https://www.odoo.com/odoo/2328/tasks/5423885)
https://github.com/odoo/o-spreadsheet/commit/20ee28aac [IMP] figure: add data-type attribute to figure carousel tabs [Task: 5447027](https://www.odoo.com/odoo/2328/tasks/5447027)
https://github.com/odoo/o-spreadsheet/commit/abb24152c [FIX] Style: UPDATE_CELL overwrites the cell style [Task: 5441149](https://www.odoo.com/odoo/2328/tasks/5441149)
https://github.com/odoo/o-spreadsheet/commit/a4792e26f [FIX] tests: fix network serialization in mock [Task: 5441149](https://www.odoo.com/odoo/2328/tasks/5441149)
https://github.com/odoo/o-spreadsheet/commit/ea607f07d [IMP] formulas: add spilled range operator [Task: 5365642](https://www.odoo.com/odoo/2328/tasks/5365642)
https://github.com/odoo/o-spreadsheet/commit/3b6e45921 [IMP] style: check if default but faster [Task: 5431688](https://www.odoo.com/odoo/2328/tasks/5431688)
https://github.com/odoo/o-spreadsheet/commit/abeea3e5d [FIX] Composer: Capture the correct selection on `F2` [Task: 5462713](https://www.odoo.com/odoo/2328/tasks/5462713)
https://github.com/odoo/o-spreadsheet/commit/7c556a916 [REF] lint: enforce braces for all control statements [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)
Co-authored-by: Florian Damhaut (flda) <flda@odoo.com>
Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com>
Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com>
Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com>
Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com>
Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com>
Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com>
Co-authored-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com>
Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>This update simplifies pivot table styling within the Odoo Enterprise spreadsheet tool. Users no longer need to manually create tables to apply styles; new styles are directly linked to the pivot, offering greater flexibility and control over formatting and presentation.
Original PR description
With this commit, we don't need to manually create a dynamic table to a pivot to have a style applied. Instead we can add a style in the pivot definition, and dynamic tables will automatically be created on the dynamic pivot formulas. Those new pivot styles are better than traditional tables styles because: - they are directly linked to the pivot, taking into account the number of headers, the presence of totals, etc. - they are automatically added on `=PIVOT()` formulas, without the need to create a dynamic table first. - they are more powerful than the old table styles, they can have a style for the sub-headers, the measure headers, etc. Task: 4552232
This update reflects a recent change in the daily UMA (Wage Contribution) value mandated by INEGI for Mexico, effective February 1st, 2026. The new value of 117.31 MXN has been incorporated into the payroll calculations for Mexican employees, ensuring compliance with current regulations. This change impacts payroll processing for the 19.0 release.
Original PR description
As per the INEGI press release (published on January 8, 2026), the daily UMA value has been updated for 2026. New value: 117.31 MXN Effective date: February 1st, 2026. This commit adds this new parameter value to "Mexico: Daily UMA". Reference: https://www.inegi.org.mx/app/saladeprensa/noticia/10533 target: 19.0 task-5488243 Forward-Port-Of: odoo/enterprise#104064
Resolved issues and error corrections
This update resolves an error that occurred when users attempted to search for employees without the 'hr_payroll' module installed. The issue stemmed from a reference to a field within the 'hr_payroll' module in the employee search filters. This fix ensures a smoother experience for all users.
Original PR description
Bug: Searching for Employees without hr_payroll installed causes an error Cause: a field from hr_payroll was referenced in hr views filter Task-5487616 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where searching for employees would generate an error if the hr_payroll module was not installed. The fix addressed a reference to a field within the hr_payroll module in the employee search views, ensuring compatibility and preventing errors for users without the payroll module.
Original PR description
Bug: Searching for Employees without hr_payroll installed causes an error Cause: a field from hr_payroll was referenced in hr views filter Task-5487616
This update resolves a critical issue preventing the Odoo IoT box from starting correctly. The addition of the 'geoip2' dependency ensures Odoo can function properly on the IoT environment, addressing a startup failure. This ensures the IoT box is operational.
Original PR description
This PR adds geoip2 to packages required by the iot box in saas-19.2. Without geoip2 odoo doesn't start on the iot box
This update fixes an issue where the payment register defaulted to the company bank account instead of the employee's bank account when processing reimbursements. The change re-enabled prioritization of the employee's account, ensuring accurate reimbursement processing. This improves the efficiency and accuracy of employee expense payments.
Original PR description
**Steps to reproduce:** * Create an **employee** with a bank account. * Link the employee’s contact to the current company as a **child partner**. * Create an expense for that employee with payment mode **Paid by Employee**. * Submit, approve, and post the expense. * Open the **payment register** to reimburse the employee. **Observed behavior:** * The payment register defaults to the **company bank account** instead of the employee’s bank account. **Cause:** * The `account_payment_registered` file was removed in this commit: https://github.com/odoo/odoo/commit/704a5a19499469e5a14461bb81d33c832ce00d70#diff-f8829ed273c0ec8838636b1709ac4f895857992dddada6dbcbca3c62a2cbce81 * As a result, the payment register no longer prioritizes the employee’s bank account when the employee contact is linked to the company. **Fix:** * Added `account_register_payment` back to the `__init__` file. opw-5414133 Forward-Port-Of: odoo/odoo#242817
This update resolves an issue where enabling integer rounding on Aged Receivable reports caused a crash. The fix prevents the system from attempting calculations with 'None' values, which were triggering an error. Now, users can safely use integer rounding without encountering this problem.
Original PR description
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to…
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to reproduce: 1) Install 'account_reports' module with demo data and enable developer mode. 2) Navigate to Accounting > Reporting> Partner Reports > Aged Receivable. 3) Click on 'gear icon' to navigate advance options. 4) Click on the Options tab and set Integer Rounding to 'Nearest', click save and close adv options. 5) Expand a partner line. Error: `TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'` Root Cause: When integer rounding is enabled, the system iterates over formula results to round them using `float_round`(see[1]). However, specific report columns (such as totals for empty periods) may return None. The `float_round` function attempts to perform arithmetic on this value, failing because it cannot divide NoneType. FIX: Skip the rounding if the value received at [1] is None. [1]- https://github.com/odoo/enterprise/blob/9b517564d95424836da1e8368f6b5dc52ae45d1a/account_reports/models/account_report.py#L3329 opw-5392883 Forward-Port-Of: odoo/enterprise#102417
This update fixes an issue where a distracting helper element remained visible in the bank reconciliation journal when no entries were present. By hiding this element when there are no records, the view is now cleaner and more user-friendly, particularly on mobile devices. This enhances the overall user experience.
Original PR description
Before this PR, in the bank reconciliation journal, the no-content helper remained visible when the quick-create view was opened and there were 0 entries. This was unexpected behavior and caused overlapping issues, especially on mobile views. With this PR, the no-content helper is hidden whenever the quick-create view is open and there are 0 entries either isGrouped or not. task-5470591 Forward-Port-Of: odoo/enterprise#103776
This update fixes an issue where popups added to product descriptions on the website sale pages would appear behind the product images. The fix ensures popups are always displayed above images, improving the user experience and preventing disruptions when adding information to product details. This change was made to ensure consistent and clear product information display.
Original PR description
Steps to reproduce: =================== - Go to website sale & pick any product. - Go to edit mode & drop a popup in the product description -> Popup appear behind of the product image. Cause: ===== Product popups inserted inside the description column (#product_details) inherit it's z-index, while the adjacent .o_wsale_product_images column stays with z-index: 1. Since the details column z-index: 0, any popup inside it remained under the image column. Solution: ========= Override the z-index only when a popup is present opw-5458436 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243136
This update resolves an issue where a link added to a Todo would automatically highlight upon page refresh, even without user selection. The fix ensures the highlighting is only applied when a link is actively selected within the HTML editor. This improves the user experience and prevents unexpected visual distractions.
Original PR description
Problem: Add a link as the first line in a todo and refresh the page. The link is highlighted as soon as the page loads, even though no selection was made by the user. Cause: After 880734ee1f1f4d20d92c44e3cedcf2c61c0da908, when the editor is loaded without an active selection, the selection is set to the first element in the editable. If that element is a link, the class `o_link_in_selection` is added automatically. Solution: Only add `o_link_in_selection` when the selection is on a link and the editable is focused. Steps to reproduce: - Open a Todo. - Add a link as the first text. - Refresh the page. - Observe the link is highlighted. task-5436106 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243500 Forward-Port-Of: odoo/odoo#241277
This update resolves an issue where links within editable fields were incorrectly highlighted when the field itself wasn't focused. The change aligns the test to accurately reflect the corrected behavior, ensuring consistent highlighting logic. This improves the user experience by preventing unintended visual cues.
Original PR description
Links that are the first deep node in an editable are highlighted even when the editable is not focused which was fixed in the community PR. Adapt the test to reflect the correct behavior opw-5436106 Forward-Port-Of: odoo/enterprise#103676
This update fixes an issue where loyalty programs with pricelist restrictions weren't properly recognized in the POS. Previously, a loyalty program could be applied even if the current transaction's pricing didn't match the program's rules. Now, the POS correctly considers pricelist restrictions when determining applicable loyalty programs, ensuring accurate pricing and program application.
Original PR description
Before this commit, if a loyalty program had pricelist restrictions, the POS would not consider them when loading the applicable loyalty programs. This could lead to scenarios where a loyalty program was applied in a POS session even if the session's pricelist was not allowed by the program. This happened when the pricelist was also not available in the POS configuration and program.pricelist_ids was empty. opw-5467990 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242279
This update resolves a bug where clients were incorrectly using outdated number ranges when syncing data with DIAN. The fix ensures that the latest available number range from DIAN is always used, preventing errors when requesting new ranges. This improves data accuracy and avoids invoice processing issues.
Original PR description
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE**…
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE** According to the DIAN documentation, the GetNumberRange service is only available in the production environment. So i'm not sure if we can safely test this. The repro steps would be something like: 1. Request a range. 2. Exhaust all number from this range by sending invoices to DIAN. 3. Request a new range. 4. sync with DIAN. (notice the range selected is still the old one). 5. Try sending a new invoice to DIAN and notice there is an error. **CAUSE** In `l10n_co_dian/models/account_journal.py` the function `_l10n_co_dian_get_journal_values()` loops on all the xml `NumberRangeResponse` node and store the last range values encountered for each prefix. We don't check if the this last range is still valid, if it's the newest created (could be checked with the xml field `ResolutionDate`, but the date could be the same if the range were created the same day), if it's the latest in term of number range (DIAN start with range 1-100, then 101-something etc.). Forward-Port-Of: odoo/enterprise#103943
This update corrects an issue in the recruitment demo data by ensuring that user records are replaced with correct partner records. This prevents errors and ensures the demo data accurately reflects the system's expected data structure, leading to more reliable demonstrations and testing.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data. Forward-Port-Of: odoo/odoo#241260
This update resolves inconsistencies in call tracking across multiple browser tabs, ensuring a single, accurate call record is maintained. By streamlining call creation and state validation, the system now handles concurrent users and tab interactions more reliably, preventing issues like calls being marked as missed.
Original PR description
Previously, when a user had multiple tabs open and received a call, each tab created its own call record in the database and managed the call state independently. This led to inconsistencies: for…
Previously, when a user had multiple tabs open and received a call, each tab created its own call record in the database and managed the call state independently. This led to inconsistencies: for example, with two tabs open, accepting a call in one tab would create two call records—one marked as ongoing and the other as missed. This change fixes these issues and addresses several related concurrency and call state management problems. ### Key changes - **Single call creation per incoming call** On an incoming call, only one call record is created. The Call-ID from the SIP INVITE is now used to coordinate and ensure a single call is created in the database. - **Improved handling of concurrent tabs** Each tab still manages the call state from its own perspective, but it now uses the Reason header from SIP CANCEL requests (when present) to avoid marking a call as missed if it was answered in another tab (see “Heterogeneous Error Response Forking Problem” on the web). - **Server-side call state validation** Call state transitions are now validated server-side, allowing proper reconciliation of the different “points of view” coming from multiple tabs. ### Refactoring and architectural improvements - The Session class is now solely responsible for managing the SIP session (as defined in SIP.js). SIP sessions should no longer be accessed directly from outside this class. - Call creation and call state management can now fail without preventing communication. As a result, many components now rely on information from the session rather than the call object (with partner_id remaining on the call). - Active, main, and transfer session changes are now handled by UserAgent and applied immediately when the session state changes. We no longer wait for a call state update to trigger these changes. **Notes** - The Session class could not extend Reactive due to failing SIP.js tests caused by object reference issues. Instead, an event bus is used to notify core VoIP components of session changes. - This work prepares the system for server-side call handling without tab interference (Task 4917399). - When a tab attempts to update a call state, the operation may succeed or fail. In all cases, the server returns the current call state, which may be temporarily inaccurate due to concurrent updates. As a result, a tab’s local view of the call state may be transiently incorrect. task-2810301 Co-authored-by: Bruno Boi <boi@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
This update allows users to manually specify the CSV separator during import, addressing a previous limitation where auto-detection would fail if the last value in a row was missing. This enhancement ensures broader compatibility with various CSV file formats and improves the reliability of importing data into spreadsheets.
This update resolves a validation error that occurred when starting work orders with flexible resources, particularly when the time of day was set to a late hour. The fix ensures that attendance intervals are correctly aligned, preventing the 'start date' from being after the 'end date' and ensuring accurate time off calculations.
Original PR description
**Steps to reproduce** On a local DB, with demo data: - Change your machine's time to a late part of the day (e.g. 6pm) - Install `mrp_workorder` - Set the "Standard 40 hours/week" (used by a…
**Steps to reproduce** On a local DB, with demo data: - Change your machine's time to a late part of the day (e.g. 6pm) - Install `mrp_workorder` - Set the "Standard 40 hours/week" (used by a workcenter) as flexible. - From the Shop Floor, start the "WH/MO/00003 - Manual Assembly" workorder. "Validation Error: The start date of the time off must be earlier than the end date." **Cause** `_calculate_date_finished` in mrp is calling `plan_hours` and under certain conditions with a flexible resource, it is possible for `plan_hours` to return a datetime before the `day_dt` parameter. This happens because for flexible resources, `_attendance_intervals_batch` can return attendance intervals with start or end datetimes outside of the start_dt -> end_dt window. For example, a flexible calendar with 8h/day will return the 8:00->16:00 interval, even if start_dt is later than 8:00. **Change** Don't return attendance intervals outside of the [start_dt, end_dt] interval by shifting them if necessary. opw-5123230 Forward-Port-Of: odoo/odoo#243213 Forward-Port-Of: odoo/odoo#233169
This update fixes a problem where employee expense payments were incorrectly linked to the company bank account instead of the employee's. Now, when an employee submits an expense, the payment will automatically use their linked bank account, ensuring accurate reimbursement processing. This improves the financial reporting and accuracy of employee expense payments.
Original PR description
The aim of this commit is to fix the commercial partner id of the move lines to default to the move's partner commercial partner Steps to reproduce: - Have a bank account setup for the current company - Create an employee for a user, sets its `parent_id` to be the current company and set a bank account on the employee - Create an expense for said employee in `own_account` - Submit -> Pay flow - Bank account on the wizard is the company one, not the employee one After this commit: - Bank account on the wizard is the employee one, we stop pretending to reimburse them and actually give them money task-id: 5420587 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#240963
This update corrects a critical issue with the Odoo Enterprise system's testing environment for Shopee integration. Shopee recently changed their API paths, rendering the existing testing configurations invalid. This fix ensures accurate testing and continued functionality with the Shopee platform.
Original PR description
Shopee has changed the API path and the original testing API paths are no longer valid. Forward-Port-Of: odoo/enterprise#103939
This update fixes an issue where menu entries were incorrectly updating even when a page already existed with the same name. Previously, creating multiple pages with the same name would cause menu links to point to the last created page. This change ensures menu entries are only updated when a new page is created, improving the accuracy of website navigation.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update resolves a bug where weighing information lingered on the customer display after a scale transaction. Now, the display automatically clears when the weighing dialog is closed, ensuring accurate and immediate updates for customers. This improves the overall user experience and data accuracy.
Original PR description
Before this commit, after weighing a product, the weighing details would remain on the customer display even after closing the weighing dialog. Only weighing another product could get it to change. After this commit, the weighing details on the customer display are always cleared once the weighing dialog is closed. Forward-Port-Of: odoo/enterprise#104171
This update corrects a potential issue in how the system locks payroll periods for tax reporting (ELM transmission) in Switzerland. By using a reference date, the system now accurately reflects the period being locked, ensuring correct data transmission to tax authorities. This enhances the reliability of financial reporting.
Original PR description
Forward-Port-Of: odoo/enterprise#104269
This update fixes a potential issue in the barcode tour process by ensuring all calls are completed before the tour ends. Removing a synchronous check for DOM elements improves reliability and simplifies the system's assertion process, preventing unpredictable errors.
Original PR description
After validate an operation, it's still beter to wait for trigger .o_stock_barcode_main_menu to be sure the calls are finished before closing the tour... especially when assertions are made after the tour in python. runbot-error-id~234470 Forward-Port-Of: odoo/enterprise#103699
This update corrects a calculation error in the FedEx delivery pricing, ensuring that delivery costs accurately reflect the sale order's currency. Previously, the system was using the company's currency instead of the sale order's currency, leading to incorrect pricing. This fix ensures accurate delivery charges are displayed.
Original PR description
Issue ----- When the SO and the company use different currencies, the picking currency is correctly set to the SO's but the amount is still computed using the company's currency. Example: Sale in…
Issue ----- When the SO and the company use different currencies, the picking currency is correctly set to the SO's but the amount is still computed using the company's currency. Example: Sale in EUR, Company in USD and 1.5 EUR = 1 USD rate. Sell for 15 EUR of products => the delivery picking shows 10 EUR Steps to reproduce ----- - Activate EUR currency at 1.5 EUR = 1 USD rate - Setup company in USD - Setup INTL FEDEX delivery method - Create a dummy product with a 10 USD sale price - Create a pricelist using the EUR currency - Create a sale for some INTL client - set pricelist to EUR - add dummy product - add INTL FEDEX shipping - confirm the sale - Confirm the linked delivery > Message in chatter shows a price of 10 EUR instead of 15 EUR Cause ----- The problem is with the `carrier_price` field of `stock.picking`. https://github.com/odoo/odoo/blob/7c443175f563b9b12a7b8f638524f7f625962dc2/addons/stock_delivery/models/stock_picking.py#L21 The value is set by https://github.com/odoo/odoo/blob/7c443175f563b9b12a7b8f638524f7f625962dc2/addons/stock_delivery/models/stock_picking.py#L155 which gets its' value from the response of https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/delivery_fedex.py#L157 We then go through https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L382 where we call https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L484 The problem is that in `_decode_pricing` we take the first line matching the `rateType` with no regard to the currency of the rate https://github.com/odoo/enterprise/blob/0aea72c8db3067073afe1f89dfddf2b43d9392e9/delivery_fedex_rest/models/fedex_request.py#L594-L598 we should also filter to ensure the rate matches the order's specified currency. ----- Ticket: opw-5419724 Forward-Port-Of: odoo/enterprise#103737 Forward-Port-Of: odoo/enterprise#103232
This update fixes a potential issue where the 'Download' action wasn't reliably available when documents were in the trash. The change ensures the download button is consistently displayed, regardless of the document type, and simplifies the code for clarity. It also removes a redundant check for small screens.
Original PR description
task 5435603
This update resolves an issue where the original invoice information was not correctly displayed when reversing invoices (credit notes). Previously, the 'Source Document' field in the invoice list view was blank after a reverse move. This fix ensures that the correct source invoice is accurately reflected, improving reporting and reconciliation processes. This was a regression caused by a previous change.
Original PR description
### Issue: Reverse moves miss `invoice_origin` field. #### To reproduce: 1- Create a SO. 2- Create an invoice and confirm. 3- In invoice list view make the `Source Document` visible. 4- Create a credit note and reverse the move. From invoice list view, you can observe that `Source Document` is empty for reverse move. ### Cause: This is a regression introduced by #236656. opw-5362055 Forward-Port-Of: odoo/odoo#240439
This update resolves an issue where creating specific record rules in the Contacts app would trigger a traceback. The fix clarifies which database table is being referenced within a key query, preventing ambiguous column errors and ensuring the Contacts app functions correctly. This improves overall system stability and reliability.
Original PR description
### Issue: When creating a record rule on moves using partners, a traceback is raised when opening a contact. ### Steps to reproduce: - Install 'account_followup' and 'contacts' - In Settings >…
### Issue:
When creating a record rule on moves using partners, a traceback is raised when opening a contact.
### Steps to reproduce:
- Install 'account_followup' and 'contacts'
- In Settings > Technical > Security > Record Rules create a new rule
- name: Test Rule
- model: Journal Entry
- definition: `[('partner_id.is_company', '!=', True)]`
- Open the Contact app and try to open a contact
- Traceback
### Cause:
The newly created rule is used in the query computed by `_compute_has_moves()`. To do this the tables 'account_move' and 'res_partner' are joined. Then `subselect()` simply adds the select element with the string it is given, resulting in:
```sql
SELECT commercial_partner_id
FROM "account_move"
LEFT JOIN "res_partner"
...
```
But both `account_move` and `res_partner` have a column named "commercial_partner_id" resulting in an ambiguous column reference traceback.
### Solution:
We need to add precision on which table should be used. `subselect()` cannot guess which one should be used. We cannot add the precision in the definition of `field_names` because it is not compatible with the domain used by `_search()`.
So we add `'account_move.'` to the field name before giving it to `subselect()`.
opw-5467608
Forward-Port-Of: odoo/enterprise#103792This update fixes an issue where nested kit purchases were incorrectly valuing components, leading to inflated costs. The change ensures that kit valuations are accurately distributed based on component cost shares, particularly when using AVCO (Average Cost) accounting. It addresses a critical bug impacting purchase order accuracy.
Original PR description
### [FIX] purchase_mrp, mrp: correct BoM Kit valuation with nested kits #### Issue: When purchasing a BoM Kit (50/50) containing others BoM Kits (50/50), cost share was applied at each level (50%…
### [FIX] purchase_mrp, mrp: correct BoM Kit valuation with nested kits
#### Issue:
When purchasing a BoM Kit (50/50) containing others BoM Kits (50/50), cost share was applied at each level (50% instead of 25%), leading to overvaluation (e.g., 200% total instead of 100%)
#### Cause:
`cost_share` was always applied fully during BoM explosion and as a portion of the full price on `_get_unit_price()`
#### Other bug fixed:
Fix `_get_cost_share()` to correctly return 0 when BoM total cost_share already equals 100%
#### Requirement:
AVCO (Average Cost) must be enabled on all components/BoMs
#### Steps to reproduce:
1. Recreate that hierarchy with AVCO Products
- A kit "Testing Kit Complete" containing:
-- "Component01", cost share 50%
-- A kit "Testing Kit 1", cost share 50%:
--- "Component02", cost share 50%
--- "Component03", cost share 50%
2. Create and validate a Purchase Order for "Testing Kit Complete" (unit price: 1000)
3. Receive the products
4. Go in Inventory > Reporting > Valuation and search for Component
5. All 3 components are set to 500, instead of Component01: 500 / Component02: 250/ Component03: 250
opw-4806023
### [FIX] purchase_mrp: correct BoM valuation with product variants or optional lines
#### Issue:
BoM valuation ignores variant-specific lines and does not skip lines with quantity 0
#### Cause:
The code only checks that the BoM adds up to 100%
But this can cause issues with variants that do not include all products or with optional lines
As a result, the total valuation may be incorrect
#### Steps to reproduce:
1. Recreate a kit hierarchy with AVCO products:
- Kit "Variant Kit" (Variant Color: White and Wood) containing:
-- "Component01", cost share 0%, only for variant White
-- "Component02", cost share 0%
2. Create and confirm a Purchase Order for "Variant Kit" (variant: Wood, unit price: 1000)
3. Receive the products
4. Go to Inventory > Reporting > Valuation and search for the components
5. Only Component02 appears with 500$, so only half of the total value is shown
opw-4806023
opw-5085457
Forward-Port-Of: odoo/odoo#242316
Forward-Port-Of: odoo/odoo#218326This update corrects a display issue where product prices were incorrectly shown as excluding tax, even when tax-included settings were selected in the Point of Sale system. The fix ensures prices are accurately displayed based on the configured tax settings, providing a more consistent and reliable user experience. The change improves clarity and accuracy for sales transactions.
Original PR description
Steps to reproduce ------------------ 1. Set the PoS taxes display to tax-included 2. In PoS, add a product, change its quantity to 2, and change its price too Notice that the new price / unit is shown as price excluded, even though we set the prices to tax-included in the PoS settings. Reason ------ We were using the getter `currencyDisplayPriceUnit` which uses `displayPriceUnit` which always shows the price as `tax_exluded`. Fix --- Now we change `displayPriceUnit` to adapt to the `iface_tax_included` config in PoS. That follows well the convention used for the non-unit price getter, `displayPrice`. For the cases where we want to explicitly use the tax excluded unit price, we have created the getters `displayPriceUnitExcl` and `currencyDisplayPriceUnitExcl` for that, which replaces some usages of the old getters. opw-5405572 Forward-Port-Of: odoo/odoo#240091
This update resolves an issue where the price display in the point-of-sale (POS) system was incorrect. The fix replaces a string-based currency display unit with the correct numeric display unit, ensuring accurate price calculations and presentation for customers.
Original PR description
We were using `currencyDisplayPriceUnit` inside `Math.sign()`. However, `currencyDisplayPriceUnit` returns a string. Now we use `displayPriceUnit`. opw-5405572 Forward-Port-Of: odoo/enterprise#102160
This update resolves a bug where creating a new employee version with a date later than an existing version's contract end date resulted in duplicate contract creation. The fix ensures that contracts are only created for the active employee version, streamlining payroll processing and preventing unnecessary contract generation. This improves data accuracy and efficiency.
Original PR description
To reproduce: install hr_payroll open an employee form view > payroll make sure the employee_version you are on doesn't have a contract end date set the end date to X and without saving create a new employee version from the plus sign with date greater than X The Bug: when following the above flow a contract will be created for both employee versions it shouldn't be the case for the second version as version date is greater than contract end date opw-5427769 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243153 Forward-Port-Of: odoo/odoo#240681
Features or functions removed from Odoo
This pull request removes a redundant field, 'online_partner_information', from the bank statement synchronization module. This cleanup improves the codebase's efficiency and reduces potential maintenance overhead. The change has no impact on how users interact with the system.
Original PR description
Partner's and banks statement line's 'online_partner_information' field is not used anywhere in code.
Code cleanup and technical improvements
This update enhances how mentions are handled within Odoo's discussion threads. The changes streamline the process of referencing discussions, making it easier for users to collaborate and stay informed. This improves the overall user experience for discussing topics within Odoo.
This update simplifies how Odoo stores whether a user has dismissed notification permissions, using a more straightforward local storage approach. A new upgrade script has been added to ensure this setting is correctly preserved across Odoo updates. This ensures a consistent user experience regarding notifications.
Original PR description
This commit converts field `Store.isNotificationPermissionDismissed` to simpler syntax `{ localStorage: true }`.
As the key changes, this also adds upgrade script to preserve the setting.This update simplifies the process of configuring the IoT Box by consolidating commands and reducing unnecessary file transfers. By optimizing the setup, we're aiming for a faster and more reliable deployment of the IoT Box, improving the overall user experience. This change focuses on internal setup improvements.
Original PR description
group commands, rsync only once.
This update simplifies the codebase by removing a redundant folder structure. The change improves maintainability and organization of the Enterprise module's code. This is an internal improvement to the Odoo platform.
Original PR description
Clean folder structure and js imports by removing the js folder in src.
This update streamlines the way signatures are handled within Odoo Enterprise. The signature input functionality has been moved to a central component, allowing it to be used more efficiently across different modules like mass mailing. This improves consistency and reduces redundancy in how signatures are managed.
Original PR description
This PR moves `SignatureInputPlugin` and `SignatureInputComponent` from `accountant_knowledge` to `html_editor`. This change enables reuse of the signature input plugin in `mass_mailing`, specifically for the `mass_mailing.s_text_signature` snippet. Task-5380615
9 changes
Resolved issues and error corrections
This update resolves a recurring problem with the website tour feature, which previously failed intermittently. The fix addresses a timing issue related to the tour loading and the builder's 'Block' tab interaction, ensuring the tour consistently works as expected. This improves the user experience for visitors.
Original PR description
Tour added in this [commit] was previously failing, and the earlier [fix] only reduced the frequency of failures. However, it still occasionally fails due to race conditions of the iframe becoming ready and the moment the builder opens the 'Block' tab after the iframe has been reloaded. This commit aims to fix it. [commit]: https://github.com/odoo/odoo/commit/a5455bf [fix]: https://github.com/odoo/odoo/commit/0a9522792cc0e18a895c0589f34977123d091d1a runbot-234504 Forward-Port-Of: odoo/odoo#239062
This update fixes an error in how stock valuations are calculated when receiving products purchased in a foreign currency (like EUR) with an auto-standard product. Previously, an incorrect currency exchange entry was created, leading to inaccurate inventory values. The fix ensures the stock valuation accurately reflects only the product's cost, regardless of currency.
Original PR description
Processing a buy-receive-bill process in a foreign currency and with an auto-standard product will lead to an incorrect valuation To reproduce the issue: (Company in USD) 1. Enable EUR and define the…
Processing a buy-receive-bill process in a foreign currency and with an auto-standard product will lead to an incorrect valuation To reproduce the issue: (Company in USD) 1. Enable EUR and define the rates as followed: - Yesterday: 2 - Today: 2.5 2. Create a product category: - Method: Standard - Valuation: Automated 3. Create a product P in that category - Cost: 10 USD 4. [Yesterday] Confirm a PO in EUR with 1 x P 5. [Yesterday] Receive it 6. Bill Error: the stock valuation has two entries: one with 10 USD debit, the receipt. Another one with 2 USD credit, the currency exchange rate difference. The second one is a mistake, in a standard configuration, the stock valuation should be impacted by nothing but the cost defined on the product form. Since [1], in some conditions the method `_get_exchange_account` returns the stock valuation account. This is what happens here, but it's a mistake since in the above case, we should stick with the classic account (i.e. the `super` call). The conditions must be more strict. [1] https://github.com/odoo/odoo/commit/bae7feefcb08db7329d52bc36517dfd73f3347a7 OPW-5380665 Forward-Port-Of: odoo/odoo#243094 Forward-Port-Of: odoo/odoo#243029
This update resolves a minor visual issue with the Point of Sale interface. Specifically, a button class was corrected, ensuring a consistent and professional look for the customer display functionality. This change improves the overall user experience within the Point of Sale module.
Original PR description
task : 5493872 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where components added to manufacturing orders through the product catalog weren't correctly transferred to the pre-production warehouse. The fix adds a warehouse ID to these moves, ensuring proper inventory tracking and fulfillment within multi-step manufacturing processes. This improves the accuracy of component usage and reduces potential stock discrepancies.
Original PR description
Issue
-----
In multi step manufacturing, components added to MO through the catalog don't get transfered to the pre-prod location.
Steps to reproduce
-----
- 2 step manufacturing
- Create 2 products
- Create a MO for the first product
- Open the product catalog
- Add some qty of the second product
- Go back to the MO & confirm it
> No procurement transfer for the second product from stock to pre-prod
Cause
-----
The move created by the catalog has no `warehouse_id` so in `adjust_procure_method` we don't find any rule which means it gets set to MTS
https://github.com/odoo/odoo/blob/6ecd271ff34313d900a0ad14b1c20679808ba9b8/addons/stock/models/stock_move.py#L2366-L2368
-----
Ticket:
opw-5221418
Forward-Port-Of: odoo/odoo#243036
Forward-Port-Of: odoo/odoo#239265This update fixes an issue where loyalty programs with pricelist restrictions weren't properly recognized in the POS. Now, the POS correctly considers pricelist restrictions when applying loyalty programs, ensuring accurate pricing and preventing incorrect loyalty applications based on the current transaction's pricelist.
Original PR description
Before this commit, if a loyalty program had pricelist restrictions, the POS would not consider them when loading the applicable loyalty programs. This could lead to scenarios where a loyalty program was applied in a POS session even if the session's pricelist was not allowed by the program. This happened when the pricelist was also not available in the POS configuration and program.pricelist_ids was empty. opw-5467990 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242279
This update resolves a problem where clients were incorrectly using outdated number ranges when syncing data with DIAN. The fix ensures that the latest, valid number range provided by DIAN is always used, preventing invoice errors and improving data accuracy. This impacts invoice processing with DIAN.
Original PR description
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE**…
**PROBLEM** When a client has exhausted a number range for a prefix, if he request a new one, when trying to sync the DIAN data the old range will be use instead of the new one. **STEP TO REPRODUCE** According to the DIAN documentation, the GetNumberRange service is only available in the production environment. So i'm not sure if we can safely test this. The repro steps would be something like: 1. Request a range. 2. Exhaust all number from this range by sending invoices to DIAN. 3. Request a new range. 4. sync with DIAN. (notice the range selected is still the old one). 5. Try sending a new invoice to DIAN and notice there is an error. **CAUSE** In `l10n_co_dian/models/account_journal.py` the function `_l10n_co_dian_get_journal_values()` loops on all the xml `NumberRangeResponse` node and store the last range values encountered for each prefix. We don't check if the this last range is still valid, if it's the newest created (could be checked with the xml field `ResolutionDate`, but the date could be the same if the range were created the same day), if it's the latest in term of number range (DIAN start with range 1-100, then 101-something etc.). Forward-Port-Of: odoo/enterprise#103943
This update enhances the Sign Request module's user interface and functionality. Specifically, it simplifies the viewing of sign requests, streamlines the process of managing signers, and improves the overall user experience by addressing minor UI/UX issues.
Original PR description
- Hide 'Sent By' column by default in list view - Use many2one widget for signers in list view - Update template name logic: * Keep custom name if set * Automatically update based on first uploaded document otherwise - Localize signing date in kanban view - Show 'Download' as dropdown only if more than one document - Add 'Details' item to gear icon menu to open form view
This update fixes an issue preventing internal users from accessing canned responses within the Odoo Portal. The change corrects a previous misconfiguration and backports a solution from another PR, preparing for future Portal enhancements. This ensures consistent functionality for all users.
Original PR description
*: im_livechat, portal, project, test_mail_full PR #192953 introduces a composer action for canned responses. The feature is available in portal for internal users but since `suggestion` is disabled in portal, this feature doesn't work properly. In preparation for supporting `::` delimiter in portal, the incorrect fix in PR #231360 has been reverted. `inFrontendPortalChatter` is specific to portal frontend and should not be set to `true` in the project sharing environment. Instead of the mentioned fix, a similar fix from PR #231441 has been backported. task-5262349 Forward-Port-Of: odoo/odoo#235551
This update corrects a small issue in the demo data for the recruitment module. Previously, the demo data incorrectly referenced user records instead of partner records, which caused problems when running the demo. This change ensures the demo data accurately reflects the expected data structure, improving its usability.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data. Forward-Port-Of: odoo/odoo#241260
7 changes
New functionality added to Odoo
This update introduces a new module to seamlessly sync POS receipts with the JoFotara portal in Jordan. This allows businesses to automatically generate and manage e-receipts for their Point of Sale transactions, improving accounting accuracy and customer satisfaction. The changes include new models and overrides to support UBL 2.1 invoice generation from POS orders.
Original PR description
This commit add a new module to sync receipts with JoFotara portal. task-4213323 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
This update enables public users to directly access documents without needing to create a user account. When a public user shares a document with a partner, the system now allows the partner to register and create a user account linked to that partner, streamlining the document sharing process. This improves usability for partners who don't want to create a full Odoo user.
Original PR description
Purpose ======= We can share a document to a partner without a user, and with `access_via_link == 'none'`. In that situation, the partner is forced to create a user, but if he clicks on signup, then the new user won't be linked to the partner set on the `documents.access` (a new partner will be created). Now, when inviting a member, if he doesn't have a user, we invite him to create a user. If the partner has a user, then we just redirect him to the login page. Task-5242208
Resolved issues and error corrections
A bug was preventing employees from taking future leave when their accrued balance was below the maximum limit. This update corrects the calculation of available leave days, ensuring employees can continue to accrue and take leave as intended. The fix ensures accurate leave allocation based on accrual plan rules.
Original PR description
Accrual plan for leave days gets blocked, even when the remaining leave balance is below the cap. As a result, no additional leaves are accrued beyond a certain point, even though they should be. #…
Accrual plan for leave days gets blocked, even when the remaining leave balance is below the cap. As a result, no additional leaves are accrued beyond a certain point, even though they should be.
# Steps to reproduce:
Go to time off app
* Create a new leave type.
* Create a new accrual plan with:
- one milestone :
- 2 days accrued per month
- Cap: 10 days
- start accruing 1 days after
- No expiration
- Carry over: All
* Create and validate a leave allocation
- 1 year ago
- new leave type
- new accrual plan
* Take the maximum number of leaves available.
* Advance the computer calendar by 1 year.
* Again, take the maximum number of leaves.
* Advance the computer calendar by another year.
* Try to take a future leave.
-> Issue: It’s not possible to take a future leave, the number of accrued days has stopped increasing. The accrual plan appears blocked.
Objective : The accrual plan should continue to allocate leave days even if leaves have been consumed regularly, as long as the remaining leaves are under the cap.
## Issue
Before going further: the property `leaves_taken` of the `hr.leave.allocation` is supposed to contain the number of leaves this allocation cover until "today".
In the `_test_get_allocation_future_leaves1` added test, in the last line of the test :
`assert_virtual_leaves_equal(self, leave_type_day, 2, self.employee_emp, date='2023-02-01')`
When calling `get_allocation_data` with a `target_date` set in the future, the result is wrong. Here is how it works :
`get_allocation_data`
...
.....`_get_consumed_leaves` (1)
...........`_get_future_leaves_on` (2)
...............`_process_accrual_plans` (3)
....................`_compute_leaves` (4)
.........................`_get_consumed_leaves` (5)
..............................`get_future_leaves_on` (6)
...................................`process_accrual_plans` (7)
**A)** The method **(2)** try to calculate the added number of days each allocation will have on `target_date`. So it creates a copy of the allocation in memory using the 'new' method:
`fake_allocation = self.env['hr.leave.allocation'].with_context(default_date_from=accrual_date).new(origin=self)`
It will then update it to `target_date` using `_process_accrual_plans` and will return the difference of days between the
updated `fake_allocation` and the current allocation (`self`)
**B)** Before iterating over each accrual date, the `_process_accrual_plans` **(3)** will get the `leaves_taken` property which is a computed field. It will trigger `_compute_leaves`.
**C)** The method **(4)** will call `_get_consumed_leaves`, and so the nightmare begins.
**D)** The method **(6)** will create a second `fake_allocation` based on the origin of the first `fake_allocation` (see **A)**).
**E)** This time, `_process_accrual_plans` **(7)** will also look at the `leaves_taken`, but won't trigger the `_compute_leaves` probably because the current allocation is a `fake_allocation` of a `fake_allocation`, and one property of the `new` method is that `Two new records with the same origin record are considered equal.`. Therefore, the `leaves_taken` is considered to be already computed (but it's not).
So `_process_accrual_plans` read the `leaves_taken` which is 0 (probably the default value of `leaves_taken`), but it should be 20 !
**F)** As the value of `leaves_taken` is wrong, the fake_allocation n°2 is also wrong, and its `number_of_day` is 10 but the `number_of_days` of the origin allocation is 20. So `get_future_leaves_on` **(6)** will return -10 which makes no sense, and all the previous calls computations will be wrong. And the final `virtual_remaining_leaves` value will be 0 instead of 2.
## Source of the issue
In the `_process_accrual_plans` method, for each allocation, `leaves_taken` is only computed once at the start of the loop over the allocation "important" dates (see `nextcall` property of `hr.leave.allocation`). At this moment, the method calculates the `leaves_taken` the allocation will have on the `accrual_date` parameter. Yet, this property can change depending on the date the allocation is on (`nextcall` property) which leads to some issues in the computation of the `allocation.number_of_days`.
## Solution
For each allocation, compute the `leaves_taken` at every iteration trough the values of `nextcall`. BUT, this can trigger an infinite loop as computing `leaves_taken` calls `_get_consumed_leaves` which calls `_get_future_leaves_on`, which calls `_process_accrual_plans` ... To avoid this, this PR add the context variable `precomputed_allocations` (will be converted into a function parameter in master) which will prevent `_get_consumed_leaves` from calling `_get_future_leaves_on` for the allocations already up to date (contained by this very `precomputed_allocations` context variable).
**For r+: Needs a few changes at 18.0 (hours per day of employee is retrieved differently for example)**
opw-4934391
opw-5226806
Forward-Port-Of: odoo/odoo#239836This update ensures the Odoo spreadsheet library is running the latest version (18.0.54). This improves the performance and stability of spreadsheet functionality within Odoo, addressing potential issues and enhancing the user experience. Multiple developers have collaborated on this update.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/c0048a0b4 [REL] 18.0.54 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/c0048a0b4 [REL] 18.0.54 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/de161dd1b [FIX] Pivots: Recompute measure on indirect dependency update [Task: 5349782](https://www.odoo.com/odoo/2328/tasks/5349782) https://github.com/odoo/o-spreadsheet/commit/af49eeb25 [FIX] demo: add import osheet [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/4080aaea2 [FIX] f&r: the searched range should follow the active sheet [Task: 5423885](https://www.odoo.com/odoo/2328/tasks/5423885) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes an issue where website menu entries incorrectly pointed to the last created page when multiple pages with the same name were created. The change ensures menu entries are only updated with the new page ID when a new page is created, preventing duplicate page assignments and ensuring accurate website navigation.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update corrects a potential issue in how the system determines the period for ELM (Electronic Ledger Message) transmission in Switzerland. By using a reference date, the system now accurately locks the payroll period, ensuring correct reporting to tax authorities. This improves the reliability of financial data and reduces the risk of errors.
Original PR description
Forward-Port-Of: odoo/enterprise#104269
This update resolves an issue where the original invoice linked to a reverse move was not displayed correctly in the invoice list. This fix ensures that the 'Source Document' field accurately reflects the original invoice when reversing a credit note, improving reporting and reconciliation accuracy. The issue was a regression introduced in a previous update.
Original PR description
### Issue: Reverse moves miss `invoice_origin` field. #### To reproduce: 1- Create a SO. 2- Create an invoice and confirm. 3- In invoice list view make the `Source Document` visible. 4- Create a credit note and reverse the move. From invoice list view, you can observe that `Source Document` is empty for reverse move. ### Cause: This is a regression introduced by #236656. opw-5362055 Forward-Port-Of: odoo/odoo#240439
9 changes
Resolved issues and error corrections
This update corrects a potential issue with the transmission of payroll data to the Swiss tax authorities (ELM). By using a reference date when locking payroll periods, the system now accurately reflects the correct tax reporting timeframe, ensuring compliance and reducing the risk of errors.
This update fixes an issue where menu entries were incorrectly pointing to the latest page after multiple pages with the same name were created. Now, menu updates only occur when a new page is created and no other page is already associated with that menu entry, ensuring accurate page linking.
Original PR description
With commit 19302cd40347065fcd937bd54e6dce27fe4940cc, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name in a row. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 Forward-Port-Of: odoo/odoo#243312
This update resolves an issue where the l10n_mx_edi module was encountering a 'singleton error' when multiple invoices with the same payment method were processed. The fix ensures that the system correctly handles these scenarios, preventing errors and improving invoice generation reliability. This change ensures consistent invoice generation for users.
Original PR description
- for more then one records having same code it's raising an singleton error at fetching the name - error: ```py File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 753, in…
- for more then one records having same code it's raising an singleton error at fetching the name
- error:
```py
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 753, in _render_iterall
for item in frame.iterator:
File "<6403>", line 6097, in template_l10n_mx_edi_report_invoice_document_6403
File "<6403>", line 6083, in template_l10n_mx_edi_report_invoice_document_6403_content
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 616, in __str__
self.html = ''.join(self.irQweb._render_iterall(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 753, in _render_iterall
for item in frame.iterator:
File "<6403>", line 1723, in template_l10n_mx_edi_report_invoice_document_6403_t_call_0
File "/home/odoo/src/enterprise/l10n_mx_edi/models/account_move.py", line 424, in _l10n_mx_edi_get_extra_invoice_report_values
cfdi_infos['payment_way'] = f'{payment_way} - {payment_method.name}'
^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/orm/fields.py", line 1659, in __get__
record.ensure_one()
File "/home/odoo/src/odoo/odoo/orm/models.py", line 5934, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: l10n_mx_edi.payment.method(23, 24)
```
- OPW-5450360This update resolves a migration issue that prevented the Italian accounting module (l10n_it) from updating correctly from version 16.0. The fix adds a missing column, 'l10n_it_exempt_reason', which was required for the migration process to complete successfully. This ensures a smooth upgrade to the latest Odoo version.
Original PR description
Migration from 16.0 fails because l10n_it_exempt_reason column does not exist
This change fixes an issue where LATAM invoices with numeric sequence prefixes would incorrectly restart the invoice sequence, leading to duplicate document numbers. The update adjusts the invoice numbering logic to properly handle LATAM invoice formats, ensuring unique document numbers are always generated.
Original PR description
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used…
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used sequences. **Steps to Reproduce:** - Install l10n_pe_edi - Change to PE Company - Duplicate the Customer Invoice journal, give it shortcode "01A" - Create an invoice in dupe journal, set customer to "Comercial Constructora los Patitos S.A.", set product and tax, Document Type = (01) Factura - Confirm the invoice, it will have name "F F01-00000001" - Duplicate the invoice -> The new invoice has the same sequence number, and the document number is visible Expected: Invoice is called "Draft" (/), document number is not visible, and upon confirming the invoice, it will have the name "F F01-00000002" **Cause:** - LATAM invoices do not follow the standard formats in sequence_mixin.py, so _deduce_sequence_number_reset will always return "never" - However, the result of this method is used in _get_last_sequence_domain, and assumes that the sequence follows the corresponding format to "never" (_sequence_fixed_regex) - This isn't the case if the prefix has numbers, it will be captured in the _sequence_yearly_regex - anti-regex is used to filter sequences that aren't _sequence_fixed_regex, but this causes prefixes with numbers to never be found, and always restart the sequence **Solution:** - Add context value "no_anti_regex" to skip sequence exclusion - If the invoice is LATAM, call _get_last_sequence_domain with context "no_anti_regex" = True so no sequences are excluded. - Because LATAM invoices are always in a fixed format, we don't need to filter out sequences in other formats opw-5111844
This update fixes an issue where LATAM invoices with numeric sequence prefixes would incorrectly restart the sequence, leading to duplicate document numbers. The fix temporarily bypasses sequence filtering for LATAM invoices to ensure correct sequence generation, resolving a potential data inconsistency.
Original PR description
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used…
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used sequences. **Steps to Reproduce:** - Install l10n_pe_edi - Change to PE Company - Duplicate the Customer Invoice journal, give it shortcode "01A" - Create an invoice in dupe journal, set customer to "Comercial Constructora los Patitos S.A.", set product and tax, Document Type = (01) Factura - Confirm the invoice, it will have name "F F01-00000001" - Duplicate the invoice -> The new invoice has the same sequence number, and the document number is visible Expected: Invoice is called "Draft" (/), document number is not visible, and upon confirming the invoice, it will have the name "F F01-00000002" **Cause:** - LATAM invoices do not follow the standard formats in sequence_mixin.py, so _deduce_sequence_number_reset will always return "never" - However, the result of this method is used in _get_last_sequence_domain, and assumes that the sequence follows the corresponding format to "never" (_sequence_fixed_regex) - This isn't the case if the prefix has numbers, it will be captured in the _sequence_yearly_regex - anti-regex is used to filter sequences that aren't _sequence_fixed_regex, but this causes prefixes with numbers to never be found, and always restart the sequence **Solution:** - Add context value "no_anti_regex" to skip sequence exclusion - If the invoice is LATAM, call _get_last_sequence_domain with context "no_anti_regex" = True so no sequences are excluded. - Because LATAM invoices are always in a fixed format, we don't need to filter out sequences in other formats opw-5111844
This update resolves a crash in the Belgian Intrastat report caused by an error in the underlying SQL query. The fix adds a required alias to a subquery, ensuring the report can generate accurate data and run reliably. This improves the stability and usability of the Intrastat reporting feature for Belgian businesses.
Original PR description
Steps to reproduce:
1. Install l10n_be_intrastat.
2. Switch to a Belgian company.
3. Open the Intrastat report.
4. Enable “Intrastat (Services F01DGS) (BE)” from the report options.
5. Switch to the Intrastat (Services F01DGS) (BE) report.
Issue:
The Intrastat report crashes with:
```py
psycopg2.errors.SyntaxError: subquery in FROM must have an alias
LINE 28:
FROM (
^
HINT: For example, FROM (SELECT ...) [AS] foo.
```
Cause:
The error is raised when executing the UNION query in _dynamic_lines_generator(), which combines the SQL queries returned by _build_query_group() for each column group.
_build_query_group() builds a SQL query using a subquery returned by _prepare_query() directly in the FROM clause without providing an explicit alias.
Fix:
Wrap the inner query in parentheses and add an explicit alias in the FROM clause to generate valid SQL and prevent the report from crashing.
opw-5410422This update aligns Odoo's UBL export process with recent changes introduced in version 18. It now correctly handles fixed taxes, separating those that impact the tax base (converted to allowance charges) from those that don't (represented as separate invoice lines). This ensures accurate tax reporting for UBL invoices.
Original PR description
Context : In v18+, fixed taxes are handled differently depending on whether they affect the tax base or not. Before this commit : All fixed taxes were systematically converted into allowance charges during UBL exports. This behaviour was incorrect, as some fixed taxes (e.g., recupel) do not affect the tax base and should instead be represented as separate invoice lines. This commit aligns the v17 behavior with the logic introduced in v18+ by distinguishing between the two cases: - Fixed taxes that affect the base are converted into allowance charges. - Fixed taxes that do not affect the base are converted into additional invoice lines. task-5405115 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where stock weights were sometimes inaccurate due to rounding discrepancies between the database and cached values. By rounding the picking weight to the 'Stock Weight' precision during calculation, we ensure consistent and reliable weight data used for carrier integrations. This improves the accuracy of shipping calculations and reduces potential errors.
Original PR description
Main: Picking weight is computed as the sum of move weights. Although both fields are limited in decimal precision by 'Stock Weight', the sum can produce a value with more decimal places than allowed. Before: Digits limitation is applied in db but not in cache, leading to potential inconsistencies when the cached value is used to prepare API requests to carriers. After: Picking weight is rounded according to 'Stock Weight' decimal precision directly when computed to enforce precision in cache. opw-5406560