Monday, September 7, 2026
22 changes · 19.0
Enhancements to existing features
Swiss QR invoices can now be generated even when a company or customer address is missing a street or building number, since these details are not required in Switzerland. Users will see an information banner in the Send & Print flow for affected customers, and batch processing can continue instead of being blocked by one problematic invoice.
Original PR description
In Switzerland, the street and building number is not required to generate a valid QR invoice. To minimize friction, errors are no longer raised if they are missing from the address of the company or the customer during the creation of the QR Code. Instead, an info banner is now displayed in the Send & Print popup indicating to the user that the addresses of some of the customers are missing and allow the user to browse through those customers. task-4349496 opw-4317153 Forward-Port-Of: odoo/odoo#271534
Duplicating sections with many lines is now much faster and less likely to time out. The change reduces repeated server calls by processing duplicated line updates together, improving responsiveness for users working with large sales documents.
Original PR description
Issue: Sections containing a large number of subsections or lines can take too long to duplicate and may eventually time out. The slowdown stems from the onchange issues in `_duplicateRecords()` in…
Issue: Sections containing a large number of subsections or lines can take too long to duplicate and may eventually time out. The slowdown stems from the onchange issues in `_duplicateRecords()` in sale.order.line. Each sale.order.line is first created as an empty datapoint, which triggers an onchange RPC. The copied values are then applied, triggering a second onchange RPC for every duplicated line. Fix: Prepare the copied values before creating the datapoints and send them through a batched onchange. This retrieves the required onchange values for all duplicated lines in a single RPC. Benchmarks: sale.order.line onchanges: Note: "Timing Before" is calculated by the difference between the first and last sale.order.line onchange completion times. | Lines | RPCs Before | RPCs After | Timing Before | Timing After | Speedup | | ----: | ----------: | ---------: | ------------: | -----------: | ------: | | 10 | 20 | 1 | 0.31s | 0.04s | 5.52x | | 50 | 50 | 1 | 1.62s | 0.14s | 11.67x | | 100 | 200 | 1 | 3.41s | 0.25s | 13.64x | | 500 | 1000 | 1 | 10.98s | 0.96s | 11.43x | | 1000 | 2000 | 1 | 31.07s | 2.74s | 11.34x | Related: opw-6395475
Installing the Colombian DIAN localization is now faster and less likely to time out on large accounting databases. The change avoids unnecessary setup-time processing of existing invoices while keeping normal calculations in place for future records and updates.
Original PR description
- Pre-create the stored computed columns `l10n_co_edi_type`, `l10n_co_dian_state`, and `l10n_co_edi_cufe_cude_ref` in `_auto_init()`. - This prevents Odoo from computing and writing these fields for all existing `account.move` records when installing `l10n_co_dian`. - This is particularly important for large databases with a high volume of Colombian accounting moves, where the initial computation can take too long and cause the module installation to hit the time limit. - The compute methods are kept unchanged, so the fields continue to be computed normally for subsequent record creation or dependency changes. **opw-6451331** Forward-Port-Of: odoo/enterprise#130059 Forward-Port-Of: odoo/enterprise#129507
Resolved issues and error corrections
Time off requests now keep the correct duration even when an automated rule creates an approval activity at the same time. This prevents employees and managers from seeing valid leave requests incorrectly recorded as 0 days or 0 hours.
Original PR description
Current behavior: -- With an active automation rule (base_automation) whose action creates an activity (e.g. a "Time Off Approval" activity) on hr.leave creation, every newly created time off request…
Current behavior: -- With an active automation rule (base_automation) whose action creates an activity (e.g. a "Time Off Approval" activity) on hr.leave creation, every newly created time off request has a duration of 0 days / 0 hours, regardless of the requested dates. Expected behavior: -- The leave duration is computed from the requested dates, unaffected by the presence of an activity-creating automation rule. Steps to reproduce: -- - Create an automation rule on hr.leave, trigger "On Creation & Update". - Add an action that creates an activity (type "Time Off Approval"). - Create any time off request for an employee with a working schedule. - The request shows a duration of "0 days" (or "0 hours"). Cause of the issue: -- When an automation with a "Create Activity" action runs on leave creation, base_automation schedules the activity after the record is created. Creating the activity reads the leave record, forcing an early flush of its pending computes. At that point date_from/date_to are not yet settled, so the duration compute (number_of_days/number_of_hours) reads empty dates and stores (0, 0). As these are stored fields, they are marked done and never recompute. Fix: -- In create(), after the record is created and its dates are settled, recompute the duration explicitly so any zero stored by an early flush is overwritten with the correct value. opw-6235902 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#286299 Forward-Port-Of: odoo/odoo#284373
This fix makes product identifiers sent to Google Analytics match the identifiers used in Google Merchant Center feeds. This helps Google Ads correctly connect Shopping ad clicks with purchases, reducing mismatch warnings and improving attribution accuracy.
Original PR description
**Issue:** When google analytics (GA) and google merchant center (GMC) are setup, Google Ads diagonistic reports that item IDs cannot be matched to Merchant Center. **Why this happens:** `order_lines_2_google_api` sets `product.barcode or product.id` for `item_id`, while `product.feed._prepare_gmc_items` defaults to `product.default_code or product.id` for the feed's `id` field. Google Ads/Analytics attribution relies on GA4's `item_id` matching GMC's `id` for the same product to connect Shopping ad clicks to purchase events. **References:** https://support.google.com/merchants/answer/6324405?sjid=15224664355638221483-NC https://support.google.com/google-ads/answer/14943675?hl=en opw-6443326
Point of Sale now correctly includes product variant extra charges when applying a pricelist that is based on another pricelist. This prevents discounted or chained pricelists from showing prices that are too low, helping cashiers charge the intended amount.
Original PR description
## Steps to reproduce: - Create a product, with never variant, the variant has an extra price of 100 - Make Pricelist 1, just leave it as default - Make Pricelist 2, make it a discount, based on Pricelist 1, for all products - Go to the PoS, click on the created product - Change the pricelist to Pricelist 2 -> the price does not take the extra price into account ## Why the fix: When we have a pricelist based on another pricelist, we recursively calculate the price on the base pricelist. Before this commit, in the recursive call, we gave 0 as the extra price. We now give the extra price in the recursive function call. opw-6500086 Forward-Port-Of: odoo/odoo#286264 Forward-Port-Of: odoo/odoo#285371
This fixes Saudi Arabia localization upgrades so tax tags and VAT grids are updated automatically when moving to Odoo 19. It prevents invoices from using outdated tax tags and removes the need for manual localization reloads after migration.
Original PR description
**Issue:** During migration to Odoo 19, the SA tax tag migration logic is present in: "migrations/2.1/pre-migrate.py" was not executed during the migration of databases because this: * SA compact tax…
**Issue:** During migration to Odoo 19, the SA tax tag migration logic is present in: "migrations/2.1/pre-migrate.py" was not executed during the migration of databases because this: * SA compact tax tags were not renamed * VAT tax grids still use old tags * Localization reload was partially updating taxes * manual intervention was required Added logs/debugging in: * 2.1/pre-migrate.py * 2.1/end-migrate.py * 2.2/end-migrate.py - Verified in both local and customer databases that only the 2.2 migration path was executed during upgrade, while the 2.1 migration scripts were skipped because the Odoo 19 manifest upgrade path already targeted the 2.2 migration version. - 19:https://github.com/odoo/odoo/blob/67510fd36f7af31f83ef110602f9922ed5a43024/addons/l10n_sa/__manifest__.py#L6 **Solution:** - Bumped the l10n_sa module version to 2.3 to apply these changes to databases that are already in production. - Moved `migrations/2.1/pre-migrate.py` to `migrations/2.3/pre-migrate.py` to ensure the SA tax tag migration logic is executed during the `2.3` upgrade flow. - Moved `migrations/2.2/end-migrate.py` to `migrations/2.3/end-migrate.py` to align with the `2.3` version bump and refresh the SA tax mappings correctly during migration. * SA tax tags migrate correctly * VAT tax grids update automatically * invoices use new tags correctly * No manual localization reload required OPW - [6117408](https://www.odoo.com/odoo/project/70/tasks/6117408), [6224788](https://www.odoo.com/odoo/project/70/tasks/6224788) 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
Closing a form or dialog during a file upload no longer triggers client error popups when the upload finishes. This avoids a disruptive user experience and reduces the chance of uploaded files being left unattached.
Original PR description
Description of the issue/feature this PR addresses: A file upload through `FileInput` (and therefore every `many2many_binary` field) still calls `onUpload` after the component has been destroyed.…
Description of the issue/feature this PR addresses:
A file upload through `FileInput` (and therefore every `many2many_binary` field) still calls `onUpload` after the component has been destroyed. When the form or dialog holding the field goes away while the upload request is in flight, the response crashes the web client with two "Odoo Client Error" popups and the uploaded attachment is orphaned.
Steps to reproduce on a stock database (19.0, and 17.0 carries the same code):
1. Open an Email Template form (Settings > Technical > Email Templates), page *Options*, field *Attachments*. Any `target="new"` wizard with a `many2many_binary` field shows the same thing, e.g. the Recruitment *Refuse* wizard.
2. Pick a file that takes a moment to upload (a few MB, or a slow connection).
3. Before the file tile appears, leave the form through the breadcrumb, or close the wizard with Escape, its close button, or its action button. Nothing in the field shows that an upload is still running, so users do this routinely.
Current behavior before PR:
When the upload response arrives, two errors are raised:
```
UncaughtPromiseError > Component is destroyed
at webRead <- _loadRecords <- _applyCommands <- addAndRemove
TypeError: Cannot set properties of null (setting 'value')
at FileInput.onFileInputChange
```
Cause: `FileInput` posts the file through the `http` service, which is not protected against a destroyed component (unlike `orm`), so the response still reaches `onFileInputChange` after the component, the field and the form controller are gone. It then calls `onUpload`, which for `Many2ManyBinaryField` links the attachment through the form controller's protected ORM (hence the rejection), and it clears a file input ref that no longer exists (hence the TypeError).
We hit this in production on three different wizards over a few months. The client error logs users saved all carry the same trace, and the audit log shows the dialog's action completing a fraction of a second before the upload landed.
Desired behavior after PR is merged:
After the upload resolves, `onFileInputChange` stops when the component is destroyed: nobody is left to receive the uploaded files, and this matches how the protected services already treat a destroyed component. No error is raised, and `onUpload` is not called.
A Hoot test in `file_input.test.js` mounts a `FileInput` behind a `t-if`, starts an upload, unmounts the input while the upload is pending, resolves the upload, and asserts that `onUpload` was not called. It fails before the fix with the two errors above and passes after.
`master` already guards the ref write through its signal-style refs, but still calls `onUpload` on the destroyed component, so the first error remains there.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix prevents restaurant tables in the German point of sale flow from opening before the required Fiskaly certification update has finished. It helps avoid blocked or confusing table-opening behavior and makes the checkout experience more reliable for staff.
Original PR description
In this commit: ------------------ - The API call is triggered when an order is updated in Fiskaly. - Previously, the request could be awaited while opening a table, blocking the table from opening before the product screen was ready. - Now, the request is awaited before allowing the table click, ensuring the table opens only after the request is completed. Task: 6522079
Fixes issues in the Documents spreadsheet template dialog where the search bar could disappear after a search with no results and the custom filter option could crash. Users can now search and refine template lists more reliably when creating spreadsheets from Documents.
Original PR description
- templates searchbar disappear when the search has no match - Clicking "Add a custom filter' in the searchbar crashes Task-6526322 Forward-Port-Of: odoo/enterprise#130376 Forward-Port-Of: odoo/enterprise#130096
French Point of Sale invoices for customers using France E-Invoicing now download as regular invoices when required data is missing, instead of incorrectly showing as pro-forma documents. This keeps checkout flowing while avoiding misleading invoice PDFs and prevents sending incomplete data to external e-invoicing services.
Original PR description
## Steps to reproduce: - Create a customer with France E-Invoicing (UBL2.1) as eInvoice format in a French company - Go to the PoS, select that partner - Make a sale and ask for an invoice - The…
## Steps to reproduce: - Create a customer with France E-Invoicing (UBL2.1) as eInvoice format in a French company - Go to the PoS, select that partner - Make a sale and ask for an invoice - The downloaded invoice will be a pro-forma invoice ## Why the fix: The pro-forma should not be used here, it is because it is used as a fallback when we get an error while trying to print the invoice. https://github.com/odoo/odoo/blob/4a508586970e44367bbdbbb3cbe88ffb5a1eadb7/addons/account/models/account_move.py#L6187-L6204 As we get an error while trying to send the data with this setup, it goes to the fallback and prints a pro-forma invoice, even though this should not be the case, a regular invoice would do. This happens because when an error is found, we do not populate invoice_pdf_report_id, so it goes to the fallback. We now check if there are any errors in the order, and if there are and the customer requests an ubl_21_fr invoice, we just print the invoice as it is, without going to the pro-forma fallback, as this is not the intended flow. With this fix, we now have the same flow as we do in the sales module, that allows the sale even if the customer has missing data. It will just print the invoice and allow the sale but won't send anything to external entities. opw-6428369 Forward-Port-Of: odoo/odoo#281420
Cancelled retail orders and cancelled order lines are now saved and marked appropriately for German fiscal certification. This helps ensure Fiskaly receives accurate cancellation information, supporting compliant retail reporting.
Original PR description
In this commit: --------------- - We now store cancelled retail orders on the server and send the `storno` flag as `true` for cancelled lines and orders to ensure proper handling in Fiskaly. task: 6326042 Relataed PR: https://github.com/odoo/odoo/pull/277648 Forward-Port-Of: odoo/enterprise#129201 Forward-Port-Of: odoo/enterprise#120410
Guest checkout customers who enter a valid EU VAT number now have it verified as soon as their address is created. This allows eligible cross-border EU orders to receive the correct 0% intra-community VAT treatment instead of being charged domestic VAT.
Original PR description
# Description **Steps to Reproduce** 1. Install Belgium Localization, then go to **Settings → Accounting/Invoicing**. 2. Enable **Verify VAT Numbers** (`vat_check_vies`). 3. Go to **Accounting →…
# Description **Steps to Reproduce** 1. Install Belgium Localization, then go to **Settings → Accounting/Invoicing**. 2. Enable **Verify VAT Numbers** (`vat_check_vies`). 3. Go to **Accounting → Configuration → Fiscal Positions** and confirm or create an **Intra-Community** fiscal position with: - Detect Automatically (`auto_apply`): enabled - VAT Required (`vat_required`): enabled - Country Group: EU, no specific country configured 4. Open an incognito/private browser window and make sure the session is unauthenticated. 5. Go to the website's `/shop` page and add any product to the cart. 6. Proceed to checkout until reaching the Address step (`/shop/address`). 7. Enter a delivery address in an EU country different from the company's country (e.g. company in Belgium, delivery address in the Netherlands). 8. In the VAT Number field, enter a real, valid, VIES-registered VAT number corresponding to the delivery country (e.g. a valid NL VAT number for a Netherlands address). 9. Click **Save Address / Continue** and proceed to the Payment step (`/shop/payment`). 10. Check the tax applied to the delivery line and the resulting order total. **Issue** The delivery product and the overall order are taxed at the standard/domestic VAT rate instead of the expected 0% intra-community rate — even though the customer provided a valid, VIES-registered EU VAT number matching the delivery country. **Root Cause** In `base_vat`, `res.partner.create()` unconditionally removes `vies_valid` from the ORM's pending computation queue via `env.remove_to_compute()`, relying on a subsequent `write()` to trigger the actual VIES check. This holds for the standard backend flow, where creation is followed by a `write()` — but the website guest checkout flow differs: - `website_sale` creates the guest partner through `_create_new_address()`. - The partner is created via a single `create()` call, with no follow-up `write()`. - `_compute_vies_valid()` is therefore never triggered. - `vies_valid` remains permanently unset (`NULL`), despite a VAT number being provided. Downstream, `account.fiscal.position._get_vat_required_valid()` reads this unset value as falsy, so the Intra-Community fiscal position's `vat_required` condition fails and is rejected in favor of another applicable position (e.g. EU B2C or Domestic). **Solution** After partner creation, explicitly trigger `_compute_vies_valid()` when the partner has a VAT number and the operation is not part of a file import (`import_file` context) — performing the VIES check immediately instead of relying on a `write()` that guest checkout never issues. **Result** Guest customers providing a valid EU VAT number now get `vies_valid` computed immediately at creation. Fiscal position detection correctly identifies the Intra-Community position, and the expected 0% VAT treatment is applied to the delivery and order. OPW: 6522992 Forward-Port-Of: odoo/odoo#286201
A scheduled cleanup could incorrectly remove embedded journal entry actions from document folders when users were working under a different company. This fix preserves those embedded actions while keeping company-specific access checks for normal use.
Original PR description
Step to reproduce: - You must have at least 2 companies with an account Journal - Create a New Journal Entry actions (child or parent) - Embed it to a folder - Set your company on a different one than the journal's one - Run the Garbage collector cron (Base: Auto-vacuum internal data) - The embed action has been removed The cause of this is that in the `_get_base_server_actions_domain` method in `documents_account` module there is a check on company to avoid using/running the actions when not in the right company. But the garbage collector don't need to have this check. Task-6147618 Forward-Port-Of: odoo/enterprise#122821
Customers can now complete checkout when their cart includes a free promotional reward item, even if the website blocks products with zero prices. This prevents valid orders from being interrupted by an incorrect warning and keeps free gift promotions working as intended.
Original PR description
As of commit b8e790b2, a cart containing a product priced at 0 while the website forbids the sale of zero-priced products is no longer payable: the customer is redirected back to the cart with a warning. Reward lines were caught by that new rule. A promotion offering a free gift whose product has no sale price adds a reward line priced at 0 to the cart, so the whole cart became unpayable even though nothing was wrong with it. This commit excludes reward lines from the zero-priced rule, the same way delivery lines already are. opw-6526396 Forward-Port-Of: odoo/odoo#286740 Forward-Port-Of: odoo/odoo#286464
Restored or duplicated databases with neutralization enabled are now neutralized before background scheduled jobs can detect and run on them. This prevents a short timing window where automated tasks might execute too early, reducing the risk of unintended actions after copying or restoring a database.
Original PR description
Before this commit: If you restore a backup or duplicate a database via /web/database/manager with "Neutralize" enabled, the cron workers had a small window between the creation of the Registry and the neutralization of the database where they could try to execute crons. Since neutralize_database does not require a full registry to run (it only does raw SQL operations), we can run it before the Registry creation (which has the effect, among other things, of making the cron workers aware of the new database). opw-6517819 Forward-Port-Of: odoo/odoo#286532
This fixes an issue where existing Accounting dashboards could use the wrong filter behavior after upgrading to version 19.0. It helps ensure accounting spreadsheet dashboards continue showing data as intended without requiring manual intervention.
Original PR description
Context: With https://github.com/odoo/odoo/commit/682d6ec1ddb825674999e0db1fc0cc48c3be67c5 we introduced `ODOO.FILTER.VALUE.V18` which behaves like `ODOO.FILTER.VALUE` was behaving before 19.0 All…
Context: With https://github.com/odoo/odoo/commit/682d6ec1ddb825674999e0db1fc0cc48c3be67c5 we introduced `ODOO.FILTER.VALUE.V18` which behaves like `ODOO.FILTER.VALUE` was behaving before 19.0 All spreadsheets upgrading from <19.0 to 19.0 have their ODOO.FILTER.VALUE functions converted to the V18 version. The goal is to preserve the backward compatibility for existing spreadsheets. The issue: The dashboard Accounting was updated[^1] to work with the new behavior but the file was not updated to the latest version. It means the data goes through upgrade[^2] and the function is converted, even though the rest of the dashboard is designed to work with the new version. The file was updated by commit https://github.com/odoo-dev/enterprise/commit/58811392bf7813cff39d874916b8dde117921d69, but it requires a module update for existing databases. This commit attempts to fix the issue for existing databases. [^1]: https://github.com/odoo-dev/enterprise/commit/c4e69e36dbd79386193ffbd16e54809dbba8dba8 [^2]: spreadsheet has a client-side upgrade mechanism when it's open.
Colombian withholding reports now calculate the taxable payment basis correctly when vendor bills include partial credit notes. This prevents credit notes from incorrectly increasing reported withholding bases, improving the accuracy of tax certificates and related compliance reports.
Original PR description
**STEP TO REPRODUCE** 1. install l10n_co_reports and account_accountant 2. Create a bill, with a line with a retention tax (3.50% RteFte). 3. Create a partial credit note (unit price less than what's on the bill). 4. Goes to the report 'Certificado de Renteciòn en Fuente', and notice the Monto del Pago Sujeto Retenciòn is not correct. **CAUSE** The sql query multiply tax_base_amount by -1 if debit > 0, which means (because we are dealing with vendor bills) the line is from a credit note, but tax_base_amount is already a signed value so credit notes ends up contributing to the tax base amount while they should reduce it. opw-6235830 Forward-Port-Of: odoo/enterprise#130340 Forward-Port-Of: odoo/enterprise#119716
French PDP Flow 10 reports now validate tax rates before submission and keep VAT breakdowns aligned with invoice totals. Untaxed amounts and exemption reasons are included correctly, reducing reporting errors and inconsistent compliance data.
Original PR description
Flow 10 reports currently send unsupported custom tax rates without reporting an error on the related journal entry. Untaxed invoice lines also produce a zero taxable amount, which makes the VAT breakdown inconsistent with the invoice total. Exemption reasons without a code are omitted from the XML. Validate tax rates before sending. Include the base of untaxed lines in the tax summary and preserve exemption reasons so the generated totals and VAT breakdown remain consistent. No Task id Forward-Port-Of: odoo/odoo#286547
The French PDP Flow 10 report now trims overly long text, standardizes country codes, and validates key company, VAT, and address details before submission. This prevents one bad invoice or journal entry from causing the whole report to be rejected by the public platform.
Original PR description
Some Flow 10 values are generated without applying the length and format constraints expected by the PPF. Long free-text values, oversized VAT numbers, and invalid address data can therefore cause an entire report to be rejected. Limit product names and invoice notes to their allowed lengths and normalize country codes. Validate the declarant SIREN, VAT number lengths, and address values before sending so affected journal entries are marked as errors and excluded from the report. No Task id Forward-Port-Of: odoo/odoo#286817 Forward-Port-Of: odoo/odoo#286536
This fixes cases where Odoo's HTML editor failed to detect or remove text and background colors when those colors were applied through surrounding elements rather than directly on selected text. Users can now reliably clear formatting and see accurate toolbar color indicators, reducing editing errors in emails, webpages, and other rich-text content.
Original PR description
#### Description of the issue: - Color detection only checked the closest element of the selected text nodes, assuming the color is always applied on their direct parent. - This is not always the…
#### Description of the issue: - Color detection only checked the closest element of the selected text nodes, assuming the color is always applied on their direct parent. - This is not always the case: the color can be applied on a `<font>` wrapping an inline element (e.g. a neutral style span created inside button links), or on the list item itself when its content is wrapped in a block (e.g. a heading). - As a result, remove format could not remove such colors, and the background color button of the toolbar was not showing its border as no background color was detected for the selection. - Removing the color of a partially selected list item wraps the targeted text nodes in a default colored `<font>`. With a collapsed selection there is no targeted content: the whole text node holding the cursor was wrapped, so the text around it lost the color of the list item. - That default colored `<font>` was also created inside the `<font>` already wrapping the text, hiding the other colors of the latter from the removal: its background color was never removed and remove format ended up throwing an infinite loop error. #### Desired behavior after PR is merged: - Introduce the `closestColoredElement` util, which returns the closest element applying a color to a node by looking up its ancestors, stopping on `o_default_color` as such an element resets the color of its content, and limited to the closest paragraph related element, list item (color) or table cell (background color). - Use it for the remove format detection and for the background color of the toolbar, which are now correct when the color is not applied on the direct parent of the text. - With a collapsed selection in a colored list item, insert an empty default colored `<font>` at the cursor position, so that only the text typed there is uncolored, leaving the existing text untouched. - Split the `<font>` wrapping the targeted text instead of nesting a new one inside it, and only skip the nodes of a `o_default_color` element when removing the text color, as such an element does not reset the background color. task-6312677 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating multiple Helpdesk teams with website forms no longer creates duplicate Help menus on the website. The system now reuses the existing Help menu for teams on the same website and only removes it when no team still needs it, keeping website navigation clean and consistent.
Original PR description
Currently on creating new helpdesk team everytime a new website menu is created. ### **Steps to Reproduce:** 1) Install website_helpdesk 2) Navigate to `Helpdesk>Configuration>Helpdesk Team`. 3)…
Currently on creating new helpdesk team everytime a new website menu is created. ### **Steps to Reproduce:** 1) Install website_helpdesk 2) Navigate to `Helpdesk>Configuration>Helpdesk Team`. 3) Create 2 helpdesk team with `Website Form` option enable. 4) Navigate to Website. ### **Observed Behavior:** Two Help menus are created. ### **Expected Behavior:** Multiple menus should not be created. ### **Root Cause:** The menu creation logic relies on the following [condition](https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/website_helpdesk/models/helpdesk.py#L111-L112) `team_count_by_website` is built from `_read_group(..., ['website_id'], ...)`, which keys its result by the `website_id` *recordset*, not its id. Looking it up with `team_count_by_website.get(website.id, 0)` therefore always misses and falls back to `0`, so `team_count <= 1` is always `True` regardless of how many teams already exist for that website. The only thing left guarding menu creation is `any(team.website_menu_id for team in teams)`, which only looks at the teams in the current create/write call, not every team on that website. So saving a second team in a separate call always creates another menu. ### Fix: Make the website menu a resource shared by every team with the website form enabled on a given website, instead of "owned" by whichever team created it: - Before creating a new menu, look up other teams (active or archived) that already point to a menu, matched through the `website_menu_id` relation between teams rather than a hardcoded `/helpdesk` URL, so a customized menu URL doesn't cause a duplicate to be created. Reuse that menu when found. - Only delete a menu once no team (active or archived) still references it, checked before removing a team's own reference. **opw-6303846** Forward-Port-Of: odoo/enterprise#130207 Forward-Port-Of: odoo/enterprise#121120