Daily updates from Odoo
Wednesday, April 1, 2026
26 changes · saas-18.2
New functionality added to Odoo
This update adds the POS Restaurant Stripe module to Odoo's translation management system (Weblate), enabling the module to be translated into multiple languages. This ensures that users in different countries can access the Point of Sale restaurant payment features in their native language, improving the user experience globally.
Original PR description
Related: https://github.com/odoo/enterprise/pull/111141 Forward-Port-Of: odoo/odoo#254712 Forward-Port-Of: odoo/odoo#254667
Enhancements to existing features
This update adds missing modules to the Weblate translation configuration file, ensuring that all relevant modules are properly included in the translation management system. This improves the translation workflow by making sure no modules are overlooked when managing multilingual content across the platform.
Original PR description
Related: https://github.com/odoo/odoo/pull/254667 Forward-Port-Of: odoo/enterprise#111181 Forward-Port-Of: odoo/enterprise#111141
Updated Ecuador's withholding tax percentages to comply with the new 2026 government resolution. The system now uses the latest tax rates while preserving historical data by marking previous rates as inactive, ensuring accurate tax calculations for Ecuadorian businesses going forward.
Original PR description
Implement the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. SPECIFICATION: - Created the new withholding percentages as new tax records. - Set the previous withholding percentages as inactive to preserve historical data. - Ensured compatibility with existing tax configurations and fiscal mappings. Table with the changes established in "Resolución N.º NAC-DGERCGC26-00000009". <img width="1676" height="303" alt="image" src="https://github.com/user-attachments/assets/79ae91b2-6d31-442f-af3c-74304742c8b6" /> BP: #252917 Forward-Port-Of: odoo/odoo#254240 Forward-Port-Of: odoo/odoo#254018
Resolved issues and error corrections
This update fixes an error in how Pakistan payroll taxes are calculated for employees earning over 2.2 million annually. The system was incorrectly adding tax amounts instead of replacing them at each income bracket, resulting in overstated tax calculations. This fix ensures employees are taxed according to official Pakistan tax bracket rules.
Original PR description
Currently, payslip computation for Pakistan localization calculates incorrect tax when the yearly cost exceeds 2,200,000. ### **Steps to Reproduce:** 1) Install…
Currently, payslip computation for Pakistan localization calculates incorrect tax when the yearly cost exceeds 2,200,000. ### **Steps to Reproduce:** 1) Install `l10n_pk_hr_payroll_account`,`hr_contract_salary` with demo data. 2) Switch to PK company. 3) Create an employee and a running contract with yearly cost 2,200,001 4) Create a payslip and compute it from the Salary Computation tab. ### **Observed Behavior:** 'Tax Bracket Yearly' is computed as `122000.24` ### **Expected Behavior:** 'Tax Bracket Yearly' should be `116000.24` ### **Root Cause:** since [commit](https://github.com/odoo/enterprise/pull/98345/commits/62f5e216518d83317618d7dbc0be4db92d1881a3), the tax computation relies on [_l10n_pk_get_tax](https://github.com/odoo/enterprise/blob/a9656336583a4d5c5b12d4d6120ec62ba1cf9151/l10n_pk_hr_payroll/models/hr_payslip.py#L9-L20) , In this method, the `result` is incorrectly accumulated with `fix` when iterating through brackets, leading to an inflated tax value. [official pakistan document](https://download1.fbr.gov.pk/Docs/20258181281745641WHT-RateCard.pdf) ### **Fix:** Use `result = fix` instead of `result += fix` so that the cumulative tax is correctly reset at each bracket. **opw-5979265** Forward-Port-Of: odoo/enterprise#110939
Fixed an issue where subscription product billing periods were not showing when products were displayed as snippets on website pages, even though they appeared correctly on the shop page. This ensures customers see complete pricing information including billing frequency when browsing subscription products anywhere on the website.
Original PR description
Steps to reproduce: 1) Go to the Website app. 2) Add a product snippet to any page using the editor. 3) See product card of any subscription product. Issue: - The billing period is not displayed for subscription products in the product snippet, unlike on the shop page. Cause: - `temporal_unit_display` is not included in the `combination_info`which is passed in data used by the product snippet. Fix: - Include `temporal_unit_display` in `combination_info`. opw-6070943 Forward-Port-Of: odoo/enterprise#112171
Ecuador's tax withholding percentages have been updated for 2026 in compliance with the new government resolution. The system's automated tests have been updated to reflect these new tax rates to ensure accurate tax calculations and reporting for Ecuadorian businesses.
Original PR description
In accordance with the implementation of the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. Unit tests are updated to be based on the new withholding percentages. BP #110343 Forward-Port-Of: odoo/enterprise#110879 Forward-Port-Of: odoo/enterprise#110712
This fix corrects how the Master Production Schedule (MPS) calculates safety inventory levels for component products when they have indirect demand from parent products. Previously, safety stock targets were not being properly considered when determining production quantities for components, leading to incorrect demand forecasts. This update ensures that safety inventory requirements are accurately factored into the production planning calculations.
Original PR description
Steps to reproduce: ------------------- * Enable "Master Production Schedule" in Inventory settings * Create tracked Product "Child" and set up a vendor * Create tracked Product "Parent" and set up a…
Steps to reproduce: ------------------- * Enable "Master Production Schedule" in Inventory settings * Create tracked Product "Child" and set up a vendor * Create tracked Product "Parent" and set up a bom as component "Child" and Lead Time: 2 days * Create tracked Product "GParent" and set up a bom as component "Parent" and Lead Time: 2 days * Open MPS and add your three products: - Child, Parent: activate indirect demand - Parent: Safety Stock Target of 10 * Add 1 in the forecast demand for "Gparent" on third column -> Will have 20 Indirect Demand Forecast of Child in the first column and -9 on the second Observation: ------------- Usefull comment form the function : https://github.com/odoo/enterprise/blob/b332af45a46b2295797a5096f68b7953554a495b/mrp_mps/models/mrp_mps.py#L424-L447 When creating a demand from the MPS, it will always take the first date of the interval (ex: Week 10 (2-8/Mar), it will create the demand for the 2 of Mars) When calculating the production schedule. we wil we calculate each product for each date_range: https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L488 https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L509 When calculating the values for a product, we will set the indirect demand qty for it component The demand will created the demand in function of the date of when the parent need and the lead time (it will for the previous date range because of the lead time): https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L554 https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L555 If the demand is not equal to the resplensih_qty we will create another demand to compensate, it will use the first date of range minus the lead time it will send it to the previous date range: https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L556-L560 In our case this will create the issue, since it will try to compensate each time on the previous week. opw-5413838 Forward-Port-Of: odoo/enterprise#107671
This fix resolves an issue where the "Load more" line was being hidden when users enabled the "Hide lines at 0" option in financial reports. The update ensures that "Load more" lines remain visible even when zero-value lines are hidden, allowing users to access additional data when needed.
Original PR description
When activating the 'Hide if 0' option, the 'Load more' line is hidden. Fix: Filtering out the lines with empty columns (Load more lines) from the zero lines. Steps: - Open GL (occurs with other reports as well), and open configuration for this report - Set Load more limit to 1, and hide if zero to optional - Go back to GL report and select the 'Hide lines at 0' option -> Load more lines are hidden as long as the zero lines opw-5953725 Forward-Port-Of: odoo/enterprise#109380
This fix corrects a bug where users could incorrectly change the "Recurring" setting on subscription products that have confirmed orders. Previously, rapid clicks on the setting could bypass the intended protection. The fix now properly validates against the server's current value instead of the form's temporary value, ensuring the setting cannot be changed when orders exist.
Original PR description
**Problem:** When attempting to change "Recurring" on products in the form view, if there are confirmed SOs, the change should be reverted and a message should appear explaining this. However, there is a bug in how the change is reverted where it takes the current form value of the field. This cannot be trusted as it's possible to trigger another onchange before the first one resolves, so the second onchange is based on the wrong value. **Steps to Reproduce:** - w/Demo Data, go to product "Office Cleaning Service (SUB)" (This is a subscription product which has confirmed SOs) - Quickly click the checkbox for "Recurring" twice -> Two warnings appear, but Recurring is False and can be saved **Solution:** Instead of reading the current form value and setting its opposite, we can revert to the current value on the server. Forward-Port-Of: odoo/enterprise#110877
This update fixes two issues in the Dutch tax reporting module. First, it corrects a bug where wrong contacts were being added as followers to tax documents, causing them to receive unwanted notifications. Second, it improves the automated tax status processing to ensure all records are properly handled instead of only the last one.
Original PR description
The method call that is supposed to subscribe the current user to the closing entry when posting XBLR used the User id as a Contact id. This caused random contacts to be added as followers of the chatter thread and as a result receiving notifications for it. The fix is simply using the id of the User's Contact instead. Also, as discussed with prro on Discord, fixed the cron clearing its dictionary each loop. opw-5886621
The leaderboard rankings for weekly and monthly time periods were displaying users in the wrong order. This fix ensures that when viewing leaderboards filtered by specific time periods (like "This Week" or "This Month"), users are correctly ranked based on their actual performance during that period rather than their all-time karma score. This improves the accuracy and fairness of the gamification leaderboards.
Original PR description
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or…
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or "This Month"). The system would first retrieve users sorted by their *all-time* global karma, apply pagination (taking the top X users), and only then calculate the karma gain for the specific period for those few users. This caused users with high recent activity but low all-time karma to only be displayed much later in the page order than they should. This commit fixes the issue by introducing a pre-search step that calculates the karma gain for the requested period at the database level. Pagination is now applied to this specific result set, ensuring users are correctly ranked by their actual performance during that week or month. Note: A new method `_get_users_by_tracking_karma_gain` was added to `res.users` to handle this logic. This approach was chosen to strictly preserve the signature of existing methods for the stable version. A distinct refactor to unify these calculation methods is planned for the master branch. Steps to reproduce: - Install the eLearning module. - Create a few users with different karma_points (more than 25 to have 2 pages). - Go to /profile/users. - Group by week. - Paginate, and you will notice that the order is wrong; the first user on the second page might have more points than users on the first page. Also, when the logged-in user is not on that page, they do not appear at the bottom. task-5344657 opw-3979785 Forward-Port-Of: odoo/odoo#256908 Forward-Port-Of: odoo/odoo#176626
Fixed a test in the Recruitment module that was failing during a specific time window (11 PM to midnight UTC) due to timezone handling. The test now properly accounts for user timezone settings and uses time freezing to prevent failures near midnight. This ensures the recruitment testing process runs reliably regardless of when tests are executed.
Original PR description
The test was failing between 23:00 and 24:00 UTC due to the activity being created the previous day for a user in UTC+1, since Date.today() wasn't considering the current's user timezone. Also, use `freezetime` to avoid running the test close to midnight. runbot-241150 Forward-Port-Of: odoo/odoo#254353
Optional product tables in sales documents were not displaying with the correct styling due to structural differences in the HTML. This fix applies the proper table formatting to ensure optional products appear consistently with other report tables. Users may need to update their document layout settings for the color changes to take effect.
Original PR description
Issue: In sale_management the optional product table doesn't get the report table styling. This is due to a different DOM and missing classes. This fix applies the styling to match the optional product table structure. While the table is in `sale_management` the change is applied in `web` to avoid having to update the module for customers. Note: the color applied in `report_templates.xml` requires that the user change is layout in the document layout configurator then save again for it to apply. task-6009941 opw-5960426 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252430
This fix resolves an issue where refunds created from invoices containing multiple lines with the same product, price, and discount would incorrectly match lines. The system now properly matches each refund line to a unique invoice line using a smarter algorithm that considers product, price, discount, and quantity, preventing duplicate matches and ensuring accurate refund processing.
Original PR description
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail because it would match the first matching line over and over again. Also, lines should not match based on line label, as it can be modified in the refund. This commit solves these 2 issues by 1) Preventing matching an invoice line more than once with refund lines 2) Preventing matching based on line label The new algorithm finds the best match for a refund line from the invoice lines with the following criteria: 1) same product 2) same unit price 3) same discount 4) invoiced quantity should be at least equal to the refunded quantity 5) invoice line should not be matched before 6) from the lines that match previous criteria, we pick the one with the minium quantity task-6004207 Forward-Port-Of: odoo/odoo#256365 Forward-Port-Of: odoo/odoo#252200
This fix prevents the system from incorrectly creating absence records for employees whose contracts haven't started yet. Previously, when running the absence detection process, employees with future contract start dates would be flagged as absent, creating inaccurate overtime records. The system now properly filters out employees without active contracts.
Original PR description
### Steps to reproduce: - Create an employee with contract starts in the future - Activate the Absence Management from attendance settings - Run the cron of Absence Detection - Notice an absence attendance got created for the emp with the future contract ### Cause: We don't check for contracts start dates when fetching absent employees and we get expected attendance for them from their working schedule so we create -ve overtime for them. ### Fix: We filter the absent employees on their running contracts. It has been fixed in since 18.4 in this commit https://github.com/odoo/odoo/commit/5db242416522524849a20eb83df3937c193c98d3 opw-5942239 Forward-Port-Of: odoo/odoo#253358
This fix resolves critical errors that prevented users from validating inventory pickings and viewing product quantity information when their database had many storage locations. The system was generating excessively complex database queries that caused memory exhaustion. By reverting a previous change, the system now handles these operations efficiently, allowing warehouse staff to complete their daily inventory tasks without system failures.
Original PR description
This reverts [1] With enabled valuation and in case of a DB with many locations, it is currently impossible to validate a picking or open the on hand quantity smart button: it will lead to a…
This reverts [1]
With enabled valuation and in case of a DB with many locations, it is currently
impossible to validate a picking or open the on hand quantity smart button:
it will lead to a traceback, for instance:
```
Traceback (most recent call last):
[...]
File "/home/odoo/src/odoo/addons/stock/models/stock_picking.py", line 1432, in button_validate
pickings_to_backorder.with_context(cancel_backorder=False)._action_done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/addons/stock_account/models/product.py", line 205, in _prepare_valuation_layer_field_values
"total_value": avg_cost * self.sudo(False)._with_valuation_context().qty_available if avg_cost else 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/addons/stock/models/product.py", line 172, in _compute_quantities_dict
moves_in_res = {product.id: product_qty for product, product_qty in Move._read_group(domain_move_in_todo, ['product_id'], ['product_qty:sum'])}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/odoo/sql_db.py", line 371, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.SyntaxError: memory exhausted at or near "("
LINE 1: ...((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...
```
[1] https://github.com/odoo/odoo/commit/c71c21647d468bd1f2e3261b6b612a060c4b6461
OPW-6083436
Forward-Port-Of: odoo/odoo#256799This update adds support for price, currency, and support fields in the app manifest validation for the Odoo apps store. These fields are now recognized as valid manifest keys, allowing app developers to properly specify pricing and support information when publishing apps to the store.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255857
Mozambique users were seeing the incorrect Brazilian tax ID label "CPF/CNPJ" on their sales orders and invoices instead of the correct Mozambican label "NUIT". This fix adds the proper tax ID label for Mozambique so users now see the correct terminology on their business documents.
Original PR description
Currently the "Tax ID" title used e.g. on sales orders, invoices, etc. was translated as "CPF/CNPJ" in Portuguese, which is the tax ID used in Brazil. However, in Mozambique, the tax ID is called "NUIT", and there is no language variant for Portuguese in Mozambique. This caused Mozambique users to see "CPF/CNPJ" instead of "NUIT" on their documents, which was wrong. This commit adds a `vat_label` field for Mozambique to display the correct tax ID label. Issue reported by functional support. Forward-Port-Of: odoo/odoo#256603
This update fixes a validation issue in the payment demo module to ensure provider configuration is properly checked. The fix prevents potential errors when processing payments by validating that the payment provider is correctly configured before transactions are processed.
Original PR description
opw-3097856 Forward-Port-Of: odoo/odoo#256362
This fix resolves an issue where replacing the contact form on the /contactus page would cause submission errors. The problem occurred because the system was using email settings from the old form configuration even after the form was deleted and recreated. The fix ensures that email settings are only applied when the original form is still present, preventing mismatches that break new forms.
Original PR description
Problem: There is a data-for span in the /contactus page that sets specific values on the page's form. If this form is deleted and a new form is added, an error will occur when trying to submit the new form. This is because the value set for website_form_signature will use the email set in the data-for, which will not match with the new form. Purpose: Modify the code that sets the website_form_signature value to ensure that the original form is present as well if using the data-for values. Steps to Reproduce in Runbot: 1. Use the Website Editor to delete the form on the /contactus page and create a new one. 2. Attempt to submit the new form. opw-5956030 Forward-Port-Of: odoo/odoo#253410
This update allows users to delete certain zero-value accounting lines that may have been automatically created with incomplete information. This gives users more flexibility in cleaning up their accounting records and ensures only accurate, meaningful transactions are retained in the system.
Original PR description
-added some conditions to allow the user to remove some zero move lines as they may have been created and do not have good information. task-4590580 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202272
Fixed an issue where the bold formatting button would not remove bold styling when the selection included embedded components like files. The system was incorrectly counting non-editable elements when determining whether to apply or remove bold formatting, causing the toggle to get stuck in "apply bold" mode. Now only editable text is considered when making this determination.
Original PR description
When determining whether the "bold" action is about adding bold or removing bold, non-editable text nodes are also taken into account. Because of this, if the selection contains an embedded component such as `/file`, it always considers bold was not applied on all nodes, and should therefore be applied. The action thus never removes bold. This commit fixes this by only taking into account the editable nodes. Steps to reproduce: - Go to a "To do" note - Add a few lines of text - Add a `/file` in the middle - Select all - Press Ctrl+B: bold is applied on the surrounding text - Press Ctrl+B again => Bold was not removed from the surrounding text task-5955977 Forward-Port-Of: odoo/odoo#249816
This fix resolves an issue where PDF invoices containing embedded XML attachments organized in a nested structure were not being processed correctly. The system now properly extracts data from both flat and nested PDF file structures, ensuring that bills uploaded to the accounting dashboard are no longer empty when they contain these types of PDFs.
Original PR description
Steps to reproduce: - From the accounting dashboard, upload a PDF containing intermediate /Kids nodes representing separate xml attachments Issue: No xml will be extracted, as result the bill will be empty. However, in the chatter pdf preview, the js pdf toolkit correctly show the xml attachemnts. Analysis: The PDF spec defines two ways to organize embedded files under /EmbeddedFiles in the document's name dictionary: - /Names: a flat array of pairs located directly under /EmbeddedFiles - /Kids: an array of child nodes, each of which carries its own /Names array. The extractor currently only handled the /Names case, not detecting embedded attachments in case of PDF using a /Kids tree. This change add lookup for both structures. opw-5929274 Forward-Port-Of: odoo/odoo#252523
This fix resolves a crash that occurred in the Point of Sale system when scanning GS1-formatted barcodes for products with multiple variants. The system was incorrectly trying to process lot numbers as product barcodes, causing the application to fail. The fix ensures the correct product information is passed through the system so variant selection works properly.
Original PR description
**Steps to reproduce:** * Install `point_of_sale` module. * Go to Settings: * Enable Lots & Serial Numbers. * Enable Variants. * Set Barcode Nomenclature to Default GS1 Nomenclature. * Create a…
**Steps to reproduce:**
* Install `point_of_sale` module.
* Go to Settings:
* Enable Lots & Serial Numbers.
* Enable Variants.
* Set Barcode Nomenclature to Default GS1 Nomenclature.
* Create a product:
* Enable Track Inventory set to By Lots.
* Under Attributes & Variants:
* Add an attribute with two values and save.
* Generate product variants:
* Open one variant and set barcode to 5123648695416.
* Update inventory:
* Go to the main product (template).
* Update On Hand Quantity:
* Update On Hand Quantity with a lot/serial number:
010512364869541610784512.
* Select the variant with the defined barcode.
* Under Point of Sale tab:
* Set a POS Category.
* Open a POS session and scan:
010512364869541610784512.
**Observed behavior:**
* Scanning the GS1 barcode in POS raises a traceback:
*TypeError: Cannot read properties of undefined (reading
'product_template_attribute_value_ids')*.
**Cause:**
[Scans GS1 barcode: 010512364869541610784512]
│
├─ ProductScreen._barcodeGS1Action(parsed_results)
│ • product = await _getProductByBarcode(productBarcode) ✅ found
│ • calls `addLineToCurrentOrder(vals, { code: lotBarcode })`
│ ⚠️ only `lotBarcode` passed, `productBarcode` discarded
│
├─ PosStore.addLineToCurrentOrder() → addLineToOrder()
│ • product has variants → isConfigurable() = true
│
├─ PosStore.handleConfigurableProduct()
│ • calls openConfigurator(productTemplate, { ...opts })
│ opts = { code: lotBarcode }
│
└─ PosStore.openConfigurator()
• opts.code = lotBarcode → truthy → enters if(opts.code) branch
• getBy("barcode", opts.code.base_code)
• getBy("barcode", "784512") ← "784512" is a LOT number, not a product barcode!
→ returns undefined ❌
• product packaging lookup also fails → undefined ❌
• product = undefined
│
└─ attributeLinesValues.map(values =>
values.filter(value =>
product.product_template_attribute_value_ids.includes(value)
^^^^^^^ undefined → 💥 TypeError
**Fix:**
* Pass the product from `handleConfigurableProduct` to the configurator.
* If no product is found using `opts.code`, use the passed product
instead.
---
opw-6031909This fix corrects an issue where items added to repair orders and then sold through the Point of Sale system were calculating costs incorrectly. The system was using a standard price instead of the actual FIFO inventory cost, resulting in overstated cost of goods sold. The fix ensures the correct inventory cost is retrieved when processing these repair-to-sale transactions.
Original PR description
1) Create a product with FIFO - automated costing method 2) Initial quantities updated 2 with the unit value 7. (2*7) =14 3) Create purchase order with 1 unit and price 10 4) Add this product into the repair order (as a line) > Validate the repair 5) Create a sale order from the repair order 6) Settle this sale order from the POS > Invoice the order Expected behavior: A cogs for 7$ Current behavior: A cogs with 8$( std price ) It happens because the stock.move are linked to the repair order and not generated from the PoS. So the cogs value can't be retrieve in the usual way. In order to fix it, we check the move linked to the sale.order if there is no move generated by the pos. Forward-Port-Of: odoo/odoo#241286
This fix corrects how the system identifies internal email aliases when domain restrictions are configured. Previously, external emails matching an alias name could be incorrectly treated as internal, causing notification routing issues. The update ensures only emails from allowed domains are recognized as internal aliases, improving email delivery accuracy.
Original PR description
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains…
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains internal emails (aliases to filter) AND external email addresses (should not be filtered). The `_find_aliases` method is used to identify internal system emails (aliases, bounces, catchalls) to prevent mail loops and ensure correct recipient filtering during notification grouping. Before this fix, when the `mail.catchall.domain.allowed` system parameter was set, the logic for local-part aliases (where `alias_incoming_local` is True) failed to correctly associate the local part with the allowed domains. This resulted in external email addressed being returned by the system, potentially leading to incorrect notification routing. We now use a more robust approach: - Pre-filter local parts based on the allowed domains to reduce DB load. - Utilize Python Sets for O(1) lookups of static and local aliases - Explicitly validate the (local_part, domain) combo during the final filtering. Example Scenario: - Config: mail.catchall.domain.allowed = "test1.com,test2.com" - Alias: "info" (alias_incoming_local=True) - Input: ["info@test1.com", "info@test3.com"] ### Output Before Fix: ["info@test1.com", "info@test3.com"] (The function failed to recognize info@test3.com as an external alias to be ignored based on the `mail.catchall.domain.allowed` config) ### Output After Fix: ["info@test1.com"] (Correctly identifies the internal alias tob filtered while ignoring the external one) OPW-5469264 OPW-5504201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr