Daily updates from Odoo
Navigate
Branch
Friday, December 12, 2025
180 changes
18 changes
Resolved issues and error corrections
This update resolves a problem that prevented users from correctly configuring their tax returns within the Accounting module. Previously, a step was skipped during installation, leading to an error. Now, the necessary setup is completed, ensuring a smooth experience when setting accounting periods for tax returns.
Original PR description
From **saas-18.3**, when installing the accountant module, after [this PR](https://github.com/odoo/enterprise/commit/49aca723c2422fedcc8bda963a6346a172825617#diff-c703c688dc3f80644a43c96657cb2db0122b83cee9bcfa417554b0c7f1e4f550L22) the `_initiate_account_onboardings()` was not called anymore for companies that already had a chart template. This caused a traceback while configuring the Accounting Period on the Tax Returns journal: `ValueError - Expected singleton: onboarding.progress()` We now fix this behavior by ensuring that `_initiate_account_onboardings()` is called when installing the chart_template, filling the gap that was introduced. **Steps to Reproduce:** 1. Install `accountant` module without demo data. 2. Accounting > Dashboard > _Tax Returns_ Journal, click on the **"Tax Returns"** button. 3. Set an **Opening Date** in the wizard and try to apply the **Accounting Periods**. sentry-7064593163 Forward-Port-Of: odoo/enterprise#101442
This update ensures that the Brazil E-Invoice status accurately reflects cancellations after an e-invoice is requested to be cancelled. Previously, the status field was left blank, but this fix correctly sets the status to 'Cancelled' ensuring accurate tracking of e-invoice processing. This improves the reliability of our Brazilian e-invoice reporting.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for…
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for l10n_br](https://docs.google.com/document/d/1CSUKpnyhty5WBqUDBE-7dGvu0qxaC5vQ0loz0fYNg04/edit?tab=t.0) * Confirm the invoice and **send it to e-invoice (Brazil)**. * Confirm the **Brazil E-Invoice Status** shows **'Accepted'**. * Click **Request Cancellation**, enter a cancellation reason, and submit the request. **Observed behavior:** * The invoice moves to **Cancelled** state. * The cancellation XML is generated and attached in the chatter. * SEFAZ returns a successful cancellation response. * However, the **BR EDI Status** becomes **empty**, instead of reflecting **'Cancelled'**. **Cause:** * In the wizard `l10n_br_edi.invoice.update`, both `_finalize_update()` and `_submit_services()` assign `l10n_br_last_edi_status = 'cancelled'` **before** calling `button_cancel()`. * `button_cancel()` internally triggers `button_draft()` for posted invoices. * The Brazil EDI override of `button_draft()` resets `l10n_br_last_edi_status = False`. * This clears the status that was just set, leaving the field blank. **Fix:** * move `l10n_br_last_edi_status = "cancelled"` to `button_cancel()` method. opw-5378542 Forward-Port-Of: odoo/enterprise#101438
This update fixes inconsistencies in how nested s_card snippets are edited, specifically related to cover images. Previously, changes to one snippet would unintentionally affect others. The fix ensures that image settings are applied correctly only to the currently edited snippet, improving the user experience and preventing unexpected visual changes.
Original PR description
This commit fixes three issues occurring when editing nested s_card snippets. **Problem 1 - Incorrect cover image detection** Issue: An `s_card` without a cover image displayed the cover-image option…
This commit fixes three issues occurring when editing nested s_card snippets. **Problem 1 - Incorrect cover image detection** Issue: An `s_card` without a cover image displayed the cover-image option if it contained a child `s_card` with a cover image. Cause: `CardImageOption` and `CardImageAlignmentOption` relied on `querySelector`, which could detect images inside child snippets. Fix: The cover image detection now checks that the closest `s_card` element corresponds to the snippet being edited. **Problem 2 - Ratio settings applied to all child cards** Issue: Changing the cover image ratio on an `s_card` applied the setting to all nested `s_card` elements. Cause: The `BuilderSelect` in `CardImageOption` targeted `.o_card_img_wrapper`, causing `classAction` to apply to all descendants. Fix: The selector is now `:scope > .o_card_img_wrapper`, ensuring the option acts only on the current snippet. **Problem 3 - Parent image positioning leaking to children** Issue: Adjusting the cover image position on a parent `s_card` affected the rendering of all child card images. Cause: CSS rules for `.o_card_img_horizontal` applied to all descendant elements mathcing `.o_card_img_wrapper`. Fix: The rules now apply only to direct children of `.o_card_img_horizontal`. The same correction was applied to `.o_card_img_ratio_custom`. task-5349540
Previously, the documents control panel only processed the first 40 files selected, regardless of the total number uploaded. This update ensures that all selected files (40+), when actions like duplication or deletion are initiated, are correctly processed. This resolves a limitation impacting user workflow.
Original PR description
Steps to Reproduce =================== 1. Upload more than 40+ files in a folder. (One page displays upto 40 docs) 2. Use the checkbox to select all files on the page (this selects only 40 files) 3.…
Steps to Reproduce =================== 1. Upload more than 40+ files in a folder. (One page displays upto 40 docs) 2. Use the checkbox to select all files on the page (this selects only 40 files) 3. Click the 'Select All' button in the control panel to select all 40+ files. 4. Now, try duplicating or moving them to the trash. => Only the first 40 selected files (on the single page) are considered for action, not all the selected files. Technical ========== For documents control panel action we have custom handling for selecting records and executing action. We use `model.root.selection` which only consider records in current page, case of select all records from other pages is missed here. After this PR ================== - All selected records are considered for the actions - Added custom `getResIds` method to get filtered `resIds` as per domain. Note: `getResIds` in DynamicList doesn't have custom domain feature so create our own as per use case Task-4700841 Forward-Port-Of: odoo/enterprise#100791 Forward-Port-Of: odoo/enterprise#87634
This update fixes an issue where invoices generated from Point of Sale (POS) orders were incorrectly defaulting to the customer's first delivery address instead of the address selected during order creation. The fix ensures that invoices accurately reflect the customer's chosen shipping address, aligning with the standard behavior of the 'sale' module. This improves order accuracy and customer satisfaction.
Original PR description
Currently, an incorrect shipping address is assigned to invoices generated from POS orders when the customer has multiple delivery addresses. **Steps to reproduce:** - Install the `point_of_sale` and…
Currently, an incorrect shipping address is assigned to invoices generated from POS orders when the customer has multiple delivery addresses. **Steps to reproduce:** - Install the `point_of_sale` and `contacts` modules. - Enable `Customer Addresses` from the settings. - Create a contact with `two` delivery addresses. - Open POS and create an order using the `second delivery address` as the customer. - Confirm the order with the `invoice`. - Observe the `shipping address` on the invoice. **Observation:** The invoice incorrectly shows the first delivery address instead of the second delivery address. **Cause:** At invoice creation in POS, only `partner_id` is set and `partner_shipping_id` is missing at [1]. As a result, the invoice defaults to the customer's first delivery address instead of the delivery address selected in POS. **Fix:** This commit adds `partner_shipping_id` to the invoice values to ensure the POS invoice uses the exact delivery address selected during order creation. same as the `sale` module behaviour. [1]: https://github.com/odoo/odoo/blob/1d1cd8648ed1c3f13febbde8d48e28928e18583f/addons/point_of_sale/models/pos_order.py#L667-L684 opw-5350137 Forward-Port-Of: odoo/odoo#239663 Forward-Port-Of: odoo/odoo#238055
This update resolves an error that occurred when users edited combo configurations on order lines. Specifically, removing the combo name and clicking the 'Edit Configuration' button triggered a technical issue. The fix ensures the configuration option is only displayed when a product template is associated with the combo, improving usability.
Original PR description
Currently, when a user adds a combo to an order line, and remove the name of combo and click on Edit Configuration (pencil icon) error is encountered. Steps to replicate: - Install `sale_management`…
Currently, when a user adds a combo to an order line, and remove the name of combo and click on Edit Configuration (pencil icon) error is encountered. Steps to replicate: - Install `sale_management` with demo and create a new SO. - Add a combo product and remove the combo name and click Edit Configuration (pencil icon). Error: `TypeError: SaleProductConfiguratorController.sale_combo_configurator_get_data() missing 1 required positional argument: 'product_template_id'` Cause: - When a user clicks on Edit configuration, the client-side JavaScript makes an RPC call to the server, targeting the `sale_combo_configurator_get_data()` which expects `product_template_id` at [1] and since it is removed from order line the error is encountered. Solution: - Changed the content of method `isCombo()` to use the product_template_id to make sure the Edit Configuration is only visible when product template is present. Similar PR for reference: https://github.com/odoo/odoo/pull/217464 [1]: https://github.com/odoo/odoo/blob/fa4307b9758800f26c9ee87cf3698fd60bfd1ab5/addons/sale/controllers/combo_configurator.py#L12-L14 No ID --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238536
This update fixes an issue where tax calculations were incorrectly distributing negative amounts, particularly in scenarios involving multiple line items. The change ensures that tax factors are assigned to the correct base lines, resolving a problem that previously resulted in inaccurate tax totals, specifically impacting Mexican currency calculations.
Original PR description
The factors are sorted so zipping them with base_lines won't assign the factor to the correct base_line. We need to use the index in it instead to reorder them as previously. Before this commit, in Mexico, when having lines with price_unit set as l1=326.4, l2=24.0, l3=172.8, l4=691.2 and a negative line of 1149.6, this last line was distributed accross the positive lines. However, the negative amount of l4 was wrongly assigned to l1 making this line negative at the end because of the reordering of lines in _split_base_lines. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239583
This update ensures Odoo correctly handles negative invoice lines in Mexico's CFDI e-invoicing format. Previously, the system struggled when negative line amounts exceeded the total of positive lines. This change adds a test to verify proper distribution of these negative amounts, maintaining compliance with Mexican regulations.
Original PR description
In mexico, you cannot send any negative lines in the CFDI (Mexican e-invoicing). The negative lines are distributed accross the positive ones in _dispatch_global_discount_lines. This test ensures the negative line is well distributed when its amount is higher than the sum of multiple positive lines. Forward-Port-Of: odoo/enterprise#101888
This update fixes a bug in Odoo's logging system that caused errors when handling complex log messages, specifically those containing mappings. The fix moves the message formatting logic to a more robust location, ensuring consistent and reliable logging across the system. This improves overall system stability and reduces the risk of unexpected errors.
Original PR description
When `lower_logging` encounters a `LogRecord.args: Mapping`, it fucks up and strips out all the values keeping only the mapping keys (as a tuple), which then breaks when trying to format it in `LogRecord.msg`. Fix the issue by moving the entire message munging into, appropriately, the formatter: `getMessage` will do the `str.__mod__` call at which point we don't need to deal with the args at all, then `formatMessage` generates the full message line (not including the stack traces from `exc_info` and `stack_info`, those are added in the second half of `Formatter.format`). https://runbot.odoo.com/odoo/error/234669 Forward-Port-Of: odoo/odoo#239560 Forward-Port-Of: odoo/odoo#239410
This update corrects an issue where customer addresses were duplicated when printing Sale Orders using the DIN5008 document layout. This occurred when the 'Customer Addresses' setting was disabled. The fix ensures addresses are only displayed once, improving the clarity and accuracy of printed documents.
Original PR description
## Issue: When DIN5008 is selected as the document layout, printing a Sale Order may show the customer address twice ## Cause: The address is first added by `external_layout_din5008`, then again by `report_saleorder_document` This duplication only makes sense when the partner address differs from the invoice or delivery address If the Customer Addresses setting is disabled, displaying it multiple times is unnecessary ## Steps to reproduce: - Install a company using DIN 5008 (e.g., l10n_de) - Select the DE company and go to Settings - Disable `Customer addresses` and ensure the document layout is set to DIN 5008 - Create a Quotation with any customer and product - Print the PDF → the address appears twice before the fix opw-5176593 Forward-Port-Of: odoo/odoo#235441
This update resolves an issue where users couldn't complete registration for events if the standard 'Name' question was removed. The fix ensures that the system handles missing event names gracefully, preventing an error and allowing users to proceed to the payment stage.
Original PR description
When registering to an event, customers are asked questions before reaching the payment page. By default, a *Name* question is included, but it can be removed by the organizer of the event. If the…
When registering to an event, customers are asked questions before reaching the payment page. By default, a *Name* question is included, but it can be removed by the organizer of the event. If the *Name* question is removed, but a name is asked in the delivery form, Odoo will try to compare the (missing) name from the event's questions with the (required) name from the delivery form.
https://github.com/odoo/odoo/blob/828a9504c7d43aa35ed91141268d04e0a55782c3/addons/portal/controllers/portal.py#L551
The issue is that if there's no *Name* question among the event's questions, a `res.partner` with its `name` field set to `False` is created. When attempting to call `.strip()` on its name, an `AttributeError` is raised (*'bool' object has no attribut 'strip'*).
This fix prevents the error by considering the name field as an empty string in case no name is provided.
### Steps to reproduce:
1. Install *Online Event Ticketing* (`website_event_sale`)
2. In Settings > Website, set *Sign in/up at checkout* to *Disabled (buy as guest)*
3. In Events, create a new Event
- Give it any name
- Add a product line for the Event Registration with a price greater than 0
- In the *Questions* tab, remove the *Name* question
- Click the *Go to website* smart button and publish the event
4. On the website, in incognito mode:
- Click *Events*
- Click the new event we created in Step 3
- Click *Register*, (set the quantity to one ticket,) click *register*
- Answer the questions (there should **not** be a *Name* question) and click *Confirm Registration*
- Fill out the required fields of the delivery form (there **should** be a *Name* field)
- Open the console, then click *Confirm* in the delivery form: An error appears, and the Payment page does not appear
opw-5259781
Forward-Port-Of: odoo/odoo#237154This update ensures the tests within the Web Studio module accurately reflect a recent change in how suggested recipients are handled. The change allows the method to return the recipient's display name under specific conditions. This update maintains the stability and reliability of the Web Studio functionality.
Original PR description
From the related community commit, the _message_add_suggested_recipient method is modified to also return display name under certain condition. This commit adapts the test inside web_studio to align with the method's change. Task-4812554 Forward-Port-Of: odoo/enterprise#96219 Forward-Port-Of: odoo/enterprise#91003
This update ensures that a 'partner ID' is always provided when creating SEPA payments. Previously, missing this ID caused errors during batch payment creation, potentially disrupting payment processing. This change improves the reliability and stability of our payment system.
Original PR description
When doing a payment with SEPA as the payment method, and then create a batch payment out of it. It could happen that the partner_id of the payment was not set. That would cause a traceback because in the _get_CdtTrfTxInf we do a browse on the partner to use it later on. But since the partner is False, we have an empty record set. task-5213880 Forward-Port-Of: odoo/enterprise#98249
This update resolves an issue where adding a second tax to a bank reconciliation line would remove the first. Previously, the system couldn't handle multiple taxes on a single line, leading to data inconsistencies. This change ensures accurate tax calculations for bank reconciliation reports.
Original PR description
This commit will allow to add multiple taxes on a move line in the bank rec widget. For the moment, when having a line with a tax, and then add one more. The previous tax get deleted. task-5081786 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#226867
This update enhances the accuracy of tax calculations within the bank reconciliation widget. It prevents accidental tax line deletions, automatically creates tax lines when default taxes are added, and ensures correct tax recomputation across various scenarios. This improves the reliability of financial reporting.
Original PR description
This commit will do multiple things: - Prevent users from deleting a tax line - Adding default taxes on an account will create a tax line for it - Removing a taxes from a line will recompute the taxes correctly - Removing and adding new taxes will recompute the taxes correctly - Removing a base line that has a tax linked to it will recompute the taxes correctly - Add a simple way for users to delete the tax directly from the ui without going to the edit line button task: 5081786 Forward-Port-Of: odoo/enterprise#94552
This update corrects a bug that prevented multiple gift cards from being created correctly when sold in a single POS order. Previously, only one gift card with the total amount was generated. This fix ensures that multiple gift cards are created with the correct individual amounts, improving the accuracy of gift card transactions.
Original PR description
This fix addresses an issue where selling multiple gift cards in a single POS order results in only one gift card being created with the total amount, instead of multiple gift cards with the correct…
This fix addresses an issue where selling multiple gift cards in a single POS order results in only one gift card being created with the total amount, instead of multiple gift cards with the correct individual amounts. Step to reproduce: - Create a new gift card and enable the option to sell this card in the POS - Open the POS and try to sell multiple gift cards in the same order - Validate the order - Check the generated gift cards, only one gift card will be created with the total amount instead of multiple gift cards with the correct individual amounts This issue occurs because the field `reward_point_split` is missing from the kanban view of loyalty rules. So, when creating a new gift card, this field value, which should be True for gift cards, is not returned by the onchange method, and since nothing triggers a new computation unless the program type is changed, the field remains False. This fix simply restores this field in the kanban view (like before https://github.com/odoo/odoo/pull/172561) so that its value is correctly taken into account when creating a new gift card. opw-5103652 Forward-Port-Of: odoo/odoo#238993
This update fixes an issue where customer coupon emails were sending expiration dates in a technical format instead of the localized date format for the customer's language. The change ensures that customers receive coupon information with dates displayed in their preferred format, improving the user experience. This was achieved by updating the email template to use the customer's language settings for date formatting.
Original PR description
Steps to reproduce: 1. Install `loyalty` and `sale_management` 2. Activate another language with another date format, eg. English (AU) 3. Set that language on a contact 4. Sales > Product > Discount…
Steps to reproduce: 1. Install `loyalty` and `sale_management` 2. Activate another language with another date format, eg. English (AU) 3. Set that language on a contact 4. Sales > Product > Discount & loyalty 5. Create a record with program type coupons 6. Generate a coupon for that AU contact with an expiration date Issue: The coupon email received by the customer shows the expiration date using the yyyy-MM-dd format, and the attachment shows the same technical format instead of the customer’s localized date format. Cause: We are not using a formatted date according to the customer before: Customer with English AU language <img width="601" height="563" alt="image" src="https://github.com/user-attachments/assets/faea2840-aca6-4850-bfc9-b0d24da65a3b" /> <img width="1510" height="883" alt="image" src="https://github.com/user-attachments/assets/b0ebc0cc-6243-450d-ad12-cecda4858e26" /> After: <img width="603" height="543" alt="image" src="https://github.com/user-attachments/assets/5be2332b-3237-4ce5-8122-0766cd274650" /> <img width="1482" height="886" alt="image" src="https://github.com/user-attachments/assets/99d31b4c-33fa-4f92-9970-56720181911e" /> opw-5247621 Forward-Port-Of: odoo/odoo#237880
This update resolves a limitation preventing non-administrator users from utilizing the delivery_usps_rest module. By implementing sudo() calls, the module now grants necessary access to the USPS Rest API, expanding functionality without requiring elevated user permissions. This improves usability for a wider range of users.
Original PR description
Non-admin users are currently unable to use the delivery_usps_rest module because several fields are limited to the "base.group_system" group. It's obviously not feasible to give everyone the "Role / Administrator" role. This PR makes necessary sudo() calls the same way that delivery_ups_rest does. Forward-Port-Of: odoo/enterprise#101163
17 changes
Enhancements to existing features
This update enhances the Point of Sale system by automatically saving log messages to the user's browser. Clients can now easily download these logs and share them with our support team for faster troubleshooting. This provides valuable data for diagnosing and resolving POS issues.
Original PR description
Enterprise PR: https://github.com/odoo/enterprise/pull/100183 This commit extends the `logPosMessage` function in the POS to also save each log message to a `Logger` instance (which persists the logs for 24 hours in the browser storage). A download button is added to download these logs, which the client could then send on to the support team. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This update fixes an issue where POS invoices were incorrectly defaulting to the customer's first delivery address instead of the address selected during order creation. The change ensures that invoices generated from POS orders accurately reflect the customer's chosen delivery address, aligning with the standard 'sale' module behavior. This improves order accuracy and customer satisfaction.
Original PR description
Currently, an incorrect shipping address is assigned to invoices generated from POS orders when the customer has multiple delivery addresses. **Steps to reproduce:** - Install the `point_of_sale` and…
Currently, an incorrect shipping address is assigned to invoices generated from POS orders when the customer has multiple delivery addresses. **Steps to reproduce:** - Install the `point_of_sale` and `contacts` modules. - Enable `Customer Addresses` from the settings. - Create a contact with `two` delivery addresses. - Open POS and create an order using the `second delivery address` as the customer. - Confirm the order with the `invoice`. - Observe the `shipping address` on the invoice. **Observation:** The invoice incorrectly shows the first delivery address instead of the second delivery address. **Cause:** At invoice creation in POS, only `partner_id` is set and `partner_shipping_id` is missing at [1]. As a result, the invoice defaults to the customer's first delivery address instead of the delivery address selected in POS. **Fix:** This commit adds `partner_shipping_id` to the invoice values to ensure the POS invoice uses the exact delivery address selected during order creation. same as the `sale` module behaviour. [1]: https://github.com/odoo/odoo/blob/1d1cd8648ed1c3f13febbde8d48e28928e18583f/addons/point_of_sale/models/pos_order.py#L667-L684 opw-5350137 Forward-Port-Of: odoo/odoo#239663 Forward-Port-Of: odoo/odoo#238055
This update fixes an issue where the EDI status for Brazilian e-invoices didn't accurately reflect cancellation requests. The change ensures the status is correctly set to 'Cancelled' after a cancellation is processed, improving the accuracy of EDI tracking and compliance with Brazilian regulations. The fix was implemented by moving the status update to the cancellation process itself.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for…
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for l10n_br](https://docs.google.com/document/d/1CSUKpnyhty5WBqUDBE-7dGvu0qxaC5vQ0loz0fYNg04/edit?tab=t.0) * Confirm the invoice and **send it to e-invoice (Brazil)**. * Confirm the **Brazil E-Invoice Status** shows **'Accepted'**. * Click **Request Cancellation**, enter a cancellation reason, and submit the request. **Observed behavior:** * The invoice moves to **Cancelled** state. * The cancellation XML is generated and attached in the chatter. * SEFAZ returns a successful cancellation response. * However, the **BR EDI Status** becomes **empty**, instead of reflecting **'Cancelled'**. **Cause:** * In the wizard `l10n_br_edi.invoice.update`, both `_finalize_update()` and `_submit_services()` assign `l10n_br_last_edi_status = 'cancelled'` **before** calling `button_cancel()`. * `button_cancel()` internally triggers `button_draft()` for posted invoices. * The Brazil EDI override of `button_draft()` resets `l10n_br_last_edi_status = False`. * This clears the status that was just set, leaving the field blank. **Fix:** * move `l10n_br_last_edi_status = "cancelled"` to `button_cancel()` method. opw-5378542 Forward-Port-Of: odoo/enterprise#101438
This update resolves an issue where users were encountering errors when adding an XML encoding declaration in the Odoo Studio XML editor. The fix ensures that the system gracefully handles this invalid input by displaying a clear error message, preventing the application from crashing. This improves the user experience and stability of the Studio environment.
Original PR description
Currently, an error occurs when a user includes an XML encoding declaration in the studio XML editor. **Steps to produce:** - Install the `web_studio` module and enable `developer mode` - Open `Apps`…
Currently, an error occurs when a user includes an XML encoding declaration in the studio XML editor. **Steps to produce:** - Install the `web_studio` module and enable `developer mode` - Open `Apps` > `studio` > `view` > `</> xml` - Declare encoding as: `<?xml version='1.0' encoding='utf-8'?>` and click `save` **Error:** `ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.` **Root cause:** At [1], an error is raised when the XML declaration contains an `encoding` attribute, as encoding declarations are invalid in Unicode strings. **Fix:** This commit ensures that a `UserError` is raised, improving the error message clarity. A similar fix was applied in https://github.com/odoo/odoo/pull/205324. [1]: https://github.com/odoo/odoo/blob/8a22b6ca09e1da3ccba3540bc4851a5174e035cc/odoo/tools/translate.py#L316 sentry-6981234548 Forward-Port-Of: odoo/odoo#239630 Forward-Port-Of: odoo/odoo#233571
This update resolves an issue where users encountered an error when removing a combo name and then attempting to edit its configuration. The fix ensures that the 'Edit Configuration' option is only displayed when a product template is associated with the combo, improving usability and preventing unexpected errors.
Original PR description
Currently, when a user adds a combo to an order line, and remove the name of combo and click on Edit Configuration (pencil icon) error is encountered. Steps to replicate: - Install `sale_management`…
Currently, when a user adds a combo to an order line, and remove the name of combo and click on Edit Configuration (pencil icon) error is encountered. Steps to replicate: - Install `sale_management` with demo and create a new SO. - Add a combo product and remove the combo name and click Edit Configuration (pencil icon). Error: `TypeError: SaleProductConfiguratorController.sale_combo_configurator_get_data() missing 1 required positional argument: 'product_template_id'` Cause: - When a user clicks on Edit configuration, the client-side JavaScript makes an RPC call to the server, targeting the `sale_combo_configurator_get_data()` which expects `product_template_id` at [1] and since it is removed from order line the error is encountered. Solution: - Changed the content of method `isCombo()` to use the product_template_id to make sure the Edit Configuration is only visible when product template is present. Similar PR for reference: https://github.com/odoo/odoo/pull/217464 [1]: https://github.com/odoo/odoo/blob/fa4307b9758800f26c9ee87cf3698fd60bfd1ab5/addons/sale/controllers/combo_configurator.py#L12-L14 No ID --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238536
This update resolves an issue where Odoo's logging system incorrectly handled log records with complex data (like mappings). The fix moves the message formatting process to a more reliable location, ensuring consistent and accurate logging output. This improves overall system stability and reduces potential errors.
Original PR description
When `lower_logging` encounters a `LogRecord.args: Mapping`, it fucks up and strips out all the values keeping only the mapping keys (as a tuple), which then breaks when trying to format it in `LogRecord.msg`. Fix the issue by moving the entire message munging into, appropriately, the formatter: `getMessage` will do the `str.__mod__` call at which point we don't need to deal with the args at all, then `formatMessage` generates the full message line (not including the stack traces from `exc_info` and `stack_info`, those are added in the second half of `Formatter.format`). https://runbot.odoo.com/odoo/error/234669 Forward-Port-Of: odoo/odoo#239560 Forward-Port-Of: odoo/odoo#239410
This update corrects a calculation error related to Italian VAT withholding taxes (RA Agenti). Specifically, it now accurately applies a 23% rate on 20% of the base amount, as required by Italian regulations. The change ensures correct export of VAT data for Italian businesses.
Original PR description
This commit adds a new RA Agenti withholding tax for the case where 23% is applied on 20% of the base (effective –4.6%) and ensure it is exported using the 23% rate. Key changes: - Added new tax: –4.6% (23% su 20% RA Agenti) - Updated name and invoice label of the existing –11.5% tax - Updated EDI export logic to map –11.5% → 23% and –4.6% → 23% task-5258180 Forward-Port-Of: odoo/odoo#239206 Forward-Port-Of: odoo/odoo#236195
This update corrects a printing issue where customer addresses were duplicated on DIN 5008 Sale Order reports. The fix ensures addresses are only displayed once, specifically when the 'Customer Addresses' setting is disabled, streamlining report output and improving data clarity.
Original PR description
## Issue: When DIN5008 is selected as the document layout, printing a Sale Order may show the customer address twice ## Cause: The address is first added by `external_layout_din5008`, then again by `report_saleorder_document` This duplication only makes sense when the partner address differs from the invoice or delivery address If the Customer Addresses setting is disabled, displaying it multiple times is unnecessary ## Steps to reproduce: - Install a company using DIN 5008 (e.g., l10n_de) - Select the DE company and go to Settings - Disable `Customer addresses` and ensure the document layout is set to DIN 5008 - Create a Quotation with any customer and product - Print the PDF → the address appears twice before the fix opw-5176593 Forward-Port-Of: odoo/odoo#235441
This update resolves an issue where users couldn't proceed to the payment page if the event's 'Name' question was removed. The fix ensures that the system handles missing names gracefully by treating them as empty strings, preventing an error and allowing registration to complete.
Original PR description
When registering to an event, customers are asked questions before reaching the payment page. By default, a *Name* question is included, but it can be removed by the organizer of the event. If the…
When registering to an event, customers are asked questions before reaching the payment page. By default, a *Name* question is included, but it can be removed by the organizer of the event. If the *Name* question is removed, but a name is asked in the delivery form, Odoo will try to compare the (missing) name from the event's questions with the (required) name from the delivery form.
https://github.com/odoo/odoo/blob/828a9504c7d43aa35ed91141268d04e0a55782c3/addons/portal/controllers/portal.py#L551
The issue is that if there's no *Name* question among the event's questions, a `res.partner` with its `name` field set to `False` is created. When attempting to call `.strip()` on its name, an `AttributeError` is raised (*'bool' object has no attribut 'strip'*).
This fix prevents the error by considering the name field as an empty string in case no name is provided.
### Steps to reproduce:
1. Install *Online Event Ticketing* (`website_event_sale`)
2. In Settings > Website, set *Sign in/up at checkout* to *Disabled (buy as guest)*
3. In Events, create a new Event
- Give it any name
- Add a product line for the Event Registration with a price greater than 0
- In the *Questions* tab, remove the *Name* question
- Click the *Go to website* smart button and publish the event
4. On the website, in incognito mode:
- Click *Events*
- Click the new event we created in Step 3
- Click *Register*, (set the quantity to one ticket,) click *register*
- Answer the questions (there should **not** be a *Name* question) and click *Confirm Registration*
- Fill out the required fields of the delivery form (there **should** be a *Name* field)
- Open the console, then click *Confirm* in the delivery form: An error appears, and the Payment page does not appear
opw-5259781
Forward-Port-Of: odoo/odoo#237154This update resolves an issue where the applicant's email address was incorrectly duplicated in recruitment communications. The fix ensures that the latest email address associated with an applicant is used, preventing confusion and improving the accuracy of email notifications. This enhances the overall applicant experience.
Original PR description
Steps to reproduce: 1- Create a job position and then create an applicant for the position with an email address. 2- Change email from the applicant form. 3- Use the chatter to send an email. 4- As seen, both old email and new email address are used as recipient addresses which shouldn't be the case. The cause was that it failed to save the new email on the partner_id associated to the hr_applicant. This was fixed by modifying the inverse function to allow the values to be modified even if already existant. task-5269650 Forward-Port-Of: odoo/odoo#236208
This update ensures payments processed with SEPA have a required 'partner ID' set. Previously, missing this ID caused errors during batch payment creation, potentially disrupting financial transactions. This change improves the stability and reliability of our payment processing system.
Original PR description
When doing a payment with SEPA as the payment method, and then create a batch payment out of it. It could happen that the partner_id of the payment was not set. That would cause a traceback because in the _get_CdtTrfTxInf we do a browse on the partner to use it later on. But since the partner is False, we have an empty record set. task-5213880 Forward-Port-Of: odoo/enterprise#98249
This update fixes an issue where the Partena export file incorrectly included the company code of the active company when generating exports for inactive companies. The change ensures the correct Partena code is used by referencing the specific company record instead of the active company, improving data accuracy for payroll reporting.
Original PR description
### Issue: In multicompany, when we generate the Partena export file of the 'not active' company, the partena code of the active company is inputted in the file. ### Steps to reproduce: - Install…
### Issue: In multicompany, when we generate the Partena export file of the 'not active' company, the partena code of the active company is inputted in the file. ### Steps to reproduce: - Install 'l10n_be_hr_payroll_partena' and switch to a Belgian company - Make sure the company has a "Partena Affiliation Number" - Create an employee for this company, with a "Partena code" - Create a contract for this employee, set it a running - Create a new Belgian company with a different "Partena Affiliation Number" - Activate both Belgian companies, but set the second one as active - Payroll > Reporting > Export work entries to Partena - Create a new one, populate it with the employee just created - Click "Generate Export File" ### Cause: When getting the data for the CSV file, we use `self.env.company` which is the active company. So when this company is not the one of the export record, we input the wrong code values. ### Solution: Use `self.company_id` instead of `self.env.company_id`. Also adds the test class with basic tests. opw-5345786 Forward-Port-Of: odoo/enterprise#101110
This update corrects a bug where review messages were incorrectly displayed for administrators. The fix ensures that administrators always edit their own review messages when using the 'Edit Review' button. This improves the user experience for administrators managing reviews.
Original PR description
How to reproduce: - Log as Mitchell Admin - Edit Marc Demo review using the contextual edit button - Click on save to update the review - Click on the button "Edit Review" on the top The review modals opens with the message of Marc Demo instead of the message of Mitchell Admin. The fix ensures you always edit your review message when clicking on "Edit review" button. Note: this is only possible with admin user as other users cannot edit messages of other users. So unfortunately, we had to create a new tours as we can't add steps to test_course_reviews_elearning_officer (not running as admin). An alternative would have been to extend test_fullscreen_slide_text_highlights and rename it. Task-5170310 Forward-Port-Of: odoo/odoo#238944 Forward-Port-Of: odoo/odoo#232696
This update corrects a bug that prevented multiple gift cards from being correctly generated when selling multiple gift cards in a single POS order. Previously, only one gift card with the total amount was created. This fix ensures accurate reporting of gift card sales, improving data integrity and customer satisfaction.
Original PR description
This fix addresses an issue where selling multiple gift cards in a single POS order results in only one gift card being created with the total amount, instead of multiple gift cards with the correct…
This fix addresses an issue where selling multiple gift cards in a single POS order results in only one gift card being created with the total amount, instead of multiple gift cards with the correct individual amounts. Step to reproduce: - Create a new gift card and enable the option to sell this card in the POS - Open the POS and try to sell multiple gift cards in the same order - Validate the order - Check the generated gift cards, only one gift card will be created with the total amount instead of multiple gift cards with the correct individual amounts This issue occurs because the field `reward_point_split` is missing from the kanban view of loyalty rules. So, when creating a new gift card, this field value, which should be True for gift cards, is not returned by the onchange method, and since nothing triggers a new computation unless the program type is changed, the field remains False. This fix simply restores this field in the kanban view (like before https://github.com/odoo/odoo/pull/172561) so that its value is correctly taken into account when creating a new gift card. opw-5103652 Forward-Port-Of: odoo/odoo#238993
This update ensures that coupon emails sent to customers display the expiration date in the localized format (e.g., yyyy-MM-dd) based on their language settings. Previously, the emails used a technical date format, leading to confusion. This change improves the customer experience and ensures accurate information delivery.
Original PR description
Steps to reproduce: 1. Install `loyalty` and `sale_management` 2. Activate another language with another date format, eg. English (AU) 3. Set that language on a contact 4. Sales > Product > Discount…
Steps to reproduce: 1. Install `loyalty` and `sale_management` 2. Activate another language with another date format, eg. English (AU) 3. Set that language on a contact 4. Sales > Product > Discount & loyalty 5. Create a record with program type coupons 6. Generate a coupon for that AU contact with an expiration date Issue: The coupon email received by the customer shows the expiration date using the yyyy-MM-dd format, and the attachment shows the same technical format instead of the customer’s localized date format. Cause: We are not using a formatted date according to the customer before: Customer with English AU language <img width="601" height="563" alt="image" src="https://github.com/user-attachments/assets/faea2840-aca6-4850-bfc9-b0d24da65a3b" /> <img width="1510" height="883" alt="image" src="https://github.com/user-attachments/assets/b0ebc0cc-6243-450d-ad12-cecda4858e26" /> After: <img width="603" height="543" alt="image" src="https://github.com/user-attachments/assets/5be2332b-3237-4ce5-8122-0766cd274650" /> <img width="1482" height="886" alt="image" src="https://github.com/user-attachments/assets/99d31b4c-33fa-4f92-9970-56720181911e" /> opw-5247621 Forward-Port-Of: odoo/odoo#237880
This fix resolves an issue where users connected to a POS session couldn't access the backend after logging out and back in. Previously, access was limited to the initial user who opened the POS. Now, connected users can access the backend regardless of who initially opened the session, improving workflow efficiency.
Original PR description
Currently a user that connected to a pos user cannot go backend if he was not the person who opened the session the first time. Steps to reproduce: ------------------- * Modify settings of the shop…
Currently a user that connected to a pos user cannot go backend if he was not the person who opened the session the first time. Steps to reproduce: ------------------- * Modify settings of the shop to use employee feature * Make sure admin and demo can access the shop, set them advenced employee for example. * Logged as Mitchell Admin, open the pos (It should have been closed before) * Use Mitchel admin employee * Complete cash control * Go backend * Log out * Log back in with Marc Demo * Enter the shop (it was already "opened" by Admin) * Use Marc demo employee * Now try to see the backend button > Observation: Backend button is not available Why the fix: ------------ Quoting this commit: https://github.com/odoo/odoo/commit/61df2871e1aac0144d26022a2a49c75ea9ecad4a > Now, the only employees that can go back to the backend are those binded to the user connected. However, `this.pos.session.user_id` only reflects the user who opened the pos the first time, in our case Mitchell Admin. It does not represent the connected user. opw-5276950 Forward-Port-Of: odoo/odoo#239627 Forward-Port-Of: odoo/odoo#238636
This update fixes a bug where credit notes weren't being properly accounted for during invoice settlement. The change ensures credit notes are now correctly processed, allowing for accurate reconciliation of payments and reducing potential discrepancies in financial reporting. This improves the reliability of the POS settlement process.
Original PR description
We had a bug when settling invoices and credit notes of a customer. The credit notes where not correctly computed. Steps to reproduce: ------------------- In accounting: * Create and confirm a customer invoice for a total of 10$. * Create and confirm for the same customer a credit note for a total of 2$. In POS: * In a seesion, open the customer selection menu. * In the burger menu at the right of our customer, select Settle invioces. * Select our invoice and credit note. > Observation: The credit note was previously seen as an amount to pay. Why the fix: ------------ Recomputing updates existing credit notes to use the signed residual logic. The domain change allows credit notes with negative pos_amount_unsettled to appear. After these changes, credit notes should appear in the "Settle invoices" dialog with negative amounts, and selecting them will create negative lines that reduce the total. opw-5257884
7 changes
Enhancements to existing features
This update enhances the formatting of tax amounts in invoices for the Co-dian localization module. It standardizes the float format used in account_edi_common, ensuring accurate and consistent reporting for tax calculations related to Co-dian regulations. This improves the reliability of financial data for Co-dian users.
Original PR description
Forward-Port-Of: odoo/enterprise#101288
Resolved issues and error corrections
This update fixes an issue where the EDI status for Brazilian e-invoices didn't accurately reflect cancellation requests. The change ensures the status is correctly set to 'Cancelled' after a cancellation is processed, improving the accuracy of EDI tracking and compliance with Brazilian regulations.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for…
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for l10n_br](https://docs.google.com/document/d/1CSUKpnyhty5WBqUDBE-7dGvu0qxaC5vQ0loz0fYNg04/edit?tab=t.0) * Confirm the invoice and **send it to e-invoice (Brazil)**. * Confirm the **Brazil E-Invoice Status** shows **'Accepted'**. * Click **Request Cancellation**, enter a cancellation reason, and submit the request. **Observed behavior:** * The invoice moves to **Cancelled** state. * The cancellation XML is generated and attached in the chatter. * SEFAZ returns a successful cancellation response. * However, the **BR EDI Status** becomes **empty**, instead of reflecting **'Cancelled'**. **Cause:** * In the wizard `l10n_br_edi.invoice.update`, both `_finalize_update()` and `_submit_services()` assign `l10n_br_last_edi_status = 'cancelled'` **before** calling `button_cancel()`. * `button_cancel()` internally triggers `button_draft()` for posted invoices. * The Brazil EDI override of `button_draft()` resets `l10n_br_last_edi_status = False`. * This clears the status that was just set, leaving the field blank. **Fix:** * move `l10n_br_last_edi_status = "cancelled"` to `button_cancel()` method. opw-5378542 Forward-Port-Of: odoo/enterprise#101438
This update ensures that a 'partner ID' is always set when processing SEPA payments. Previously, a missing partner ID could cause errors, preventing the creation of batch payments. This change improves the stability and reliability of our payment processing system.
Original PR description
When doing a payment with SEPA as the payment method, and then create a batch payment out of it. It could happen that the partner_id of the payment was not set. That would cause a traceback because in the _get_CdtTrfTxInf we do a browse on the partner to use it later on. But since the partner is False, we have an empty record set. task-5213880 Forward-Port-Of: odoo/enterprise#98249
This update fixes an issue where the Partena export file incorrectly included the company code of the active company when generating exports for inactive companies. The change ensures the correct Partena code is used by referencing the specific company record instead of the active company, improving data accuracy for payroll reporting.
Original PR description
### Issue: In multicompany, when we generate the Partena export file of the 'not active' company, the partena code of the active company is inputted in the file. ### Steps to reproduce: - Install…
### Issue: In multicompany, when we generate the Partena export file of the 'not active' company, the partena code of the active company is inputted in the file. ### Steps to reproduce: - Install 'l10n_be_hr_payroll_partena' and switch to a Belgian company - Make sure the company has a "Partena Affiliation Number" - Create an employee for this company, with a "Partena code" - Create a contract for this employee, set it a running - Create a new Belgian company with a different "Partena Affiliation Number" - Activate both Belgian companies, but set the second one as active - Payroll > Reporting > Export work entries to Partena - Create a new one, populate it with the employee just created - Click "Generate Export File" ### Cause: When getting the data for the CSV file, we use `self.env.company` which is the active company. So when this company is not the one of the export record, we input the wrong code values. ### Solution: Use `self.company_id` instead of `self.env.company_id`. Also adds the test class with basic tests. opw-5345786 Forward-Port-Of: odoo/enterprise#101110
This update resolves an issue where exporting batch payments with mixed payment types (IBAN, Bankgiro, etc.) was generating incorrect XML files. The team reverted a faulty fix and now focuses solely on generating the necessary zip file, ensuring accurate XML formatting for Swedish payment exports. This improves the reliability of the payment processing workflow.
Original PR description
Here https://github.com/odoo/enterprise/pull/95463, we add the possibility to export
batch payments with mixed IBAN and Bankgiro/Plusgiro/BBAN payments, but this introduced
few bug in the xml format.
The reason is, we were using new custom logics and not the main one. The problem is
the custom logics is wrong, not the main one.
This commit remove most of the custom logics we added and use all the main one.
This has been done by:
1 - Reverting the original commit
2 - Adding only the zip file generation, passing a context key to know if we are
with bban or iban payments.
opw-5181340
Forward-Port-Of: odoo/enterprise#100014This update resolves a limitation preventing non-administrator users from utilizing the delivery_usps_rest module. By implementing sudo() calls, the module now grants necessary access to the USPS Rest API, expanding functionality without requiring elevated user permissions. This improves usability for a wider range of users.
Original PR description
Non-admin users are currently unable to use the delivery_usps_rest module because several fields are limited to the "base.group_system" group. It's obviously not feasible to give everyone the "Role / Administrator" role. This PR makes necessary sudo() calls the same way that delivery_ups_rest does. Forward-Port-Of: odoo/enterprise#101163
This update fixes a potential error that could prevent invoices from being confirmed when specific currency and pricing settings are used. The fix adds a check to ensure invoice amounts are non-zero before currency calculations, preventing a division-by-zero error. This ensures smoother invoice processing and avoids disruptions to financial transactions.
Original PR description
Steps to reproduce: -------------------- 1. Install l10n_cl and switch to the CL company 2. Create a new invoice: - Change the currency to a value different from the company currency (e.g., from CLP to USD) - Add an invoice line with a price value of 0 - Remove the default tax value 3. Try to confirm the invoice Issue: ------ A traceback occurs: `ZeroDivisionError: float division by zero` Cause: ------ Since the price value is 0, the `amount_total` of the move becomes 0. When computing the currency rate, it tries to divides by `amount_total`, resulting in a ZeroDivisionError. Solution: --------- Add a conditional check before division to ensure the `amount_total` is non-zero Related community PR: https://github.com/odoo/odoo/pull/235252 opw-5247058 Forward-Port-Of: odoo/enterprise#101587 Forward-Port-Of: odoo/enterprise#99518
27 changes
New functionality added to Odoo
This update introduces a new module, `l10n_br_edi_extract`, to automatically map data from Brazilian electronic invoices (NFS-e). It includes new templates to handle different invoice formats and moves key verification information to improve visibility in vendor bills. This enhancement streamlines the process of handling Brazilian tax documents within Odoo.
Original PR description
- This PR introduces a new module `l10n_br_edi_extract` to map the extracted NFS-e data into the appropriate fields. - Added multiple new templates in the `ocr-template` repository to handle different NFS-e PDF layouts. (All templates are inside `l10n_br` folder) - Relocated the field `l10n_br_nfse_verification` from the `sale_info_group` (not visible on vendor bills) to be placed under the `l10n_br_access_key` field, ensuring the information is accessible in vendor bills. - Added `template_br` in the newly created module to set the default value False of `extract_single_line_per_tax` for existing as well as newly created companies. task-4753990 ~Community PR: https://github.com/odoo/odoo/pull/230974~
This update introduces the ability to generate and submit electronic delivery guides (e-Remitos) required for businesses in Uruguay. Users can now create these documents directly within Odoo, streamlining the process of fulfilling sales orders and integrating with the Uruguayan tax authority (DGI). This ensures compliance with local regulations and improves operational efficiency.
Original PR description
This pull request introduces a new Odoo module, which adds support for compliant electronic delivery guides (e-Remitos) for Uruguay, integrating with the EDI system and enhancing stock picking…
This pull request introduces a new Odoo module, which adds support for compliant electronic delivery guides (e-Remitos) for Uruguay, integrating with the EDI system and enhancing stock picking operations. The main changes include configuration for managing and generating e-Remitos according to Uruguayan fiscal requirements. **Steps to create an e-Remito** 1. Install l10n_uy_edi_stock 2. Create a new delivery order. 3. Select a value for the field "Type of Operation". This will indicate that we are creating the electronic document, and also add a tab named "UY EDI" with some configurations for the e-Remito. <img width="1231" height="585" alt="image" src="https://github.com/user-attachments/assets/c4c0baa8-8f9b-4453-b0c0-ce1b1503c536" /> <img width="1211" height="565" alt="image" src="https://github.com/user-attachments/assets/c827f787-27ed-4d55-a660-42a6b617e7df" /> The field "Addenda and disclosures" works as in invoices, the user will be able to select the addenda to add to the e-Remito report. The field "EDI Reference" is used to indicate that the e-Remito is a correction of another, so it will suggest previous e-Remitos made for the same partner, and it will add "Correction of e-Rem XXX" on the addenda. 4. Validate the delivery order and click on "Create Delivery Guide" button. This will send the document to DGI for validation and add the PDF returned by Uruware. <img width="1705" height="618" alt="image" src="https://github.com/user-attachments/assets/8bb36b08-ab08-4240-b3bb-f593a7f2a462" /> Odoo Task 1334 Adhoc Task 53147 Forward-Port-Of: odoo/enterprise#100332 Forward-Port-Of: odoo/enterprise#89706
Enhancements to existing features
This update adds a new 'Update Document' button within sign templates, allowing users to easily reuse common layouts across multiple sign templates. By duplicating a template and replacing the document, users can streamline the process of creating sign items and ensure consistency, saving time and effort.
Original PR description
Adds the 'Update Document' button in the template edition for allowing changing the current document to another pdf by duplicating the current template and replacing the document in the new template. This is a super useful feature for re-using common layouts of sign items between different sign templates. task-5254140 Forward-Port-Of: odoo/enterprise#99102
This update enhances the website generator's efficiency by proactively verifying URLs before sending requests to the scraper. This prevents unnecessary requests to invalid or blocked URLs, improving performance and reducing potential errors. The check is now performed on the IAP server for security and efficiency.
Original PR description
This PR adds the client side verification of an url for the request we make to generate a website using the website scraper. **The goal is to filter all the unwanted requests (invalid urls, banned urls) before launching the scraper process.** The check is done on the IAP server, and retrieved on the DB. The reason is that we don't want to send a request directly from the db [as this was already discussed](https://github.com/odoo/enterprise/pull/92724). Since the IAP server is also the one that will eventually do the scraping request, it also makes more sense that it is the one to check (to avoid the case where odooDB has access to an URL and IAP server does not). Previous PR was in master, but since we only change js component, we can modify 19.0 directly. Link : [Master PR](https://github.com/odoo/enterprise/pull/99433) Forward-Port-Of: odoo/enterprise#100967
This update enhances the AI module's ability to process large text files by automatically breaking them into smaller chunks for API requests. This reduces the number of calls to external AI providers, improving speed and preventing errors related to token limits. It's a key optimization for handling larger datasets.
Original PR description
## Summary This PR adds support for batching embedding requests based on each provider’s input constraints. The goal is to maximize efficiency while avoiding token or payload limit errors. By processing large text files in properly sized chunks, we minimize the number of API calls and improve overall throughput. task-id-5223195 Forward-Port-Of: odoo/enterprise#98453
Resolved issues and error corrections
This update resolves an issue where the bank statement import wizard wasn't correctly identifying the 'Cumulative Balance' field. The fix adds a necessary step to ensure the wizard recognizes this field, allowing users to properly set up their bank journal imports. This improves the accuracy and usability of the bank statement import process.
Original PR description
When importing a bank statements xlsx in a bank journal, the wizard would not match the "Cumulative Balance", not even proposing it for manual setup. Steps to reproduce: - Go to the accounting…
When importing a bank statements xlsx in a bank journal, the wizard would not match the "Cumulative Balance", not even proposing it for manual setup. Steps to reproduce: - Go to the accounting dashboard - On a bank journal tile, in the right corner menu "New > Import File" - Upload a file (there is one attached to the ticket) - Cumulative Balance is not matched This commit adds module.init() that is skipped in the "onWillStart" override (it's present in the parent onWillStart). This has for consequence that the "bank_stmt_import" key is now present in the context when get_fields_tree() from Base_ImportImport is called, allowing the addition of missing field. See https://github.com/odoo/enterprise/blob/19.0/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L18 This commit also adds a check to only add debit & credit in the added field list if they are not actual field on the bst line model (see: https://github.com/odoo/enterprise/commit/af863c5a53d0ab50fe67cb9ea910391d4a1979dd) This commit also checks that those fields are only added when the model is account bank statement line (only useful in this case). opw-5222326 Forward-Port-Of: odoo/enterprise#100693
This update fixes a limitation in VoIP call creation where regular users couldn't find contacts based on their extension. The change allows VoIP to access extension information securely, ensuring regular users receive accurate contact search results. This enhances the user experience when initiating VoIP calls.
Original PR description
When a call is created, VoIP tries to associate it with a contact based, among other things, one the contact's extension. However, the extension is stored on the res.users.settings record of other users, which regular users don't have access to. This commit updates get_contact_info to perform the search for the extension in sudo mode, so that regular users also get meaningful results. [Task-5395010](https://www.odoo.com/odoo/project/5778/tasks/5395010) Forward-Port-Of: odoo/enterprise#101502
This update resolves an issue where users couldn't select items within locked pills in the Gantt chart. Now, users can initiate selections on locked pills without the locking style interfering, providing a smoother and more intuitive user experience. This enhancement improves usability for managing tasks and dependencies.
Original PR description
This commit allows users to initiate multi-selection on locked pills. When starting a selection on a locked pill, the locked styling is no longer applied, and the selection behaves normally. task-5118978 Forward-Port-Of: odoo/enterprise#99891
This update fixes an issue where pickup moves related to rental orders were not correctly linked in the inventory reporting. The change addresses a consequence of removing a field from the stock move model, ensuring that rental order references are accurately recorded when a pickup is initiated. This improves the visibility and tracking of rental transactions.
Original PR description
### Steps to reproduce: - Create a rentable, storable product - Create and confirm a rental order for 1 unit of this product - Click on pickup - Inventory > Reporting > Moves History #### > Your…
### Steps to reproduce: - Create a rentable, storable product - Create and confirm a rental order for 1 unit of this product - Click on pickup - Inventory > Reporting > Moves History #### > Your pickup move appears without any reference ### Cause of the issue: The issue has been introduced in d0c1e7845feeee1c2e85a21b5d40570d051458d3 which purpose was to remove the `name` field of the `stock.move` model. However, the `_compute_reference` compute method use to rely on this `move.name` to propagate the info that the move was related to a rental order (since there is no picking). Indeed prior to saas-18.4, the compute method was: https://github.com/odoo/odoo/blob/404cb10283cbc706eae67dd793ced363273f3602/addons/stock/models/stock_move.py#L325-L328 And the reference to the rental order was set on the move at pickup: https://github.com/odoo/enterprise/blob/1466a0139ee64ecd059738bc414f6e7e5a9f4354/sale_stock_renting/models/sale_order_line.py#L303-L313 https://github.com/odoo/enterprise/blob/1466a0139ee64ecd059738bc414f6e7e5a9f4354/sale_stock_renting/models/sale_order_line.py#L248-L257 ### Fix: Since the reference field is a computed and stored fields and since some of its dependencies are set at creation the rental move we can not set the `reference` directly in the creation of the record as we used to do for its name since the compute method will then override and erase or reference. opw-5385004 Forward-Port-Of: odoo/enterprise#101670
This update fixes an issue where the system could generate incorrect invoice sequences when a specific journal setting wasn't configured. The change ensures that sequences are always valid, preventing potential errors and ensuring accurate invoice processing for Chilean Electronic Invoices. This improves data reliability.
Original PR description
Before this commit, if the journal is not set to using the document (l10n_latam_use_documents), the method _get_last_sequence could return a sequence that starts with False. opw-5404813 Forward-Port-Of: odoo/enterprise#101824
This update resolves an issue where users were encountering errors when creating filters within the Spreadsheet Edition, particularly with broken data sources. The fix extends a previous safeguard to all filter types, allowing users to safely manage and delete invalid data sources and filters, improving spreadsheet usability.
Original PR description
Forward-Port-Of: odoo/enterprise#100989 Forward-Port-Of: odoo/enterprise#98448
This update resolves a technical issue that caused the Gantt chart to crash when event start or end dates were cleared. The fix ensures the Gantt calculation only runs when a valid date range exists, preventing errors related to comparing dates with boolean values.
Original PR description
When removing the start or end date on an Event, the system raises a traceback during Gantt information computation. **Steps to Reproduce:** 1. Install `website_event_track_gantt` module. 2. Create a new Event. 3. Add at least one **Track** with a track **Date** and **Duration**. 4. In the Event form, clear the Start or End Date field. **Error:** `TypeError: '<' not supported between instances of 'datetime.datetime' and 'bool'` **Cause:** When the event start or end date is removed, those fields become False. During computation, the system attempts to compare these False values with the track dates (which are real datetimes), resulting in an invalid datetime-boolean comparison, causing the error. **Fix:** This commit ensures the Gantt calculation only executes when the event has a valid date range, avoiding comparisons that include missing values. no id Forward-Port-Of: odoo/enterprise#101541
This update improves the AI agent's responses by automatically adding links to the source documents used to generate the information. Previously, the AI agent didn't provide context for its claims. Now, each claim is cited with a direct link to the relevant source material, enhancing transparency and trust. This change ensures users can easily verify the information provided by the AI.
Original PR description
## Summary: This PR introduces `_get_llm_response_with_sources` to correctly parse the LLM's output format, which includes a trailing `[SOURCES]` line containing attachment IDs of the sources used. The method is responsible for: - Splitting the raw LLM message into content and the source line if any. - Fetching the associated `ir.attachment` records based on the IDs and linking their sources' urls to the response. task-id-5153916 Forward-Port-Of: odoo/enterprise#101463
This update fixes an issue where the bank reconciliation widget on the accounting side didn't update correctly when navigating through paginated records. The fix ensures that buttons and partner counts are consistently displayed on all pages, improving the user experience for managing bank reconciliations. This resolves a display problem that prevented accurate reconciliation tracking.
Original PR description
Issue: when navigating through paginated records in the bank reconcilliation widget the functions `computeReconcileLineCountPerPartnerId` and `computeAvailableReconcileModels` were not re-executed. This caused reconciliation model buttons and partner counts to disappear on pages after the first. steps to Reproduce: 1 - In a database with >80 records to reconcile and pre-existing reconciliation models: 2 - Go to Accounting -> N to reconcile button. 3 - In Kanban view expand a record to view reconciliation model buttons (displays correctly). 4 - Navigate to the next page. - From the second page onward, reconciliation model buttons and partner counts are not displayed. fix: on top of the `onWillStart` hook, which runs at the view is first rendered, I added `onRootLoaded` to ensure computations run whenever the dependencies change, updating the widget correctly on pagination. opw-5083877 Forward-Port-Of: odoo/enterprise#98916 Forward-Port-Of: odoo/enterprise#98127
This update resolves a problem in the pos_settle_due tests that were failing due to a hardcoded year. The fix ensures the tests accurately reflect time-based calculations, regardless of the current year. This improves the reliability of the testing process.
Original PR description
When running the pos_settle_due tests with faketime, the tour pos_settle_account_due was failing cause of a hardcoded year which would not work on another year. This is now fixed. runbot-error: 234052 Forward-Port-Of: odoo/enterprise#101217
This update fixes issues with the snailmail follow-up report, ensuring correct address formatting, cover page functionality, and proper PDF generation for sending. It now validates addresses and includes a cover page option, preventing potential delivery problems and providing users with feedback on report status.
Original PR description
#### [FIX] snailmail_account_followup: fix address, cover page and layout Currently there is the following potential problem when sending the followup report via snailmail. 1. The address generation…
#### [FIX] snailmail_account_followup: fix address, cover page and layout
Currently there is the following potential problem when sending
the followup report via snailmail.
1. The address generation is not adjusted for snailmail. That can
lead to problems with the service we use to send the actual letter.
They validate the address rather strictly.
2. The cover page option does not work; it does not add a cover page.
So we can not work around problems with the address generation
by adding a cover page.
3. The layout / dimensions / margins of the generated document / PDF may not work
with our current snailmail provider (Pingen). But there is no error
message about it. (Although we do have something in the usual
snailmail flow)
4. In case the address is invalid we do not try to "print" / send the letter,
so the user does not receive any feedback.
This could be an issue in case multiple follow-up reports are sent
at the same time.
This commit fixes these issues. (See below for details.)
(1)
The logic for this already exists but it is only activated when
a context key is set. This is not the case currently.
After this commit we do set the key.
(2) & (3)
The issue is that we generate the PDF attachment before creating the
'snailmail.letter' record.
In the usual snailmail flow the PDF attachment generation is handled during the sending and
printing (in function `_fetch_attachment` on model 'snailmail.letter').
There is some special logic to
- add a cover page to the report PDF (if the option is selected)
- make sure the page dimensions of the PDF are okay
- overwrite the margins of the PDF with white to make sure the PDF is
not rejected by Pingen because of this
But all this only happens if we do not have an attachment already.
(So it does not happen currently with the followup report)
For this a function called `_generate_report_pdf` was extracted from `_fetch_attachment`
in the related community commit to generate the report PDF (and its
filename). The function is extended here to be able to generate the
followup report.
(4)
We try to print / send the letter even if the address is invalid
Reproduce (i.e. for the cover page issue; but it explains how to get
the PDF that will be sent in general)
1. Install `snailmail_account_followup`
2. Create an overdue invoice
3. Set the "Add a Cover Page" option
(Settings -> Accounting -> section "Customer Invoices")
- enabled to test for the cover page
- disabled to test that the address generation is adjusted
4. Send a follow-up report:
- On 17.0: Accounting -> menu: "Customers" / "Follow-up Reports"
-> click on a line / partner -> button "Follow up"
- On 18.0+: partner form view -> tab "Accounting"
-> section "invoice follow-ups" -> button "Send"
5. Go to the snailmail letter:
In debug mode: Settings -> menu: "Technical" -> section: "Email" -> "Snailmail Letters"
(or just search for "snailmail" in the main screen)
And select the letter
6. Download the PDF document
#### [FIX] snailmail_account_followup: forbid regenerating failed letters
The wizard to resend failed letters which allows to change the
cover page option is broken: The follow-up report can not be regenerated
correctly because it requires special follow-up specific `options` that are
lost after the initial pdf generation for the letter.
Currently it can happen that the follow-up PDF is regenerated but
without (actual) content (table listing the overdue amounts).
After this commit we cancel the snailmail letters and show an
error notification indicating that the followup needs to be done again to
create a new letter.
Reproduce
(needs credit on IAP or locally edit this function https://github.com/odoo/odoo/blob/3ffd51f1cb18e3f4fb0367c4a498d7438e0c0357/addons/snailmail/static/src/core_ui/message_patch.js#L11
to open the resend wizard `this.openFormatLetterAction()` for `sn_credit` error or always)
1. Install `snailmail_account_followup`
2. Create an overdue invoice
3. Ensure the address of the partner causes issues with Pingen
4. Ensure the cover page option is disabled:
Settings -> Accounting -> section "Customer Invoices"
5. Send a follow-up report:
- On 17.0: Accounting -> menu: "Customers" / "Follow-up Reports"
-> click on a line / partner -> button "Follow up"
- On 18.0+: partner form view -> tab "Accounting"
-> section "invoice follow-ups" -> button "Send"
6. Make some modifications like editing the follow-up message or a custom attachment
7. Download the snailmail letter PDF (see previous commit for details)
8. In the chatter go to the message saying "Letter sent by post with Snailmai"
9. Click on the red symbol (paper plane) next to the name
10. A "Format Error" wizard should show up
11. Select "Add a Cover Page"
12. Click the button "Update Config and Re-Send"
13. Download the snailmail letter PDF (see previous commit for details)
14. Compare PDFs from 7 and 13; they are different (not just the cover page)
#### references
opw-5160121
opw-5209504
opw-5226366
Forward-Port-Of: odoo/enterprise#101737
Forward-Port-Of: odoo/enterprise#99491This update corrects a bug in the Czech VAT reporting module that incorrectly calculated VAT amounts. The fix ensures accurate reporting by properly handling foreign currency invoices and using the absolute value of the total amount for foreign currency transactions. This improves the reliability of Czech tax reports.
Original PR description
With l10n_cz_reports: - Create a currency exchange between CZK and EUR where the EUR is valued at least at twice the amount of CZK. - Create an invoice in EUR, with a line with price_unit 5000 and a tax. - In the CZ Tax Report, in the VAT control statement, the converted amount is found in section B.3, which contains received taxable supplies and provided payments up to CZK 10,000. However, the converted amount of the invoice in CZK is higher than 10,000. In `_report_custom_engine_control_statement`, the amount used to check whether the move should be included in this section uses `amount_total`, which in the case of foreign currency gives the wrong result. If the move is in a foreign currency the total is not in CZK so we have to use the absolute value of the signed total. opw-5080339 Forward-Port-Of: odoo/enterprise#100456
This update resolves an issue where top-up events would fail when an archived account was used for company transfers. The system now skips the reconciliation step for archived accounts, ensuring top-ups are processed correctly. This improves the reliability of the expense tracking feature.
Original PR description
Before this commit: Webhook 'topup.succeeded' events would fail if the company `transfer_account_id` field is set to an archived account at the reconciliation step After this commit: As the reconciliation is a "nice to have", we skip the reconciliation step Steps to reproduce: - Install `hr_expense_stripe_demo` - Fill the KYC of doom - Archive the account set on the company `transfer_account_id` field - Create a top-up - Nothing happens, error 550 logged on IAP test Forward-Port-Of: odoo/enterprise#101831
This update fixes an issue where accounting reports in print mode had unnecessary borders and padding, creating a cluttered appearance. The change removes these elements, resulting in cleaner and more professional-looking reports when printed. This improves the user experience for generating and sharing financial reports.
Original PR description
This commit removes the padding and the border of the accounting reports when in print mode. COM: https://github.com/odoo/odoo/pull/236748 task-5265277 Forward-Port-Of: odoo/enterprise#100068
This update fixes a bug where the 'Other Expenses' account type wasn't reflected in the Balance Sheet report. The change was made to align the report with a recent addition of this account type, simplifying expense tracking for vendor bills. This ensures all financial data is accurately represented.
Original PR description
In saas-18.3 a new account type was added: "Other Expenses" These accounts are excluded from the account many2one field to make it easier to find relevant expense accounts for vendor bills. Issue: This account type is not included in the Balance Sheet report. see comment in opw-5269456 related to opw-5191111 Forward-Port-Of: odoo/enterprise#101591
This update resolves a problem that prevented users from correctly setting accounting periods for tax returns when installing the accountant module. The fix ensures the necessary onboarding process is triggered, allowing users to configure their tax returns journal without errors. This improves the stability and usability of the tax returns feature.
Original PR description
From **saas-18.3**, when installing the accountant module, after [this PR](https://github.com/odoo/enterprise/commit/49aca723c2422fedcc8bda963a6346a172825617#diff-c703c688dc3f80644a43c96657cb2db0122b83cee9bcfa417554b0c7f1e4f550L22) the `_initiate_account_onboardings()` was not called anymore for companies that already had a chart template. This caused a traceback while configuring the Accounting Period on the Tax Returns journal: `ValueError - Expected singleton: onboarding.progress()` We now fix this behavior by ensuring that `_initiate_account_onboardings()` is called when installing the chart_template, filling the gap that was introduced. **Steps to Reproduce:** 1. Install `accountant` module without demo data. 2. Accounting > Dashboard > _Tax Returns_ Journal, click on the **"Tax Returns"** button. 3. Set an **Opening Date** in the wizard and try to apply the **Accounting Periods**. sentry-7064593163 Forward-Port-Of: odoo/enterprise#101442
This update expands the availability of the 'Emission Stat' button to all types of account moves, including Purchase Receipts, previously limited to Vendor Bills. This change ensures accurate emissions reporting across all financial transactions, improving the overall sustainability data captured within Odoo Enterprise.
Original PR description
Prior to this PR, we limited the display of the Emissions stat button of 'account.move' to Vendor Bills and Credit Vendor Bills ('in_invoice' and 'in_refund'). But emissions could be reported in other types of moves (e.g. Purchase Receipt), so we remove that condition.
task-5407761
Forward-Port-Of: odoo/enterprise#101906This update fixes an issue where duplicate quality checks were being created for stock pickings, even when only one check was needed per operation. The change adds a validation step to ensure only one operation-based quality check is generated per picking, streamlining the process and preventing unnecessary checks.
Original PR description
Steps to reproduce: -------------------------- 1. Install the Quality module. 2. Create a Quality Control Point with: * Control per: Control on Operation. * Operation: Receipts (set in the Operations…
Steps to reproduce: -------------------------- 1. Install the Quality module. 2. Create a Quality Control Point with: * Control per: Control on Operation. * Operation: Receipts (set in the Operations field). 3. Create a Receipt containing one product. 4. Click the Mark as To Do button. 5. Add another product to the same Receipt and save it. Observation: -------------------------- Two quality checks are generated for the same picking, despite the tooltip indicating that only one check should be created per operation. Issue: -------------------------- No validation existed to verify whether an operation-based quality check had already been created for the picking when adding additional stock moves after confirmation. Solution: -------------------------- Add a check ensuring that if a quality check already exists for the same picking type and operation (with no product or category criteria), no additional operation-based quality checks are created. opw-5249233 Forward-Port-Of: odoo/enterprise#101788 Forward-Port-Of: odoo/enterprise#100118
This update ensures that the status of Brazilian e-invoices is accurately reflected as 'cancelled' after a cancellation request is processed. Previously, the status field was left blank, causing confusion. The fix correctly updates the status within the EDI system, aligning with the expected e-invoice cancellation workflow.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for…
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for l10n_br](https://docs.google.com/document/d/1CSUKpnyhty5WBqUDBE-7dGvu0qxaC5vQ0loz0fYNg04/edit?tab=t.0) * Confirm the invoice and **send it to e-invoice (Brazil)**. * Confirm the **Brazil E-Invoice Status** shows **'Accepted'**. * Click **Request Cancellation**, enter a cancellation reason, and submit the request. **Observed behavior:** * The invoice moves to **Cancelled** state. * The cancellation XML is generated and attached in the chatter. * SEFAZ returns a successful cancellation response. * However, the **BR EDI Status** becomes **empty**, instead of reflecting **'Cancelled'**. **Cause:** * In the wizard `l10n_br_edi.invoice.update`, both `_finalize_update()` and `_submit_services()` assign `l10n_br_last_edi_status = 'cancelled'` **before** calling `button_cancel()`. * `button_cancel()` internally triggers `button_draft()` for posted invoices. * The Brazil EDI override of `button_draft()` resets `l10n_br_last_edi_status = False`. * This clears the status that was just set, leaving the field blank. **Fix:** * move `l10n_br_last_edi_status = "cancelled"` to `button_cancel()` method. opw-5378542 Forward-Port-Of: odoo/enterprise#101438
This update resolves an issue where the accounting section in the payroll settings was limited to SEPA countries. Now, all localization options, including the Payroll HSBC Autopay option for Hong Kong, are available, ensuring consistent functionality across all Odoo Enterprise users. This improves usability and avoids limitations for non-SEPA countries.
Original PR description
Before this commit, the accounting section in V19 was exclusive to SEPA countries, causing some fields located in this section for other localizations to disappear. This was the case for the HK localization, which had the Payroll HSBC Autopay option inside this section, causing it not to appear, and also prevented the Batch account move lines option from being available for non-SEPA countries. With this commit, the accounting section and the Batch account move lines option are available for all localizations. This was already fixed in the master here is the PR in question odoo/enterprise#96283 task - 5268780 Forward-Port-Of: odoo/enterprise#100004
A bug preventing Arabic-speaking users from accessing booking tabs within the Point of Sale (POS) system has been resolved. The fix corrects an error in how date formatting was handled, ensuring proper display and functionality for users with Arabic language settings. This improves the user experience for a wider range of customers.
Original PR description
Currently, when the user language is arabic and we try to select the booking tab inside pos, a traceback appears. Steps to reproduce: ------------------- * Make sure shop has activate the booking feature * Set appointment type to "Table" * Set user language to arabic * Open pos session * Open the booking tab > Traceback: ... invalid isoformat string Why the fix: ------------ `.toFormat` was responsible for the "translation" of the date to arabic. opw-5380768 Forward-Port-Of: odoo/enterprise#101304
Features or functions removed from Odoo
This update simplifies the l10n_cz and l10n_sk modules by removing a previously added field for taxable supply rates. Now, the system utilizes the existing delivery date information instead, streamlining data management. This change improves efficiency and reduces potential complexity.
Original PR description
A field taxable_supply_rate was added for both l10n_cz and l10n_sk modules before as delivery_date didn't exist back then. Now, we can remove the field and use delivery_data in its place. task-4373097 Community PR: https://github.com/odoo/odoo/pull/191189
19 changes
Enhancements to existing features
This update ensures Odoo correctly handles negative invoice lines in Mexico's CFDI e-invoicing format. Previously, the system struggled when negative line amounts exceeded the total of multiple positive lines. This change improves compliance with Mexican regulations and prevents potential invoicing errors.
Original PR description
In mexico, you cannot send any negative lines in the CFDI (Mexican e-invoicing). The negative lines are distributed accross the positive ones in _dispatch_global_discount_lines. This test ensures the negative line is well distributed when its amount is higher than the sum of multiple positive lines. Forward-Port-Of: odoo/enterprise#101888
Resolved issues and error corrections
This update fixes an issue where subscription details weren't being displayed correctly within the project dashboard. The fix addresses a problem with how subscription data was being filtered and retrieved, ensuring subscription titles are now shown accurately when the subscription section is expanded. This improves the user experience for managing subscriptions.
Original PR description
Before this commit, when subscriptions were linked to the analytic account of a project, the sale order items appears in an unwanted section when the section is unfolded. Meanwhile, when the subscription section is unfolded the title of the subscriptions items are not correctly displayed. The first issue is due to the fact that we did not correctly exclude the subscriptions items from the domain. The second issue is due to the fact that we fetch the field 'name' from the subscription search instead of the field 'display_name' task-5159781 Forward-Port-Of: odoo/enterprise#97238
This update resolves a problem where tests were failing after a recent change that limited the use of 'mock' helpers. The fix ensures tests continue to run correctly, maintaining the stability of the Odoo Enterprise system. This change primarily impacts internal testing processes.
Original PR description
This commit adapts tests failing due to a recent fix preventing the use of 'mock...' helpers outside of tests. - Community: https://github.com/odoo/odoo/pull/239237 Forward-Port-Of: odoo/enterprise#101802 Forward-Port-Of: odoo/enterprise#101780
This update resolves an issue where users with access to multiple companies but only one employee were unable to schedule themselves for planning slots in those companies. The fix restores the previous behavior, ensuring all authorized users can participate in planning across their companies. This corrects a database inconsistency and improves usability.
Original PR description
Since #91616, if a user has access to multiple companies but only has an employee in one, they are unable to assign themselves to a planning slot from a company other than that of their employee. This was not the case in previous versions and is causing issues in our internal db. To restore the previous behavior, any user with access to a company but only 1 employee will be able to assign themselves to slots of said company. opw-5163200 Forward-Port-Of: odoo/enterprise#101659
This update fixes an issue where multiple quality checks were being created for the same picking when adding additional products. The change adds a validation step to ensure only one operation-based quality check is generated per picking, streamlining the quality control process and preventing redundant checks.
Original PR description
Steps to reproduce: -------------------------- 1. Install the Quality module. 2. Create a Quality Control Point with: * Control per: Control on Operation. * Operation: Receipts (set in the Operations…
Steps to reproduce: -------------------------- 1. Install the Quality module. 2. Create a Quality Control Point with: * Control per: Control on Operation. * Operation: Receipts (set in the Operations field). 3. Create a Receipt containing one product. 4. Click the Mark as To Do button. 5. Add another product to the same Receipt and save it. Observation: -------------------------- Two quality checks are generated for the same picking, despite the tooltip indicating that only one check should be created per operation. Issue: -------------------------- No validation existed to verify whether an operation-based quality check had already been created for the picking when adding additional stock moves after confirmation. Solution: -------------------------- Add a check ensuring that if a quality check already exists for the same picking type and operation (with no product or category criteria), no additional operation-based quality checks are created. opw-5249233 Forward-Port-Of: odoo/enterprise#101788 Forward-Port-Of: odoo/enterprise#100118
This update restores the missing email templates required for sending invoices and credit notes in compliance with DIAN regulations within the l10n_co_dian module. The previous removal of these templates was corrected, ensuring proper functionality for Colombian businesses using Odoo Enterprise. This fix addresses a critical requirement for accurate tax reporting.
Original PR description
**Steps to reproduce:** - Create a database with l10n_co module - "Invoice (DIAN): Sending" and "Credit Note (DIAN): Sending" are missing in the available templates **Issue:** Xml line which added "l10n_co_dian.email_template_edi_invoice" and "l10n_co_dian.email_template_edi_credit_note" templates was removed in https://github.com/odoo/enterprise/commit/7add9dbface8e67dd25b05653d514d5f8c2cfa38 **Fix:** Re-add the `<function>` to `_create_dian_mail_templates` in the `.xml`. opw-5385848
This update fixes an issue where helpdesk return pickings incorrectly defaulted to a generic incoming operation type. The change ensures that returns are now automatically created using the specifically configured 'Delivery Orders' operation type, streamlining the return process and improving accuracy.
Original PR description
Steps to reproduce: - 1. Go to Inventory > Configuration > Operation Types. 2. Open the 'Delivery Orders' operation type. 3. In the 'Returns Type' field, select a specific 'Returns' operation and save. 4. Go to the Helpdesk app and create a new ticket. 5. Click the 'Return' button to create a return picking. Issue: - The 'Operation Type' on the newly created return defaults to the first available 'incoming' operation. It incorrectly ignores the specific 'Returns Type' that was configured on the 'Delivery Orders' operation type. Cause: - The _prepare_picking_default_values method on the stock.return.picking wizard contained logic to search for the first operation type with code='incoming'. Fix: - The logic now finds the 'outgoing' (Delivery) operation type and uses its configured 'Returns Type' as the default for the new return. task-5074911
This update addresses a performance issue in the sign module related to corrupted PDF files. By updating the PDF.js library, Odoo now avoids an infinite loop and potential traceback errors when handling problematic uploads, ensuring smoother document processing. This improves the reliability of the sign workflow.
Original PR description
Modification of module to align it with the newer version This commit updates the PDF.js library to patch the issue related to: mozilla/pdf.js#18878 In Odoo this issue raises a performance issue that makes a infinite loop when you upload a corrupted file and Odoo tries to upload a traceback. OPW-5214755 Forward-Port-Of: odoo/enterprise#101551 Forward-Port-Of: odoo/enterprise#99912
This update fixes a bug where the 'Other Expenses' account type wasn't displayed in the Balance Sheet report. The change was made to align the report with a recent addition to the system for vendor bill tracking. This ensures all financial data is accurately reflected in the Balance Sheet.
Original PR description
In saas-18.3 a new account type was added: "Other Expenses" These accounts are excluded from the account many2one field to make it easier to find relevant expense accounts for vendor bills. Issue: This account type is not included in the Balance Sheet report. see comment in opw-5269456 related to opw-5191111 Forward-Port-Of: odoo/enterprise#101591
This update allows the 'Emissions stat' button to be displayed on a wider range of account moves, including Purchase Receipts, previously it was limited to specific invoice types. This expands the data available for ESG reporting and provides a more complete picture of emissions across the business.
Original PR description
Prior to this PR, we limited the display of the Emissions stat button of 'account.move' to Vendor Bills and Credit Vendor Bills ('in_invoice' and 'in_refund'). But emissions could be reported in other types of moves (e.g. Purchase Receipt), so we remove that condition.
task-5407761
Forward-Port-Of: odoo/enterprise#101906This update resolves a technical issue that prevented users from correctly setting accounting periods when configuring their tax returns journal. The fix ensures that a necessary installation step is triggered, preventing a traceback error and allowing users to complete this important setup process. This improves the stability and usability of the accountant module.
Original PR description
From **saas-18.3**, when installing the accountant module, after [this PR](https://github.com/odoo/enterprise/commit/49aca723c2422fedcc8bda963a6346a172825617#diff-c703c688dc3f80644a43c96657cb2db0122b83cee9bcfa417554b0c7f1e4f550L22) the `_initiate_account_onboardings()` was not called anymore for companies that already had a chart template. This caused a traceback while configuring the Accounting Period on the Tax Returns journal: `ValueError - Expected singleton: onboarding.progress()` We now fix this behavior by ensuring that `_initiate_account_onboardings()` is called when installing the chart_template, filling the gap that was introduced. **Steps to Reproduce:** 1. Install `accountant` module without demo data. 2. Accounting > Dashboard > _Tax Returns_ Journal, click on the **"Tax Returns"** button. 3. Set an **Opening Date** in the wizard and try to apply the **Accounting Periods**. sentry-7064593163 Forward-Port-Of: odoo/enterprise#101442
This update resolves a translation issue within the l10n_be_reports module. The system incorrectly attempted to use VAT communication logic for a company using the LU localization, resulting in a ValueError. The fix ensures the correct chart template is used during translation loading, preventing this error.
Original PR description
``` File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook self.env.registry._delayed_account_translator(self.env) File…
```
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook
self.env.registry._delayed_account_translator(self.env)
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 90, in load_account_translations
env['account.chart.template']._load_translations(langs=langs)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 1449, in _load_translations
._get_chart_template_data(chart_template)
File "/home/odoo/src/enterprise/19.0/account_accountant/models/account_chart_template.py", line 31, in _get_chart_template_data
data = super()._get_chart_template_data(chart_template)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 803, in _get_chart_template_data
data = func(self, template_code)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 59, in wrapper
return func(*args, **kwargs)
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py", line 52, in _get_be_account_reconcile_model
prepayment_communication = self.env['qr.code.payment.wizard']._be_company_vat_communication(self.env.company).replace('+++', '')
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/qr_code_payment_wizard.py", line 14, in _be_company_vat_communication
number = int(vat)
ValueError: invalid literal for int() with base 10: 'LU19038918'
```
```sql
kmod_3311837=> select id,name,chart_template,parent_id from res_company;
id | name | chart_template | parent_id
----+---------------------+----------------+-----------
3 | C.R.O.Qu.E.T. S.A. | be_comp |
2 | KG5380 | be_comp |
1 | KNOWLEDGE GATE S.A. | lu |
(3 rows)
kmod_3311837=> select id,model,module,res_id from ir_model_data where name = 'main_company';
id | model | module | res_id
----+-------------+--------+--------
2 | res.company | base | 1
(1 row)
```
```
> /home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py(52)_get_be_account_reconcile_model()
-> if template_code in ['be', 'be_comp', 'be_asso']:
(Pdb) template_code
'be_comp'
(Pdb) self.env.company
res.company(1,)
(Pdb) self.env.company.chart_template
'lu'
(Pdb)
```
- The traceback occurs because during the translation loading process, the system calls [_get_chart_template_data](https://github.com/odoo/odoo/blob/38cffd1d1580693c56f0d897b8c8e60b938a8e85/addons/account/models/chart_template.py#L1465)
for all available template codes. In the customer’s database, there are three companies: Company 2 and Company 3 use the BE_COMP localization, while Company 1 uses the LU localization.
- When _get_chart_template_data is executed for the BE_COMP chart template, it eventually calls [_get_be_account_reconcile_mode](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/account_chart_template.py#L49) During this call, the function receives the correct template code (be_comp) as an argument. However, self.env.company returns Company 1, because Company 1 is set as the main_company.
- As a result, [_be_company_vat_communication](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/qr_code_payment_wizard.py#L14) is called with Company 1, even though this company uses the LU localization. Since LU localization does not support the BE VAT communication logic, an error is raised from this method.
- I have made a fix that uses the chart_template of self.env.company to avoid the blocking issue during the upgrade. However, I am not fully sure whether this is the correct solution. Since the load_translation method does not pass with_company when retrieving the chart template, this issue will always occur because the methods are executed in the context of the main company instead of the company that the chart template actually belongs to.
opw-5342498This update fixes a bug where vendor bills incorrectly used the company's bank account instead of the vendor's. Previously, selecting a payment method automatically populated the partner_bank_id field with the company's account. This change ensures the partner_bank_id always reflects the vendor's bank account, improving accuracy in billing records. This resolves bug #239249.
Original PR description
Description of the issue/feature this PR addresses: fixes bug #239249 See the bug report for full details. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where foreign currency rates weren't correctly applied when generating Datev CSV reports. Now, the system accurately reflects the foreign currency rates set on invoices, ensuring accurate reporting for German clients. This improves the reliability of financial data exports.
Original PR description
When we set the foreign currency rate on invoices, it won't be used when exporting the report. Make sure to use the correct currency rate. task-5404816
This update resolves an issue where attachment files for returns weren't being generated correctly, and ensures consistent behavior when resetting return reports. The fix standardizes how attachments are created and resets, leading to more reliable reporting and data management.
Original PR description
[FIX] account_reports: returns: fix generations of files as attachments _generate_submission_attachments does not exist anymore ; it's been renamed to _generate_locking_attachments. Because of that,…
[FIX] account_reports: returns: fix generations of files as attachments _generate_submission_attachments does not exist anymore ; it's been renamed to _generate_locking_attachments. Because of that, some intended overrides were not executed properly, and several XML/CSV export files were not generated and added as attachments to the return. Moreover, the functions generating export files used to be called by account.report's export_file function (from a button defined in options['buttons']). export_file always forced the 'export_mode' key into the options it passed tp those file generators; we reintroduce this behavior for consistency, to avoid messy situations due to forward-port or functions being converted from the former paradigm to the new one. Note, however, it's always better to fully regenerate the options from such a generator. ================================================================================= [FIX] account_reports: returns: homogenize the reset behavior Before this fix, resetting a tax report deleted all the attachments of the return, while resetting for example the Partner VAT Listing (in Belgium), left them untouched. We now introduce a common helper for all reset functions, defining the behaviors they should share.
This update ensures that the status of Brazilian e-invoices is accurately reflected as 'Cancelled' after a cancellation request is processed. Previously, the status field was left blank, causing confusion. The fix correctly updates the status within the EDI system, aligning with the expected e-invoice cancellation process.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for…
**Steps to reproduce:** * Install the **Accounting** and **l10n_br_edi** modules. * Create and post a Brazilian customer invoice using an **Avatax fiscal position** * [Guide to setup EDI for l10n_br](https://docs.google.com/document/d/1CSUKpnyhty5WBqUDBE-7dGvu0qxaC5vQ0loz0fYNg04/edit?tab=t.0) * Confirm the invoice and **send it to e-invoice (Brazil)**. * Confirm the **Brazil E-Invoice Status** shows **'Accepted'**. * Click **Request Cancellation**, enter a cancellation reason, and submit the request. **Observed behavior:** * The invoice moves to **Cancelled** state. * The cancellation XML is generated and attached in the chatter. * SEFAZ returns a successful cancellation response. * However, the **BR EDI Status** becomes **empty**, instead of reflecting **'Cancelled'**. **Cause:** * In the wizard `l10n_br_edi.invoice.update`, both `_finalize_update()` and `_submit_services()` assign `l10n_br_last_edi_status = 'cancelled'` **before** calling `button_cancel()`. * `button_cancel()` internally triggers `button_draft()` for posted invoices. * The Brazil EDI override of `button_draft()` resets `l10n_br_last_edi_status = False`. * This clears the status that was just set, leaving the field blank. **Fix:** * move `l10n_br_last_edi_status = "cancelled"` to `button_cancel()` method. opw-5378542 Forward-Port-Of: odoo/enterprise#101438
This update ensures that a 'partner ID' is always provided when processing SEPA payments. Previously, a missing partner ID could cause errors during batch payment creation, leading to payment processing failures. This change improves the reliability and stability of our payment processing system.
Original PR description
When doing a payment with SEPA as the payment method, and then create a batch payment out of it. It could happen that the partner_id of the payment was not set. That would cause a traceback because in the _get_CdtTrfTxInf we do a browse on the partner to use it later on. But since the partner is False, we have an empty record set. task-5213880 Forward-Port-Of: odoo/enterprise#98249
This update fixes a technical error that prevented some users from accessing the employee version history. The payroll module's access restrictions were not correctly applied to the user interface, causing a frontend error. The fix ensures that only authorized users can view this data.
Original PR description
Steps to reproduce: - Log in as a user with only Employee Administrator rights (no payroll access). - Open the Employees app and create a new employee. - Click the History smart button. - A traceback is raised. Cause: The payroll module restricts contract_date_start and contract_date_end to hr_payroll.group_hr_payroll_user, but the search view still referenced these fields. Since the view was not updated accordingly, non-payroll users triggered a frontend parsing error. Fix: Override the search view to update the filters and match the model's access restrictions. task-5401143 Forward-Port-Of: odoo/enterprise#101710
This update resolves a limitation preventing non-administrator users from utilizing the delivery_usps_rest module. By implementing sudo() calls, the module now grants necessary access to the USPS Rest API, expanding functionality without requiring elevated user permissions. This improves usability for a wider range of users.
Original PR description
Non-admin users are currently unable to use the delivery_usps_rest module because several fields are limited to the "base.group_system" group. It's obviously not feasible to give everyone the "Role / Administrator" role. This PR makes necessary sudo() calls the same way that delivery_ups_rest does. Forward-Port-Of: odoo/enterprise#101163
8 changes
New functionality added to Odoo
This update adds a new test to ensure that the Peppol status of partners is automatically updated when invoices are generated through e-commerce and linked to automated payments. This improves the accuracy of Peppol data, which is crucial for international trade and compliance. It addresses a gap in the system's ability to track Peppol status correctly.
Original PR description
When creating a SO on e-commerce leading to an automatic invoice, the invoice is automatically sent using Peppol upon the payment. This test ensures the peppol status of the partner is updated during the process. task_id: 5025176 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This update resolves a recursion error that occurred when updating Point of Sale configuration settings, specifically related to fiscal positions. The fix prevents an infinite loop caused by archiving fiscal positions, ensuring smoother configuration updates.
Original PR description
**Steps To Reproduce:-** 1. Install point_of_sale in 17.0 2. Activate flexible taxes setting 3. set default fiscal position and after that archived that fiscal position. 4. try edit and save the POS…
**Steps To Reproduce:-**
1. Install point_of_sale in 17.0
2. Activate flexible taxes setting
3. set default fiscal position and after that archived that fiscal position.
4. try edit and save the POS config any operation below mentioned recursion error will come.
**Issue :-**
Due to archived record of fiscal postion is keep updating due to not satisfying this condition [config.default_fiscal_position_id.id not in config.fiscal_position_ids.ids](https://github.com/odoo/odoo/blob/62652ba3a7a90699e7aa8ff98e2d4980f1b43694/addons/point_of_sale/models/pos_config.py#L529) here ``config.fiscal_position_ids`` on this active filter is applying and it coming empty and going to update many2many field this process goes infinite due to archive fiscal position record
**FIX:-**
adding the check of active record fiscal position
```
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 442, in _set_fiscal_position
config.fiscal_position_ids = [(4, config.default_fiscal_position_id.id)]
File "/data/build/odoo/odoo/fields.py", line 1337, in __set__
records.write({self.name: write_value})
File "/data/build/odoo/addons/pos_restaurant/models/pos_config.py", line 52, in write
return super(PosConfig, self).write(vals)
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 420, in write
self.sudo()._set_fiscal_position()
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 442, in _set_fiscal_position
config.fiscal_position_ids = [(4, config.default_fiscal_position_id.id)]
File "/data/build/odoo/odoo/fields.py", line 1337, in __set__
records.write({self.name: write_value})
File "/data/build/odoo/addons/pos_restaurant/models/pos_config.py", line 52, in write
return super(PosConfig, self).write(vals)
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 420, in write
self.sudo()._set_fiscal_position()
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 442, in _set_fiscal_position
config.fiscal_position_ids = [(4, config.default_fiscal_position_id.id)]
File "/data/build/odoo/odoo/fields.py", line 1337, in __set__
records.write({self.name: write_value})
File "/data/build/odoo/addons/pos_restaurant/models/pos_config.py", line 52, in write
return super(PosConfig, self).write(vals)
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 420, in write
self.sudo()._set_fiscal_position()
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 442, in _set_fiscal_position
config.fiscal_position_ids = [(4, config.default_fiscal_position_id.id)]
File "/data/build/odoo/odoo/fields.py", line 1337, in __set__
records.write({self.name: write_value})
File "/data/build/odoo/addons/pos_restaurant/models/pos_config.py", line 52, in write
return super(PosConfig, self).write(vals)
File "/data/build/odoo/addons/point_of_sale/models/pos_config.py", line 418, in write
result = super(PosConfig, self).write(vals)
File "/data/build/odoo/odoo/models.py", line 3820, in write
field.write(self, value)
File "/data/build/odoo/odoo/fields.py", line 4287, in write
return self.write_batch([(records, value)])
File "/data/build/odoo/odoo/fields.py", line 4308, in write_batch
return self.write_real(records_commands_list, create)
File "/data/build/odoo/odoo/fields.py", line 4835, in write_real
old_relation = {record.id: set(record[self.name]._ids) for record in records}
File "/data/build/odoo/odoo/fields.py", line 4835, in <dictcomp>
old_relation = {record.id: set(record[self.name]._ids) for record in records}
File "/data/build/odoo/odoo/models.py", line 6007, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "/data/build/odoo/odoo/fields.py", line 2824, in __get__
return super().__get__(records, owner)
File "/data/build/odoo/odoo/fields.py", line 1270, in __get__
return self.convert_to_record(value, record)
File "/data/build/odoo/odoo/fields.py", line 4199, in convert_to_record
corecords = corecords.filtered(Comodel._active_name).with_prefetch(prefetch_ids)
File "/data/build/odoo/odoo/models.py", line 5496, in filtered
return self.browse([rec.id for rec in self if func(rec)])
File "/data/build/odoo/odoo/models.py", line 5496, in <listcomp>
return self.browse([rec.id for rec in self if func(rec)])
File "/data/build/odoo/odoo/models.py", line 5493, in <lambda>
func = lambda rec: any(rec.mapped(name))
File "/data/build/odoo/odoo/models.py", line 5470, in mapped
recs = recs._fields[name].mapped(recs)
File "/data/build/odoo/odoo/fields.py", line 1299, in mapped
return self.convert_to_record_multi(vals, records)
File "/data/build/odoo/odoo/fields.py", line 942, in convert_to_record_multi
return [convert(value, record) for value, record in zip(values, records)]
File "/data/build/odoo/odoo/fields.py", line 942, in <listcomp>
return [convert(value, record) for value, record in zip(values, records)]
File "/data/build/odoo/odoo/models.py", line 5844, in __iter__
yield self.__class__(self.env, (id_,), self._prefetch_ids)
RecursionError: maximum recursion depth exceeded
```
**OPW** - 5208462
**UPG** - 3248441
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#233358This update corrects a bug where accrual plans were incorrectly blocking leave accrual, even with remaining balances below the cap. The fix ensures that leave accruals continue as expected, preventing users from missing out on earned time off. It addresses an issue with how future leave calculations were being handled.
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).
opw-4934391This update resolves a problem preventing the correct installation of several localization modules (l10n_bh, l10n_iq, etc.). The issue stemmed from a missing configuration setting in the module's setup file, which has now been added to ensure seamless installation and functionality.
Original PR description
Steps to reproduce: 1. Install 'accountant' 2. Create a new company without a country and switch to that company 3. Accounting > Configuration > Fiscal Localization 4. Select Mauritius and save Issue: It gives a traceback: KeyError: 'mu' Cause: 'auto_install' is not present in the manifest file. Solution: Add 'auto_install': ['account'] in the manifest as it is done in other localization modules. opw-5231064
This update optimizes how Odoo calculates potential free products in loyalty programs. Previously, the system unnecessarily checked all reward products, leading to slow performance. This change improves the speed and efficiency of the loyalty reward calculation process, particularly when multiple rewards are involved.
Original PR description
Before this commit, the computation of potential free product quantities looped through all reward products even after finding a valid one. This led to unnecessary calculations and performance degradation, especially when multiple reward products were involved. opw-5268991 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where a failed Odoo update could cause the IoT Box to incorrectly believe it's up-to-date. By maintaining the original branch name during update attempts, the system avoids this misinterpretation and ensures proper functionality after a failed update.
Original PR description
We used to renamed the Odoo branch name before running the update script in order to get the target branch name easily inside it. Issue is if for any reason the update fails, when the IoT Box will restart, the branch name will be the target one, so it will assume it's up to date. Task: 5407662 Forward-Port-Of: odoo/odoo#239508
This update resolves a restriction preventing non-administrator users from utilizing the delivery_usps_rest module. By implementing sudo() calls, the module now grants necessary access to the USPS Rest API, improving usability for a wider range of users without requiring elevated permissions.
Original PR description
Non-admin users are currently unable to use the delivery_usps_rest module because several fields are limited to the "base.group_system" group. It's obviously not feasible to give everyone the "Role / Administrator" role. This PR makes necessary sudo() calls the same way that delivery_ups_rest does. Forward-Port-Of: odoo/enterprise#101163
Documentation and clarification updates
This pull request incorporates a Corporate Contributor License Agreement (CLA) for Jaco Waes from jaco-tech. CLAs are standard legal documents that ensure contributors grant Odoo the rights to use their code. This ensures compliance with Odoo's open-source licensing.
Original PR description
Corporate Contributor License Agreement for jaco-tech. This CLA covers contributions from: - Jaco Waes (@jwaes)
4 changes
New functionality added to Odoo
This pull request updates the sales order reporting functionality to provide more detailed insights into order fulfillment. Specifically, it enhances the reporting by including key metrics related to shipping and delivery, allowing sales teams to better track order progress and identify potential delays. This change improves overall sales efficiency and customer satisfaction.
Original PR description
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 adds a new test to ensure that the Peppol status of partners is automatically updated when invoices are generated through e-commerce and linked to Peppol-based payments. This improves the accuracy of Peppol data and streamlines the process of exchanging invoices internationally. It’s a key step in supporting our international business operations.
Original PR description
When creating a SO on e-commerce leading to an automatic invoice, the invoice is automatically sent using Peppol upon the payment. This test ensures the peppol status of the partner is updated during the process. task_id: 5025176 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update backports the Worldline payment provider to Odoo 17 to prepare for the upcoming discontinuation of legacy payment APIs by December 2025. This ensures a smoother transition for businesses using Worldline payments, preserving existing Ogone tokens and allowing for early migration. It addresses a critical dependency update.
Original PR description
Description of the feature this PR addresses: - Legacy payment APIs used by Ogone will be discontinued by 31 Dec 2025. - Backport Worldline provider from 18.0 to 17.0 to support early migration. Desired behavior after PR is merged: - Worldline payment provider is backported to 17.0. - A smooth upgrade is ensured while preserving Ogone tokens, knowing Worldline already exist in 18.0. Affected version-17.0 task-4687593
Resolved issues and error corrections
This fix resolves an issue where the account translation loading process incorrectly used the main company context, leading to a ValueError when attempting to process VAT data for the 'be_comp' localization. The update corrects the context to ensure accurate translation loading based on the correct company setup.
Original PR description
``` File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook self.env.registry._delayed_account_translator(self.env) File…
```
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook
self.env.registry._delayed_account_translator(self.env)
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 90, in load_account_translations
env['account.chart.template']._load_translations(langs=langs)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 1449, in _load_translations
._get_chart_template_data(chart_template)
File "/home/odoo/src/enterprise/19.0/account_accountant/models/account_chart_template.py", line 31, in _get_chart_template_data
data = super()._get_chart_template_data(chart_template)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 803, in _get_chart_template_data
data = func(self, template_code)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 59, in wrapper
return func(*args, **kwargs)
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py", line 52, in _get_be_account_reconcile_model
prepayment_communication = self.env['qr.code.payment.wizard']._be_company_vat_communication(self.env.company).replace('+++', '')
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/qr_code_payment_wizard.py", line 14, in _be_company_vat_communication
number = int(vat)
ValueError: invalid literal for int() with base 10: 'LU19038918'
```
```sql
kmod_3311837=> select id,name,chart_template,parent_id from res_company;
id | name | chart_template | parent_id
----+---------------------+----------------+-----------
3 | C.R.O.Qu.E.T. S.A. | be_comp |
2 | KG5380 | be_comp |
1 | KNOWLEDGE GATE S.A. | lu |
(3 rows)
kmod_3311837=> select id,model,module,res_id from ir_model_data where name = 'main_company';
id | model | module | res_id
----+-------------+--------+--------
2 | res.company | base | 1
(1 row)
```
```
> /home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py(52)_get_be_account_reconcile_model()
-> if template_code in ['be', 'be_comp', 'be_asso']:
(Pdb) template_code
'be_comp'
(Pdb) self.env.company
res.company(1,)
(Pdb) self.env.company.chart_template
'lu'
(Pdb)
```
- The traceback occurs because during the translation loading process, the system calls [_get_chart_template_data](https://github.com/odoo/odoo/blob/38cffd1d1580693c56f0d897b8c8e60b938a8e85/addons/account/models/chart_template.py#L1465) for all available template codes. In the customer’s database, there are three companies: Company 2 and Company 3 use the BE_COMP localization, while Company 1 uses the LU localization.
- When _get_chart_template_data is executed for the BE_COMP chart template, it eventually calls [_get_be_account_reconcile_mode](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/account_chart_template.py#L49) During this call, the function receives the correct template code (be_comp) as an argument. However, self.env.company returns Company 1, because Company 1 is set as the main_company.
- As a result, [_be_company_vat_communication](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/qr_code_payment_wizard.py#L14) is called with Company 1, even though this company uses the LU localization. Since LU localization does not support the BE VAT communication logic, an error is raised from this method.
- There is no context of the company passed when calling _get_chart_template_data from _load_translations, so I have applied with_company, so _get_chart_template_data is called in the context of a specific company.
opw-5342498
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr