Daily updates from Odoo
Navigate
Branch
Tuesday, July 29, 2025
84 changes
38 changes
New functionality added to Odoo
A new EU scale certification module moves certified weighing features into a dedicated app for point-of-sale setups. It adds clearer certification status details, warnings when certification is missing, and checks to ensure weighed products use supported units like kg or lb.
Original PR description
This PR brings the LNE scale certification code out of `pos_iot` and into a new module. The following changes have also been made: - The Receipt and Orderline XML are now part of the certification checksum. - When certified, clicking the green scale icon will show various details about the certified setup. - When not certified, a warning will be shown in both the customer display and at the bottom of receipts. - Trying to set a product to 'to weigh with scale' which is not using kg or lb will raise an error. - The unit of measure is now shown on the discount section of an orderline. task-4910716 Community PR: https://github.com/odoo/odoo/pull/217135 Forward-Port-Of: odoo/enterprise#90367 Forward-Port-Of: odoo/enterprise#89280
Enhancements to existing features
Businesses using Türkiye localization can now export the General Ledger in the required CSV format and receive it packaged as a ZIP archive. This helps companies meet Türkiye e-Ledger submission rules for selected reporting periods.
Original PR description
This PR implements the necessary functionality for Türkiye’s e-Ledger reporting, as mandated by Türkiye law (Law No: 15570). Taxpayers that switched to e-Invoice/e-Archive are also required to submit their General Ledger (GL) in the e-Ledger format. Summary of the change This update enhances the existing Türkiye General Ledger report in the `l10n_tr_reports` module with the following features: - Adds the ability for users to generate the General Ledger as a CSV file, formatted according to the Türkiye e-Ledger requirements. - Allows export for any selected period, including relevant and filtered fields. - The generated CSV file is automatically compressed into a ZIP archive to comply with the GIB (Türkiye Revenue Administration) guidelines for file delivery. Task-4270136 Forward-Port-Of: odoo/enterprise#91054 Forward-Port-Of: odoo/enterprise#86592
Spreadsheet dashboard edition now includes a clearer translation namespace, helping labels and text be translated more consistently. This is a minor internal improvement that supports better localization quality for users in different languages.
The accounting dashboard now prevents users from clicking Fetch Transactions multiple times for the same bank. This reduces duplicate provider requests and helps avoid synchronization errors or confusion.
Original PR description
The button `Fetch Transactions` shown on a bank in the accounting dashboard can possibly be clicked multiple times in a row by a user. This would cause several calls to the provider causing potential errors. This commit prevents the user from being able to fetch transactions multiple times by removing this button once clicked. task-4900188 Forward-Port-Of: odoo/enterprise#89127
Websocket worker messages now include a clear BUS: prefix so they can be distinguished from other worker messages. This prepares the shared worker infrastructure for broader future use while keeping the current point-of-sale preparation display behavior aligned with the updated message format.
Original PR description
Add the prefix `BUS:` to all websocket worker actions/events. This is a preparation for reuse bus shared worker for other purpose other than websocket. community: https://github.com/odoo/odoo/pull/220852
Return statuses are now handled as predefined choices instead of free text, making them easier to translate and track consistently. This improves clarity for accounting return workflows, including localized Belgian reporting flows.
Original PR description
state field on returns was a char, which caused issues with translation and not clean tracking. To avoid that, we define state a a selection field for the default return flow. For return type with custom flow, a separate selection field is defined task-4840754
New Helpdesk tickets now use five-digit reference numbers, such as 00001, instead of shorter two-digit numbers. This keeps ticket lists in the expected order as ticket volumes grow beyond 99 items, making it easier for teams to track and find tickets.
Original PR description
ordering tickets by ID wasn't working well when the ticket ID exceeds 2 digits make the `ticket_ref` filled with zeros to be 5 digits when new ticket is created. task-4164948
The payroll version list is now easier to use: rows can be opened directly, employee search is more prominent, and the versions menu is available without debug mode. This helps payroll users navigate employee version records faster with fewer extra steps.
Original PR description
In this PR, we introduced some improvement in the version list view. Mainly: making the list row clickable and it will open the employee form with the right view, Adding the employee to the search view in the first position, and enabling the versions menuitem in the payroll app (no need for debug mode to display it). Community PR: https://github.com/odoo/odoo/pull/217146 Related task: 4902608.
Amazon order synchronization is prepared to capture customer VAT numbers when Amazon makes this data available through its order service. This should reduce unnecessary synchronization calls and improve tax information completeness for businesses selling through Amazon.
Original PR description
As Amazon now successfully allows the operation getOrders to send some restricted data, orders synchronization can be refactored so that the flow get two calls less. Additionally, this may allow us to get the TaxInformation in getOrders. task-2927248 & task-2904094 IMPORTANT: see https://github.com/amzn/selling-partner-api-models/issues/414 The SP-API is bugged for this for more than ~~one~~ 4 years now, they don't seem to want to fix it. But this code should work once they do...
The VoIP app now makes it easier for users to review calls, search softphone tabs, and access detailed call history from more places. New reporting details such as duration, day of week, and time slot help teams better understand calling activity and navigate recent calls more efficiently.
Original PR description
This PR introduces some reporting features to the VoIP module. It introduces several improvements to the VoIP module, including the addition of a new button for viewing call history in user settings…
This PR introduces some reporting features to the VoIP module. It introduces several improvements to the VoIP module, including the addition of a new button for viewing call history in user settings and the implementation of a detailed call view with enhanced data fields such as duration, day of the week, and time slot. The call model now computes the duration and time slot based on the start date, and the user interface has been updated to include new menu items for better navigation. Additionally, tests have been added to ensure the correct computation of time slots during different seasons. Also, it adds an expand button to the recent calls tab in the voip wizard so that the user can open the full list view of the recent calls. Also, it adds some predefined filters to the `voip.call` views. Also, it introduces a new `SearchBar` component to enhance the user experience in the softphone interface. The search bar is now included in the address book, agenda, history, and keypad tabs, allowing users to filter entries more efficiently. Additionally, the `onInputSearch` functionality has been debounced in the agenda to improve performance during searches. The history tab now features an expandable button for viewing recent calls, further streamlining navigation.
The Emitted Emissions list view now allows users to hide selected fields. This gives teams more control over the information shown, making the list easier to tailor to their reporting needs.
Original PR description
This commit makes a few field hideable in the Emitted Emissions list view Task-4890193
The signing template property view has been simplified by removing an unused fields section and improving the layout. Clearer labels and better field placement make the form easier for users to read and complete.
Original PR description
Before: - The form view included a notebook with a page named "Fields", which only showed the sign_item_ids field in read-only mode. - This added unnecessary complexity to the layout and was not useful for end users. - Some field labels and positioning were not proper. After: - Removed the "Fields" notebook and the sign_item_ids field from the page layout. - Reorganized the fields for better readability. - Updated associated labels to be clearer and more consistent. Impact: - Simplifies the UI for users by removing unused or redundant sections. - Makes the form easier to read and interact with. task-4896880
VoIP access rules for CRM and HR now use role-specific permissions instead of a broad internal-user setting. This better aligns access with employees who actually use sales or HR features, improving control without changing day-to-day functionality for properly assigned users.
Original PR description
This commit improves the use of security groups in the bridge modules: `voip_hr` and `voip_crm` to use specific groups from `crm` and `hr` modules. Instead of using `base.group_user`, I used `group_sale_salesman` for `crm` and `group_hr_user` for `hr`. This way, the rules are more tailored to the real use of `crm` and `hr`. See also: https://github.com/odoo/enterprise/pull/75445
This update makes a minor visual adjustment to the messaging menu in Odoo's Mail app. It helps keep the interface polished and consistent, with low risk to day-to-day use.
Original PR description
Part of task-4967066
Imported bank statement files are now automatically attached to the bank statement created in Odoo. This makes it easier for users to access the original uploaded file later for review, audit, or reconciliation purposes.
Original PR description
When you inject a coda or an other file, the file is kept in Odoo but not available easily by the user. Now the file is added to the attachments of the bank statement created. taskId-4845181
VoIP call sessions are now cleaned up automatically when a call's status changes to ended, rather than being handled separately in multiple places. This makes call handling more consistent and helps reduce the risk of lingering call sessions after a call finishes.
Original PR description
Instead of clean session in every function that can end a call, it's better that we do it when call model state is changed. Forward-Port-Of: odoo/enterprise#91188
Tax lock dates now also protect closing moves and tax returns for locked periods. This prevents users from accidentally resetting locked tax records and requires manual lock-date changes when a reset is truly needed.
Original PR description
Before the closing move was not included in the tax lock date and could be reset while being locked. Now we also lock the closing move. Same for the return, we lock the return if the period is locked. Before, when we wanted to reset the return, it would automatically revert the lock date. Now user should do it manually otherwise he will not be able to reset the return. task-4818752 Forward-Port-Of: odoo/enterprise#90581 Forward-Port-Of: odoo/enterprise#86305
Resolved issues and error corrections
This update ensures restaurant point-of-sale users are not prompted to send items to the kitchen when processing a deposit payment. It reduces confusion during customer payment settlement and adds automated coverage to prevent the issue from returning.
Original PR description
## After this commit: - A test case is added to verify that on the payment screen, the confirmation to send items to the kitchen does not appear when placing a 'deposit money' order (`pos_settle_due` module). Task: 4851891 Related PR: https://github.com/odoo/odoo/pull/213722
Fixes an issue that could stop users from merging duplicate records in Data Cleaning after a platform data format change. This restores the deduplication merge action, helping teams clean duplicate data without encountering an error.
Original PR description
Currently an error occurs when we try to merge data in deduplication. Steps to replicate: - Go to: Data Cleaning > Configuration > Deduplication. - Open any Deduplication Rules > Deduplicate > select…
Currently an error occurs when we try to merge data in deduplication. Steps to replicate: - Go to: Data Cleaning > Configuration > Deduplication. - Open any Deduplication Rules > Deduplicate > select any record (Make sure at least one record is available in list view). - Click `Merge` on top left. Error: `ValueError: invalid literal for int() with base 10: 'NaN'` The error because of a recent [refactor](https://github.com/odoo/odoo/pull/205486) where the data of a `many2one` will be an object rather than an array. (task-[3547961](https://www.odoo.com/odoo/project/49/tasks/3547961)) In `saas-18.3`, `record.data.group_id` (many2one field) was an array, so the line [1] worked perfectly. But starting in `saas-18.4`, after the change, the value became an object instead of an array. Because of that, `record.data.group_id[0]` is now `undefined`, and `parseInt()` returns NaN, which causes the `int()` on line [2] to throw a `ValueError`. [1] - https://github.com/odoo/enterprise/blob/7d020d73762a17386cae4b68c15a5d59a51fb480/data_cleaning/static/src/views/data_merge_list_view.js#L108 [2] - https://github.com/odoo/enterprise/blob/7d020d73762a17386cae4b68c15a5d59a51fb480/data_cleaning/models/data_merge_group.py#L113 The lines that returns object is [this](https://github.com/odoo/odoo/blob/564348a5172ea98b38c903686c21d007d0e57b48/addons/web/static/src/model/relational_model/utils.js#L517-L523). This commit solves the problem by accessing the ID using `.id` instead. sentry-6739344848 Forward-Port-Of: odoo/enterprise#90157
Subscription product prices on the website now show currency symbols in the correct position for each currency. This avoids confusing price displays for currencies such as the Euro, where the symbol should appear after the amount.
Original PR description
Issue: The currency symbol was always rendered in front of the amount, which is incorrect for currencies like the Euro (where the symbol comes after the amount). Step to reproduce: - install website_sale_subscription - create a product with currency as Euro (with BE company) - go to "Recurring Prices" tab, enable "Accept One-Time" - Open website from smart button Observation: - pound symbol appears in front of price Fix: Use the appropriate options for the monetary field to render the currency symbol Before: <img width="792" height="221" alt="image" src="https://github.com/user-attachments/assets/8c8424da-2222-455c-880d-a34df7eb16c8" /> After: <img width="823" height="203" alt="image" src="https://github.com/user-attachments/assets/97362df2-cc4a-4be5-b836-e15e47e2313b" /> opw-4943114 Forward-Port-Of: odoo/enterprise#90322
When an optional product is added to a subscription order, any discount entered manually is now kept on the resulting order line. This prevents customer-specific pricing adjustments from being accidentally lost and helps ensure subscription quotes and orders remain accurate.
Original PR description
**Current Behavior:** Manual discounts are not retained when adding optional products to the order. **Steps to Reproduce:** 1) Install the sale_subscription module. 2) Create a subscription with a…
**Current Behavior:** Manual discounts are not retained when adding optional products to the order. **Steps to Reproduce:** 1) Install the sale_subscription module. 2) Create a subscription with a recurring plan. 3) Add a product to the Optional Products section. 4) Manually set a discount on the optional product. 5) Click on the Add to Order Lines (cart) button. 6) A new SOL is created. **Issue:** The newly created SOL does not retain the manually set discount. **Cause:** - When the user clicks the Add to Order Lines button, the `add_option_to_order` method is triggered. This method creates a new sale order line (SOL) using values from `_get_values_to_add_to_order`. - In the current implementation, this method is overridden for subscription orders to exclude the discount value from the returned data. https://github.com/odoo/enterprise/blob/42d829ea6e6a98f251cfffc8fb67b5320a5ada12/sale_subscription/models/sale_order_option.py#L17-L21 - This forces a recomputation of the discount based on pricelist rules, which unintentionally removes any manually set discount. **Solution:** - Only remove the discount value from the returned data and trigger recomputation if there is no manual discount. - This ensures that any user-defined discount is preserved when creating the order line. opw-4840735 Forward-Port-Of: odoo/enterprise#90748 Forward-Port-Of: odoo/enterprise#89381
This fixes a costing issue when multiple employees work on the same manufacturing work order. It ensures overlapping employee time is not counted more than once, helping keep work center cost calculations accurate.
Original PR description
Test coverage for community-side diff about calculating a workcenter's cost in a way that omits counting duration within a working interval that was previously counted. opw-4430375 Forward-Port-Of: odoo/enterprise#88402 Forward-Port-Of: odoo/enterprise#81701
Fixed an issue where receiving a file reply in WhatsApp could trigger an error when request debugging was enabled. The system now logs file responses safely, improving reliability for teams using WhatsApp messaging and debugging.
Original PR description
When Debug requests is enable on the whatsapp business account and user replies with the file, a traceback will appear. Steps to reproduce the error: - Install ``whatsapp`` and ``contacts`` - Create…
When Debug requests is enable on the whatsapp business account and user replies with the file, a traceback will appear. Steps to reproduce the error: - Install ``whatsapp`` and ``contacts`` - Create a whatsapp business account > Enable Debug requests - Create a contact > Add a phone number > send whatsapp message with any whatsapp template - Now reply with the file(ex. pdf or image) in message from the contact's whatsapp. - Traceback in terminal Traceback: ``ValueError: A string literal cannot contain NUL (0x00) characters.`` https://github.com/odoo/enterprise/blob/b52a93da7d680b60646cb08a9126cf6c12f5307d/whatsapp/models/whatsapp_account.py#L166 Here, ``message`` contains NUL (0x00) characters because user replies with the file, value for the ``message`` comes from the below response. response: https://github.com/odoo/enterprise/blob/b52a93da7d680b60646cb08a9126cf6c12f5307d/whatsapp/tools/whatsapp_api.py#L49-L57 Here, ``res.text`` contains NUL (0x00) characters. So, it will lead to the above traceback. sentry-6314521165 Forward-Port-Of: odoo/enterprise#91055 Forward-Port-Of: odoo/enterprise#83274
Updated automated checkout tests so they correctly recognize the Payment step after a breadcrumb layout change. This helps keep rental and full website sales testing reliable without changing the customer-facing shopping experience.
Original PR description
Replaced the selector `span div.o_wizard_step_active:contains (Payment)` with `.o_wizard_steplabel.fw-bold:contains(Payment)` to reflect the updated breadcrumb template. Task-ID: 4766612 See also: Community PR : https://github.com/odoo/odoo/pull/210879
The optional columns menu no longer shows the custom field button on bank statement line lists. This prevents users from trying to customize a view where custom fields are not supported, reducing confusion in bank reconciliation workflows.
Original PR description
`Add custom field` button shouldn't be displayed with `account.bank.statement.line` model. Since c6ade2de937a30a13620a64a4779ebd827088755, we use an action to open the bank reconciliation widget, therefore in the `computeStudioEditable` method, we didn't pass in the first condition `!action.xml_id` anymore and we were returning `true`. With this commit, we return `false` if model is `account.bank.statement.line`. Steps: - Install `accountant` - Go to Accounting dashboard - Click on the `Bank` card title - Toggle the list view - Open the optional columns dropdown -> The `Add custome field` button is displayed opw-4953156 Forward-Port-Of: odoo/enterprise#90935
This update fixes errors that could block customers using invitation links during appointment booking. Users can now move back through the booking steps, including date/time and resource selection, without seeing server or access errors when multiple resources are available.
Original PR description
Fixes two issues regarding the buttons on the front-end progress bar in the appointment flow, when using an invitation link. Commit messages give steps to reproduce.
1. Fix 500 error when clicking 'Date & time' with more than one resource / user configured on the invitation link.
2. Fix 403 error when using the operator ('meeting' actually) step button with more than one specific resource in the invitation link.
Task-4897098
Forward-Port-Of: odoo/enterprise#90335
Forward-Port-Of: odoo/enterprise#88521This fix ensures the VAT return journal is created when accounting reports or accounting features are installed after the main accounting setup already exists. It prevents missing VAT return configuration and makes related company and dashboard handling more reliable, while avoiding unnecessary journals for invoicing-only setups.
Original PR description
Issue: The VAT return journal is not created when installing `account_reports` (or `accountant`) after `account`, when the CoA is already created. Solution: Create it in the post init hook. Note that…
Issue: The VAT return journal is not created when installing `account_reports` (or `accountant`) after `account`, when the CoA is already created. Solution: Create it in the post init hook. Note that we force the creation of the journal only when `accountant` is installed because it would make noise for invoicing only in most cases. It will still be created automatically when needed. Also, make the code a little bit more robust: * instead of mixing "default misc journal" and vat return journal logic, just use one logic * the function `_get_tax_closing_journal` could return multiple journals but was always used as if it could only contain one * the function `_get_tax_closing_journal` could not return any journal. Instead, we now create the journal or look for a value on the parent companies if any. * Manage `show_on_dashboard` in `create` also by using an inverse field. Even if in normal cases the journal will always be created after the company the thus set through `write`, it is not impossible to set it in `create` when creating company branches. Since it is always done when setting the journal on the company, there is no need to set the field in the post-init hook. Forward-Port-Of: odoo/enterprise#91126
Fixes a crash that could prevent users from editing calendar views in Knowledge. The update also makes related dialog controls more consistent, helping guided checks and the user interface behave reliably.
Original PR description
This commit fixes the template, that could make the SelectMenu component crash when searchValue is still 'null', since the template was expecting reading a length from a string.
The Urban Piper point of sale integration now checks the confirmed order status directly instead of relying on an unused internal flag. This helps keep the ticket screen's order state accurate and removes obsolete internal data handling.
Original PR description
In this commit: ==== - Use `finalized` instead of `uiState.locked` to determine order state on TicketScreen. - Remove the unused `locked` property from `uiState` in posOrder. Task-4745869 Related: odoo/odoo#207406 Forward-Port-Of: odoo/enterprise#91124 Forward-Port-Of: odoo/enterprise#86684
Fixed an issue in the Barcode app where scanning a destination package after picking products from multiple locations could incorrectly change the source location on earlier product lines. This helps keep delivery records accurate when workers pack items from different warehouse locations into the same package.
Original PR description
Issue ===== When a package is scanned as the destination package, if a source location was previously scanned, the source location will be updated for every product who will be packed. How to…
Issue ===== When a package is scanned as the destination package, if a source location was previously scanned, the source location will be updated for every product who will be packed. How to reproduce ================ - Enable multi-locations and package; - Create an empty package, two locations and two products; - Create a delivery in the Barcode app; - Scan the first location then the first product; - Scan the second location then the second product; - Scan the empty package -> The package is rightly assigned as the result package for both lines, but the source location of the first product was update for the last scanned source location. Cause of the issue ================== When a source location was previously scanned, when a line is updated (`updateLine`), we update the line's source location. Usually, that's the wanted behavior but in this case, we don't want to the source location of already processed lines when we scan a destination package. Solution ======== When calling `updateLine` from `_assignEmptyPackage`, give a key in the parameters to not update the source location. [opw-4859851](https://www.odoo.com/odoo/project.task/4859851) Forward-Port-Of: odoo/enterprise#90713 Forward-Port-Of: odoo/enterprise#89142
Candidate and referral search suggestions now keep spaces in names and labels when shown in autocomplete results. This makes search results easier to read and helps users select the correct record more confidently.
Original PR description
This commit applies the same methodology as in https://github.com/odoo/odoo/pull/218768 to resolve the missing spaces issues in many2x autocomplete search results. task-4898120 Forward-Port-Of: odoo/enterprise#91020 Forward-Port-Of: odoo/enterprise#90138
The report editor now hides the Save and Discard buttons until a user has made changes. This reduces visual clutter and helps users better understand when there is something to save or discard.
Original PR description
before this commit : The Save and Discard buttons were visible even when no changes had been made. after this commit The buttons are now only displayed when there are unsaved changes. Task-4879126
The Accounting dashboard now correctly opens the bank reconciliation list with only unchecked transactions when users click the “To Check” link. This prevents already-reviewed transactions from appearing in that view, making reconciliation work clearer and faster.
Original PR description
**Issue** When accessing bank transactions via the "To check" link in the Accounting dashboard, the expected filter to show only unchecked transactions is not applied. As a result, all transactions are displayed, including those that have already been checked. **Steps to Reproduce** 1. Navigate to Accounting > Dashboard > Bank 2. Create two bank statement lines: one marked as checked, the other unchecked 3. Return to the dashboard 4. Click the “1 To Check” link 5. Observe that both entries are shown, instead of only the unchecked one **Root Cause** The corresponding filter (`to_check`) is missing from the search view of the `account.bank.statement.line model`. Although the action context correctly includes `search_default_to_check=True`, Odoo is unable to apply the filter without a matching `<filter name="to_check" ... />` in the search view definition. Opw-4945705 Forward-Port-Of: odoo/enterprise#90803
Credit card payments in the Italian point of sale are now assigned a default value that fiscal printers recognize as paid. This prevents legitimate card payments from being reported as not paid on Italian fiscal printer records.
Original PR description
In Italy if a payment method is of type 'Credit card' (type 2), and it's index is 0 the payment made with it is considered as 'Not paid' by the italian fiscal printer. Why the fix: ------------ We change the default index of the payment method to 1, so that it is considered as 'Paid' by the fiscal printer. opw-4963421 Forward-Port-Of: odoo/enterprise#90919
The sales commission achievement report now includes down payments and other invoice lines that do not have a product assigned. This prevents mismatches between invoice analysis totals and commission results, helping ensure salespeople receive accurate commission calculations.
Original PR description
In the sale achievement report, down payments and other account move lines that have no product attached to them would not be accounted for in the sale commission achievement report. This was due to the fact that the table was being inner joined on product_id which would get rid of records that had no product. Because of this behavior there would be a mismatch between the invoice analysis of a user and their commission even if the rate was 100% on the commission plan. Left joining the products onto the account move line keeps the lines with no products and fixes the discrepancy between the report and the invoice analysis. opw-4625340 Forward-Port-Of: odoo/enterprise#91010 Forward-Port-Of: odoo/enterprise#83477
Users can now send signature requests from templates they created while working in any company they are allowed to access. This prevents an error that previously blocked sending when the system used the wrong company context for default terms and conditions.
Original PR description
Problem: In a multi-company environment, users are unable to send templates in non-default companies despite them creating the template. A traceback gets thrown because the template is using the…
Problem: In a multi-company environment,
users are unable to send templates in non-default
companies despite them creating the template.
A traceback gets thrown because the template
is using the default company on the create user,
instead of the current environment's company.
Purpose: The user should be able to send templates they created in any allowed companies.
Steps to Reproduce on Runbot:
[ADMIN]
1. Install Sign
2. Navigate to Settings > Sign > Enable "Sign Default Terms & Conditions"
3. Create another company and allow Marc Demo access
[Marc Demo]
1. Change to a non-default company
2. Try to send a signature request (e.g. upload pdf to sign > send)
3. Traceback gets thrown
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mylynahy/src/odoo/odoo/fields.py", line 1161, in __get__
value = env.cache.get(record, self)
File "/home/mylynahy/src/odoo/odoo/api.py", line 1020, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'res.company(2,).sign_terms_type'
During handling of the above exception, another exception occurred:
...
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
AccessError: Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.
Records: BE Company CoA (id=2)
User: Marc Demo (id=6)
This restriction is due to the following rules:
- company rule employee
Note: this might be a multi-company issue.
Contact your administrator to request access if necessary.
Template: sign.sign_template_mail_request
Path: /t/table/tr[5]/t[1]/td/a
Node: <a t-att-href="\'%s/sign/terms\' % record.get_base_url()" class="text-dark"/>
```
opw-4706828
Forward-Port-Of: odoo/enterprise#85402Shared Helpdesk ticket pages now show the logo and branding of the company that owns the ticket, even when viewed by someone who is not logged in. This prevents customers from seeing the wrong company identity on portal ticket links.
Original PR description
**Steps to reproduce**: 1. Install `helpdesk` only 2. Create a second company and configure a distinct logo for both the default and new companies. 3. Create a Helpdesk ticket under the new company.…
**Steps to reproduce**: 1. Install `helpdesk` only 2. Create a second company and configure a distinct logo for both the default and new companies. 3. Create a Helpdesk ticket under the new company. 4. Use the 'Share Ticket' (gear icon) feature to generate a portal link. 5. Open the link in an incognito window or a different browser (where no user is logged in). 6. Observe the logo shown in the portal navigation bar. **Observed behavior**: The portal incorrectly displays the logo and branding of the default/main company, even when the Helpdesk ticket belongs to a different company. **Issue**: When no portal user is logged in, the `res_company` used in the portal rendering context defaults to the system’s primary company (`env.company`). The template expects `res_company` to be explicitly set to reflect correct branding. See: https://github.com/odoo/odoo/blob/880954ebfc1106411b7f7a7d60aee05dfae60893/odoo/addons/base/models/ir_qweb.py#L781 **Solution**: Explicitly pass `ticket_sudo.company_id` as `res_company` in the portal view context to ensure correct company branding is used. opw-4855281 Forward-Port-Of: odoo/enterprise#90600
Miscellaneous changes
<b>Steps to produce :</b> 1) Install 10n_de_reports and switch to the German company 2) Create a journal entry from accounting with a credit and debit 3) Now update the credit and debit to a different value. 4) Post the journal 5) Go to "Accounting / Reporting / Audit Reports / General Ledger" 6) Download "DATEV DATA (ZIP)" and check "EXTF_accounting_entries.csv" <b>Issue:</b> The line for the created journal entry has a price_total of the previous balance even after updating the
Original PR description
<b>Steps to produce :</b> 1) Install 10n_de_reports and switch to the German company 2) Create a journal entry from accounting with a credit and debit 3) Now update the credit and debit to a…
<b>Steps to produce :</b> 1) Install 10n_de_reports and switch to the German company 2) Create a journal entry from accounting with a credit and debit 3) Now update the credit and debit to a different value. 4) Post the journal 5) Go to "Accounting / Reporting / Audit Reports / General Ledger" 6) Download "DATEV DATA (ZIP)" and check "EXTF_accounting_entries.csv" <b>Issue:</b> The line for the created journal entry has a price_total of the previous balance even after updating the credit and debit values. <b>Cause:</b> When the user updates the 'debit' and 'credit' values for an `aml`, The `price_totals` value remains unchanged as it is not dependent on `balance`. So, it will show the previous value in the report line because we are taking the abs(aml.price_total) from the report data. <b>Solution:</b> We can add an extra check of the move type so that it will fall back to the else block, where the line_amount will take a value by calculating taxes from `aml.tax_ids.compute_all`. opw-4707567 Forward-Port-Of: odoo/enterprise#85436 Forward-Port-Of: odoo/enterprise#83777
46 changes
Security fixes and vulnerability patches
The portal chatter no longer lets users copy message links when they access a shared document without normal read access. This helps prevent document access tokens from being accidentally exposed through copied links.
Original PR description
Before this commit, it was possible for a user to copy the link of messages in the chatter of a portal document accessed via share link with token. This could lead to unintentionally leaking the access token of the document. This commit fixes the issue by removing the possibility to copy links of messages inside portal documents for which a user has no read access. discussed in task-4551910
Enhancements to existing features
This update adds a new customization point in the stock module for calculating dates during push rule processing. It does not change current behavior, but makes future customizations easier and safer for implementers.
Original PR description
This eases inheritance. No behavior is changes with this PR, it is just a new inheritance point. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Task searches in Projects were slowed down by checking task IDs alongside task names. This change removes the ID check from the standard search form, making name searches much faster on large databases while preserving the main task search experience.
Original PR description
### Issue Slowness when searching for tasks in a database containing ~430K `project.task` records. ### Analysis When searching for tasks by name, the `id` field is passed to the filter domain. This results in a suboptimal query plan, as the `id` field is cast as `text` in an `OR` leaf: ` [...] AND ((unaccent((name)::text) ~~* '%test%'::text) OR ((id)::text ~~* '%test%'::text)) [...]` Furthermore, since refactoring the web routes, the necessity of searching for an `id` in the search form has greatly diminished. ### Benchmarks Benchmarking the generated query using `\timing` in `psql`: | Number of records | Before | After | | -- | -- | -- | | 430K | 2.3s | 3ms | During high-usage periods, the query took up to ~10.8 seconds. #### References opw-4845258 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#219959 Forward-Port-Of: odoo/odoo#219901
Updating account codes through account mapping is now optimized to avoid unnecessary recalculations across many accounting entries. This helps prevent memory errors and improves reliability for companies with large accounting datasets.
Original PR description
Description of the issue this commit addresses: Changing the account code via account mapping triggers a recompute of all related account.move fields (such as always_tax_exigible), which can cause memory errors or severe performance issues when many moves are concerned. --- Desired behavior after this commit is merged: Memory errors are avoided. --- Details on the fix: Optimize account code updates by batching SQL writes and only updating codes that have actually changed, avoiding unnecessary ORM recompute cascades and improving performance for large datasets. --- opw-4951670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
After a successful self-order payment, customers are now taken directly to the next step instead of seeing an extra confirmation screen. This streamlines the checkout experience and reduces unnecessary waiting or taps.
Original PR description
Before: = - A payment confirmation screen used to appear after a successful transaction. After: = - The flow now skips the payment confirmation screen and moves directly to the next Screen. Task: 4836123 Forward-Port-Of: odoo/odoo#213481
After a user starts fetching bank transactions from the accounting dashboard, the fetch button is hidden to prevent repeated clicks. This helps avoid duplicate provider requests and reduces the chance of synchronization errors.
Original PR description
The button `Fetch Transactions` shown on a bank in the accounting dashboard can possibly be clicked multiple times in a row by a user. This would cause several calls to the provider causing potential errors. This commit prevents the user from being able to fetch transactions multiple times by removing this button once clicked. task-4900188 Forward-Port-Of: odoo/enterprise#89127
Resolved issues and error corrections
Users can no longer choose filter options that cause errors when filtering image or file fields. The filter builder now only offers choices that are valid for these fields, reducing failed searches and improving reliability.
Original PR description
The system encountered an error when users attempted to apply invalid filters on `binary fields` (e.g., `image_1024`). The error occurs when operators like 'is in' with empty string values ('') are used, as binary fields are stored As attachments only support existence checks.
**Steps to produce:-**
1. Add a filter like `[('image_1024', 'in', [])]` in the custom filter where the image exists(eg, Products) and save.
2. Error triggered.
**Error:-**
`Binary field 'Image 1024' stored in attachment: ignore image_1024 in [''] .`
**Solution:-**
- The `web` client's filter operator selection logic has been updated to restrict options for `binary` field types. Now, for binary fields, only the `is set` (`!= False`) and `is not set` (`= False`) operators will be available in the custom filter builder.
**Sentry - 6236134077**
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#213608When products valued by lot are revalued, the lot's standard price is now updated to match the value increase or decrease. This keeps inventory valuation and lot-level product costs aligned, improving accuracy in stock and accounting reports.
Original PR description
### Steps to reproduce 1. Create a product with valuation by lot in AVCO 2. Purchase 10 quantity and validate the transfer 3. In the valuation report, group by product and revaluate the product ### Before this commit The lot is correctly revaluated, but its standard price is not updated ### After this commit The standard price is updated to reflect the value increase/decrease. opw-4890361 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Large product images shared through the purchase portal are now shown at an appropriate size instead of overwhelming the page. This keeps purchase documents readable and professional for external viewers opening shared links.
Original PR description
Issue ----- Images on the purchase portal are displayed in their original size instead, making it a visual mess. Steps to reproduce ----- - Create a product with a large image - Create a purchase for…
Issue ----- Images on the purchase portal are displayed in their original size instead, making it a visual mess. Steps to reproduce ----- - Create a product with a large image - Create a purchase for the product - Click the cog wheel > Share - Open the link in a new tab (with no active session, eg private window) --> The image is way too big Cause ----- Images are now converted to Webp: https://github.com/odoo/odoo/commit/1a978183001e0503104285f4bd5bed983beb0efb The problem is that Webp images cannot be resized through the Python backend: https://github.com/odoo/odoo/blob/0c6622294b7117ec5eb1cbf8a9270636b2dd807f/odoo/tools/image.py#L81-L83 However, the product model has multiple sizes for the image: https://github.com/odoo/odoo/blob/3ddf2bcdf16b5b43db4c4abe2cdbc4384cf683cc/addons/product/models/product_product.py#L91-L94 What we can do is load the smallest possible image and then use styling to limit the display size. The 48px comes from the hardcoded values in https://github.com/odoo/odoo/blob/0c6622294b7117ec5eb1cbf8a9270636b2dd807f/addons/purchase/controllers/portal.py#L99 This fix will no longer be needed when (if) Webp images get resized in backend. Comparison ----- Left is before, right is after fix.  Image used -----  ----- Ticket: opw-4625113
The calendar "more" popover now keeps a solid background, preventing events behind it from showing through. This improves readability and keeps the calendar experience clear, especially on non-working days.
Original PR description
This commit resolves a visual issue with the FullCalendar "more" popover, where its background could appear partially transparent—causing events behind it to show through and creating a poor user experience. The problem was introduced with the update to FullCalendar v6.1.10, which applies cell-related classes (like o_calendar_disabled) to the popover. On non-working days, this class applies a semi-transparent grey background, affecting the popover's readability. The fix ensures that the popover background remains opaque in this specific case, restoring proper visual separation from underlying content. task-4916099
Employees can now place or update lunch orders when the total is within their wallet balance plus the configured overdraft allowance. This prevents valid orders from being blocked and keeps the Lunch dashboard and product screens consistent with company settings.
Original PR description
**Current Behavior:** The overdraft amount (`lunch_minimum_threshold`) is configured in Lunch settings is ignored when employees create or update lunch orders. As a result, even if the total order…
**Current Behavior:** The overdraft amount (`lunch_minimum_threshold`) is configured in Lunch settings is ignored when employees create or update lunch orders. As a result, even if the total order amount is within the allowed overdraft limit, the system blocks the action. **Steps to Reproduce:** 1) Install the Lunch module. 2) Set an overdraft amount in the Lunch settings. 3) Ensure an employee's wallet balance is less than a desired order total. 4) Attempt to create a lunch order or increase product quantity such that the total is more than the wallet balance but within the wallet + overdraft amount. **Issue:** - In both the product view (`_compute_display_add_button`) and the dashboard (`canAdd` logic), the wallet balance is calculated using `get_wallet_balance(include_config=False)`. - This call excludes the overdraft threshold, causing incorrect warnings and hiding of the `Add to Cart` or `+` buttons. **Solution:** - Remove the explicit `include_config=False` argument so the default True is used, ensuring the overdraft is included. - In the dashboard logic, enhance _make_info() to return a wallet_with_config key using get_wallet_balance(include_config=True) and update the canAdd check to use this value. opw-4782564
The Spanish Modelo 390 VAT report now avoids counting vendor refunds twice and includes all relevant manual adjustment lines in line 64 totals. This helps businesses submit more accurate VAT declarations and reduces the risk of reporting discrepancies.
Original PR description
This commit addresses two issues in the Mod 390 report:
---
1. Vendor refunds were being reported twice:
- Once correctly via the tax grid.
- And again incorrectly through the cross-formula on lines 639 and 62, which are meant for special manual adjustments only.
➤ Fix: Lines 639 and 62 are now treated as external values, making them
editable and excluding them from automatic computation.
2. Line 64 was missing part of the total:
- It did not include balances from lines 661 and 62, resulting in an incomplete total.
➤ Fix: Updated the computation of line 64 to sum all relevant manual lines.
---
task-4972473This fixes a small visual issue in form views where adjacent input fields could show misaligned borders because extra spacing was applied twice. The change improves the consistency and polish of forms without affecting functionality.
Original PR description
Inside form views when an input is displayed next to an other which contains nested `o_input`, the border is misaligned. This is due to a duplication of the `o_input` style in `form_controller.scss` which overrides the rule handling nested `o_input` in `fields.scss` resulting in 2x the necessary padding. [task-4974502](https://www.odoo.com/web#id=4974502&cids=1&menu_id=4720&action=333&active_id=1695&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could appear while creating a time off allocation if the employee field was temporarily cleared and the allocation was measured in hours. Users can now edit these allocation records without encountering a crash, improving reliability in the Time Off workflow.
Original PR description
A traceback occurs when a user removes the Employee field while creating a time off allocation record. **To reproduce the issue:** 1) Install the `Time Off` module. 2) Create a new time off…
A traceback occurs when a user removes the Employee field while creating a time off allocation record. **To reproduce the issue:** 1) Install the `Time Off` module. 2) Create a new time off allocation record. 3) Navigate to the `Related Time Off Type` record. 4) Change the `Take Time Off in` option to Hours. 5) Return to the allocation and remove the Employee field. **Error:** ``` ZeroDivisionError: float division by zero ``` **Cause:** - When the Employee field is cleared, the `_compute_number_of_days` method is triggered. - Since the allocation_unit is set to Hours, this method attempts to calculate `number_of_days` using `_get_hours_per_day`. https://github.com/odoo/odoo/blob/96d4bd7911ba122610fd42c009da0a8e565e50ec/addons/hr_holidays/models/hr_leave_allocation.py#L256-L262 - However, when `employee_id` is missing, `_get_hours_per_day` returns 0, resulting in a division by zero. https://github.com/odoo/odoo/blob/96d4bd7911ba122610fd42c009da0a8e565e50ec/addons/hr_holidays/models/hr_employee.py#L140-L143 **Solution:** Since the employee_id is a required field in allocation, Adding an extra check for employee_id will resolve this issue. opw-4937893
Manufacturing orders with very small work center costs could fail during validation because totals were rounded inconsistently. The fix rounds values before adding them, preventing accounting imbalance errors and showing the correct cost in the manufacturing overview.
Original PR description
Steps to reproduce:
- Create two work centers with different expense accounts:
- First: hourly cost of 0.01
- Second: hourly cost of 0.01
- Create an MO for a product with real-time valuation and 2 work orders
(one per work center).
- Each work order has an expected duration of 30:02
- Attempt to click on "Produce All" button.
This leads to an unbalanced move error.
This fix rounds the values before summing them to prevent rounding issues
and unbalanced moves. It also corrects the displayed value in the
Manufacturing Order overview.
opw-4631409Invoice emails generated after online payments are now sent using the proper salesperson/system context instead of the customer portal user's context. This prevents confusing emails that appear to be sent from and to the administrator, improving customer communication accuracy.
Original PR description
**Steps to reproduce**: 1. Enable automatic invoicing `Settings -> Sales -> Invoicing -> Automatic Invoice` 2. Configure a payment provider like `Stripe` (not demo) 3. Open the website in an…
**Steps to reproduce**: 1. Enable automatic invoicing `Settings -> Sales -> Invoicing -> Automatic Invoice` 2. Configure a payment provider like `Stripe` (not demo) 3. Open the website in an incognito browser and log in as a portal user 4. Add a product to cart and checkout with the portal user's delivery address 5. Complete payment using test card credentials 6. Navigate to the created invoice in Sales **Observed behavior:** The invoice email is sent to both the portal user (customer) and the system admin, appearing as if the email is sent "from admin to admin" instead of from the assigned salesperson. **Root cause:** When automatic invoicing is enabled and a portal user completes a website purchase, the `_send_invoice()` method uses `self.env['account.move.send']` which runs in the portal user context. The portal user is selected as author, and the email template uses `partner_to` so it is also selected as partner. While sending mail, this triggers the `mail_notify_author` context. Additionally, due to the portal user not having proper email sending permissions, the system adds admin as fallback. As a result, emails are sent by admin, and because of `mail_notify_author`, mail is also sent to admin. **Solution:** Changed `self.env['account.move.send']` to `tx.env['account.move.send']` in the `_send_invoice()` method. Since `tx` is created with `SUPERUSER_ID` context, this ensures the invoice sending runs with proper system permissions and uses the transaction's context instead of the portal user's context. This ensures emails are authored by the correct salesperson, not the portal user. opw-4760568
This update refreshes the spreadsheet engine and fixes several everyday editing issues. Users should see more reliable row sizing, formula recalculation, cell editing, pasting, validation lists, and pivot behavior in Odoo spreadsheets.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/0f3b11a81 [REL] 18.0.38 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/0f3b11a81 [REL] 18.0.38 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/5e9706fa6 [FIX] header_sizes_ui: preserve row sizes on insert and move ops [Task: 4885579](https://www.odoo.com/odoo/2328/tasks/4885579) https://github.com/odoo/o-spreadsheet/commit/e1c4e6255 [FIX] evaluation: test array formula invalidation [Task: 4954710](https://www.odoo.com/odoo/2328/tasks/4954710) https://github.com/odoo/o-spreadsheet/commit/17cd60e8f [FIX] GridComposer: Recompute composer position if we change edited cell [Task: 4879186](https://www.odoo.com/odoo/2328/tasks/4879186) https://github.com/odoo/o-spreadsheet/commit/ec8a90d51 [FIX] auto_complete: remove toggle button for data validation [Task: 4854464](https://www.odoo.com/odoo/2328/tasks/4854464) https://github.com/odoo/o-spreadsheet/commit/c693c6ee0 [FIX] Composer: Remove formatting when pasting external content [Task: 4910559](https://www.odoo.com/odoo/2328/tasks/4910559) https://github.com/odoo/o-spreadsheet/commit/ba683b429 [FIX] spreadsheet_pivot: empty row when number added to char field [Task: 4878778](https://www.odoo.com/odoo/2328/tasks/4878778) https://github.com/odoo/o-spreadsheet/commit/41c774ac1 [FIX] Formulas: `COLUMN/ROW` spread with range [Task: 4916369](https://www.odoo.com/odoo/2328/tasks/4916369) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya <rmbh@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This corrects a sales test so it uses the proper type of order data when creating invoices. It helps prevent failures in customized sales invoice flows, improving reliability for businesses using tailored Odoo setups.
Original PR description
At [1], `_create_invoices()` expects a recordset, not a dictionary. The test case currently passes because the `advance_payment_method` is set to `percentage`. However, if someone overrides `_create_invoices()` and uses a different `advance_payment_method` (e.g., 'delivered'), it will fail. Traceback: --- `AttributeError: 'dict' object has no attribute '_create_invoices'` [1]- https://github.com/odoo/odoo/blob/4cd24dc73d46b714cd5a764ed3f003e9507b0777/addons/sale/tests/test_accrued_sale_orders.py#L150-L152 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Employees can no longer create time off requests through a shortcut when the time off type requires an approved allocation. This closes a loophole so the same business rules apply consistently across all request creation paths.
Original PR description
Steps: - Navigate to Time Off > Configuration > Time Off Types. - Open a time off type that requires allocation. - Click on the 'Time Off' smart button and try to create a request. Issues: - Employees could create time off requests via the smart button even without an approved allocation. - This bypassed the existing restriction enforced in the standard time off request creation flow. Fix: - Added a constraint on the time off model to validate allocations even when requests are created via the smart button. - Ensured validation covers both allocation presence and allowed negative leaves. - Raised a ValidationError when no valid allocation is found. - Added a test case to ensure constraint behaves correctly. - Adjusted some of tests to comply with the new validation. Task - 4671236 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208214
This fixes a rounding issue that could create unnecessary stock valuation entries when purchasing in foreign currency with higher product price precision. Vendor bills that should be editable can now be reset to draft without being blocked by those erroneous entries.
Original PR description
**Current behavior:** Modifying the "Product Price" global precision and purchasing some product in a foreign currency sometimes leads to problematic SVL creation, which will make a posted vendor…
**Current behavior:** Modifying the "Product Price" global precision and purchasing some product in a foreign currency sometimes leads to problematic SVL creation, which will make a posted vendor bill unable to be reset to draft when it logically should be permitted. **Expected behavior:** No SVL, can reset vendor bill. **Steps to reproduce:** 1. Activate a foreign currency, set the "Product Price" precision from 2 -> 3, make an exchange rate to the foreign currency with a rate: `0.2710027100271003` 2. Make a product with avg costing, real time valuation, with a standard price = `0.875` 3. Create a purchase order in the foreign currency for the avco product: * `price_unit: 0.237` * `product_qty: 5500` 4. Confirm -> receive -> create invoice -> post * Can't reset the bill to draft * There is an additional SVL that shouldn't have been generated **Cause of the issue:** There will be a negligible rounding diff between the price units of the journal item and SVL created on reception. When the invoice is posted, this will captured and when multiplied by a large enough invoicing qty, will create a large enough value to trigger creation of pdiff SVL. **Fix:** Zero out the price unit difference if it is functionally equivalent to zero when rounded according to the maximally precise "precision record" involved in the sequence, that is: A) The bill currency B) The SVL currency C) The "Product Price" global precision value opw-4873246
This fix prevents Odoo from creating duplicate stock quantity records when moving entire packages while other packaged products are reserved. It helps keep inventory counts accurate and avoids confusion during package transfers and delivery preparation.
Original PR description
### Steps to reproduce: - In the settings enable "packages" and Multi-Step Routes - Create a 3 storable products: P1, P2, P3 - Put on hand quantities for each of them: - 1 x P1 in PACK001 in stock -…
### Steps to reproduce:
- In the settings enable "packages" and Multi-Step Routes
- Create a 3 storable products: P1, P2, P3
- Put on hand quantities for each of them:
- 1 x P1 in PACK001 in stock
- 1 x P2 in PACK001 in stock
- 1 x P3 in PACK002 in stock
- Create and confirm a delivery with 3 moves:
- 1 x P1
- 1 x P2
- 1 x P3
- Go to Inventory > Configuration > Warehouse Management > Operation type
- Modify internal transfers to "Move entire packages"
- Create and confirm and internal transfer for PACK001 from stock to the sublocation stock/shelf1
- Mark the package as done and validate the transfer
#### > You end up with 2 quants for PACK002 in stock
### Cause of the issue:
When validating the internal transfer for PACK001, we launch an `_action_done` on the moves lines of the internal transfer. In particular, during this action done, a `quant_cache` will be set for to fetch and use the quants for P1 and P2:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move_line.py#L679-L681 https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_quant.py#L933-L949 This cache is correctly use in order to update our move lines during the `synchronize_quant` that will follow:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move_line.py#L684-L692 However, they are not in the `_free_reservation` because this call will reassign the move line and then `_check_entire_pack` for the entire picking:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move.py#L1980-L1981 In particular, it will update the reservation for the move related to P3. But, since the `quant_cache` is taken from the context and did not change it can not find the quants related to P3 and a new quant will be created in addition to the already existing one: https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/stock/models/stock_quant.py#L1055 https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/stock/models/stock_quant.py#L1101
opw-4922032
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prWhen users create a parent task directly from an existing task, the new parent task now automatically uses the same project. This prevents unassigned parent tasks and keeps project task structures consistent, while also hiding the parent task field for private tasks where it should not apply.
Original PR description
Before this commit, when the user creates a parent task on the fly in the list view of tasks or even in the form view of task, the parent task creates does not have the project of the task by default. This commit adds the project of the task as default value for the new parent task when the user creates a parent task in the parent_id field. Steps to reproduce the issue ---------------------------- 0. Install project. 1. Go to Projects > All tasks. 2. Show the parent task field. 3. Edit the parent_id field in the list view of an existing to create a new parent task. 4. Go to form view of the parent task Expected Behavior ----------------- The parent task should have the same project than the task in which we create the parent task. Current Behavior ---------------- The parent task created has no project set by default. task-4781342 Forward-Port-Of: odoo/odoo#209434
Duplicating a pivot table in Spreadsheet now correctly carries over applicable global filters. This prevents copied pivot reports from showing unfiltered or misleading data, saving users from manually reapplying filters.
Original PR description
Steps to reproduce: - insert a pivot in a spreadsheet - create a global filter matching one of the pivot fields - use the global filter to restrict the values - duplicate the pivot => the filter is not applied on the duplicated pivot Task:4966634 opw-4950469 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
Fixed an issue where certain combo products in Point of Sale skipped the needed product configuration step. The configurator now opens when required and avoids asking cashiers to choose variant options that were already selected, reducing ordering mistakes and checkout friction.
Original PR description
When a combo contained a product that had variant with type 'no_variant' and 'always', if you added the product to the cart the product configuration popup would not open. Also, in the combo you can…
When a combo contained a product that had variant with type 'no_variant' and 'always', if you added the product to the cart the product configuration popup would not open. Also, in the combo you can only select product_product and not product_template, so the product configuration popup should not propose the variant linked to the 'always' type, as you already selected a product template in the combo configuration popup. Steps to reproduce: ------------------- * Create a product attribute PA1 with type 'no_variant' and 2 values V1 and V2 * Create a product attribute PA2 with type 'always' and 2 values V3 and V4 * Create a product template PT1 with PA1 and PA2 * Create a combo choice PC1 with the 2 variants of PT1 * Create a combo product CP1 with PC1 * Open PoS and add CP1 to the cart * The combo configurator popup opens, click on the version with V2 > Observation: The product configurator popup does not open > Second fix: The product configurator allows you to select the variant linked to the 'always' type, which is not correct as you already selected it through the combo configurator popup Why the fix: ------------ The first fix just make sure that the product configuration popup opens when it is necessary. The second fix filters the variants proposed in the product configuration popup to only show the variants that are not linked to the 'always' type. But this only happens when we do it from the combo configuration popup. opw-4719258
Updating account codes in the chart of accounts now avoids unnecessary bulk data loading that could exhaust server memory. This makes account code changes more reliable for companies with large volumes of accounting entries.
Original PR description
Description ----------- Writing a new code for an account in the mappings of a COA will retrigger expensive recomputations for all moves linked to the accounts via its lines. This can lead to quick…
Description ----------- Writing a new code for an account in the mappings of a COA will retrigger expensive recomputations for all moves linked to the accounts via its lines. This can lead to quick exhaustion of the memory budget for the processing of the request (2 GiB by default). The commit odoo/odoo@8c5bfff4667ac2f8ec349278dda77d980242aae1 was supposed to address this issue by disabling the fields prefetcher when either 'code' or 'account_type' are being written to, but there is a logical oversight in the condition. ```py prefetch_fields=any(field in vals for field in ['code', 'account_type']) ``` Means "activate prefetch if it exists a field 'code' or 'account_type' in the vals". This is the opposite of what was intended, if the fields *do not* exist, only then we prefetch. So we can just negate the condition. Benchmark --------- For a database where updating the code of an account in the COA mapping, which impacts ~370K account.move and their related ~1.56M account.move.line, saving the new code memory took: | | Before | After | |-------------------|----------|---------| | Peak Memory Usage | 2.78 GiB | 879 MiB | Reference --------- opw-4951670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where users could not update progress bar values in Firefox, even though the same action appeared to work in other browsers. The progress bar input now saves changes consistently across supported browsers, reducing browser-specific user frustration.
Original PR description
Before this commit, the input of the progressbar field couldn't be updated on firefox. It works on the other browsers by chance. In the list renderer, we call `preventDefault` on enter keydown. The event is first catch by the list renderer. This call is enough to prevent "change" event to trigger but on chromium browsers it is actually triggered (but should not). The progressbar field catches it and saves the new value. On firefox, the "change" event is never triggered. The commit fixes the input by using the input field hook to make it behave correctly. task-4881210 Forward-Port-Of: odoo/odoo#215770
Video calls in chat windows now display the call area at a more useful size when at least one participant has video enabled. This makes video streams easier to see, improving the calling experience for users who rely on visual communication.
Original PR description
Before this commit, when in a discuss call in a chat window with at least 1 video, clicking on no main card had all cards sized for avatar, including the video stream. This is a problem because the video stream are very small, barely visible, which is unfortunate because when there are video streams they are usually the most important thing that call participants want to see. This commit fixes by adding a new CSS rule in chat window with call: when user in a call with at least 1 video stream, the size of call view matches the size of a 16:9 video stream when focused. Part of task-4967123 Before / After <img width="381" height="634" alt="Screenshot 2025-07-28 at 17 57 37" src="https://github.com/user-attachments/assets/878bae9f-01e5-4f81-9d61-b43180d4f809" /> <img width="385" height="637" alt="Screenshot 2025-07-28 at 17 57 17" src="https://github.com/user-attachments/assets/0261d716-e52c-4a72-ad6a-007c8d01a362" />
The Philippine BIR 2307 spreadsheet export now includes partner ZIP codes and uses the correct tax description for the payment nature. It also formats company and individual taxpayer names more accurately, helping businesses produce clearer and more compliant tax reports.
Original PR description
The BIR 2307 XLS export was missing the `ZIP_code` and incorrectly showing the `nature` of payment from the invoice line instead of the tax description. In this commit: --- - Added a new column `zip_code` to show the ZIP from the `partner`. - Changed the `nature` column to use the `tax-description` instead of `product-name`. - Displaying `companyName` only when the commercial partner is a company. - Displaying `surName`, `firstName`, and `middleName` only when the commercial partner is an individual. task-4880921 Enterprise-PR: odoo/enterprise#91120 Forward-Port-Of: odoo/odoo#220606 Forward-Port-Of: odoo/odoo#214940
Users working across multiple companies can now send signature requests from templates they created in any company they are allowed to use. The fix prevents an access error caused by using the creator's default company instead of the current company for template emails.
Original PR description
Problem: In a multi-company environment, users are unable to send templates in non-default companies despite them creating the template. A traceback gets thrown because the template is using the…
Problem: In a multi-company environment,
users are unable to send templates in non-default
companies despite them creating the template.
A traceback gets thrown because the template
is using the default company on the create user,
instead of the current environment's company.
Purpose: The user should be able to send templates they created in any allowed companies.
Steps to Reproduce on Runbot:
[ADMIN]
1. Install Sign
2. Navigate to Settings > Sign > Enable "Sign Default Terms & Conditions"
3. Create another company and allow Marc Demo access
[Marc Demo]
1. Change to a non-default company
2. Try to send a signature request (e.g. upload pdf to sign > send)
3. Traceback gets thrown
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mylynahy/src/odoo/odoo/fields.py", line 1161, in __get__
value = env.cache.get(record, self)
File "/home/mylynahy/src/odoo/odoo/api.py", line 1020, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'res.company(2,).sign_terms_type'
During handling of the above exception, another exception occurred:
...
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
AccessError: Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.
Records: BE Company CoA (id=2)
User: Marc Demo (id=6)
This restriction is due to the following rules:
- company rule employee
Note: this might be a multi-company issue.
Contact your administrator to request access if necessary.
Template: sign.sign_template_mail_request
Path: /t/table/tr[5]/t[1]/td/a
Node: <a t-att-href="\'%s/sign/terms\' % record.get_base_url()" class="text-dark"/>
```
opw-4706828
Forward-Port-Of: odoo/enterprise#85402Printing a follow-up letter from the partner actions menu no longer fails when some report settings are missing. This helps accounting users generate overdue payment follow-up documents reliably from the partner page.
Original PR description
### Steps to reproduce: - Settings > Technical > Reporting > Reports - Search for "Print Follow-up Letter" - Click on "Add to the Print menu" - Create an overdue invoice for a partner - On the partner page, click the gear to show the actions - Then click "Print Follow-up Letter" - Traceback ### Cause: This [line](https://github.com/odoo/enterprise/blob/82375d181cd138b497e695e747b63c009c0538fc/account_followup/models/res_partner.py#L291) tries to read `options['followup_line']` but with this flow `followup_line` is not in the options. ### Solution: Use `get` and fallback on the followup line on the partner. opw-4864880
Employees can no longer create time off requests without a valid approved allocation by using the Time Off type shortcut. This keeps absence requests consistent with company policy and prevents accidental bypasses of allocation controls.
Original PR description
Steps: - Navigate to Time Off > Configuration > Time Off Types. - Open a time off type that requires allocation. - Click on the 'Time Off' smart button and try to create a request. Issues: - Employees could create time off requests via the smart button even without an approved allocation. - This bypassed the existing restriction enforced in the standard time off request creation flow. Fix: - Added a constraint on the time off model to validate allocations even when requests are created via the smart button. - Ensured validation covers both allocation presence and allowed negative leaves - Raised a ValidationError when no valid allocation is found. - Added a test case to ensure constraint behaves correctly. - Adjusted some of tests to comply with the new validation. Task - 4671236
This fix prevents an error when users clear and then reselect a start date while editing time tracking on a manufacturing work order. It keeps the workflow usable and avoids an unexpected traceback during routine manufacturing updates.
Original PR description
When the user removes the value of the start date and selects the value again in the start date, a traceback will appear Steps to reproduce the error: - Create one mo > Work orders > Add a line >…
When the user removes the value of the start date and
selects the value again in the start date,
a traceback will appear
Steps to reproduce the error:
- Create one mo > Work orders > Add a line > Click on Open work order button
- In Time Tracking > Add a line > Remove the start date >
Select the start date again > Apply
Traceback:
```
TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime'
File "odoo/http.py", line 2373, in __call__
response = request._serve_db()
File "odoo/http.py", line 1903, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1966, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1933, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2177, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 223, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 754, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 459, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1007, in onchange
record._apply_onchange_methods(field_name, result)
File "odoo/models.py", line 7028, in _apply_onchange_methods
res = method(self)
File "addons/mrp/models/mrp_workcenter.py", line 448, in _date_start_changed
self._loss_type_change()
File "addons/mrp/models/mrp_workcenter.py", line 473, in _loss_type_change
if self.workorder_id.duration > self.workorder_id.duration_expected:
File "odoo/fields.py", line 1208, in __get__
self.recompute(record)
File "odoo/fields.py", line 1423, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1396, in apply_except_missing
func(records)
File "odoo/fields.py", line 1445, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 5037, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 101, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-17.4/mrp_workorder_hr_account/models/mrp_workorder.py", line 62, in _compute_duration
super()._compute_duration()
File "home/odoo/src/enterprise/saas-17.4/mrp_workorder/models/mrp_workorder.py", line 762, in _compute_duration
wo.duration = wo.get_duration()
File "home/odoo/src/enterprise/saas-17.4/mrp_workorder/models/mrp_workorder.py", line 838, in get_duration
duration += self._intervals_duration([(t.date_start, t.date_end or now, t) for t in times])
File "home/odoo/src/enterprise/saas-17.4/mrp_workorder/models/mrp_workorder.py", line 826, in _intervals_duration
for date_start, date_stop, timer in Intervals(intervals):
File "addons/resource/models/utils.py", line 124, in __init__
for value, flag, recs in sorted(_boundaries(intervals, 'start', 'stop')):
File "addons/resource/models/utils.py", line 51, in _boundaries
if start < stop:
```
https://github.com/odoo/enterprise/blob/1f626176d28762683dc32ddbb351d994be894a71/mrp_workorder/models/mrp_workorder.py#L787 Here when "date_start" is empty,
It leads to the above traceback.
sentry-5679416830
Forward-Port-Of: odoo/enterprise#68014The Starshipit shipping cost banner no longer appears on deliveries that use other delivery methods. This prevents confusing messages for warehouse and shipping users when Starshipit is not involved.
Original PR description
A Strashipit banner was appearing on all deliveries, un-depending on the Delivery Method. Steps to reproduce: * Install 'delivery_starshipit' * Create a delivery with another Delivery Method selected, and a Carrier Price of 0. * The Starshipit banner "The Shipping Cost is being fetched in the background" appears Fix: Filter out 'invisible' condition on non-Starshipit delivery methods opw-4940717
This update corrects how Mexican electronic invoicing documents are returned so the download process receives the expected format. It helps prevent failures when users request invoice legal documents, including cases involving multiple file types.
Original PR description
`_get_invoice_legal_documents` should, and is expected to, return a dict. however, if called with `filetype = all`, it returns, because of `_get_invoice_legal_documents_all`, a list which breaks calling code as they expect a dict not a list, and this part of the code is not used anywhere nor tested. - remove the line causing `_get_invoice_legal_documents` to return a list. - make `download_invoice_documents_filetype` work with multiple filetypes related PR: https://github.com/odoo/odoo/pull/220170 no-task
Field service sales orders with Anglo-Saxon accounting now correctly show zero-priced products as ready to invoice. This lets businesses create invoices for no-charge products or services linked to field service tasks instead of being blocked by an incorrect status.
Original PR description
Before this commit: When Anglo-Saxon accounting is enabled and a product with sale price of zero is added to SO through field service, the invoice_status show 'Nothing to Invoice'. After this commit: With Anglo-Saxon accounting enabled, adding product with a zero sale price to an SO through field service will display the invoice_status as 'To Invoice' instead of 'Nothing to Invoice'. task-3957962 Forward-Port-Of: odoo/enterprise#70132
Shared Helpdesk ticket portal pages now show the logo and branding of the company linked to the ticket, even when the viewer is not logged in. This avoids confusion for customers in multi-company setups and ensures the right brand is presented on public ticket links.
Original PR description
**Steps to reproduce**: 1. Install `helpdesk` only 2. Create a second company and configure a distinct logo for both the default and new companies. 3. Create a Helpdesk ticket under the new company.…
**Steps to reproduce**: 1. Install `helpdesk` only 2. Create a second company and configure a distinct logo for both the default and new companies. 3. Create a Helpdesk ticket under the new company. 4. Use the 'Share Ticket' (gear icon) feature to generate a portal link. 5. Open the link in an incognito window or a different browser (where no user is logged in). 6. Observe the logo shown in the portal navigation bar. **Observed behavior**: The portal incorrectly displays the logo and branding of the default/main company, even when the Helpdesk ticket belongs to a different company. **Issue**: When no portal user is logged in, the `res_company` used in the portal rendering context defaults to the system’s primary company (`env.company`). The template expects `res_company` to be explicitly set to reflect correct branding. See: https://github.com/odoo/odoo/blob/880954ebfc1106411b7f7a7d60aee05dfae60893/odoo/addons/base/models/ir_qweb.py#L781 **Solution**: Explicitly pass `ticket_sudo.company_id` as `res_company` in the portal view context to ensure correct company branding is used. opw-4855281
Users can now open signature requests even if the employee or user who created them has since been deleted. This prevents an error page and keeps access to existing signing documents working as expected.
Original PR description
## Issue: ## Before this commit, opening a sign request created by a deleted user would raise an Owl Error ## Cause: ## The `action.params` are used as a fallback in the signRequest setup But sometimes sometimes the `action.params`are undefined, causing access to `action.params.create_uid` to fail ## Fix: ## The document can be open with `create_uid` set to False So we just added a check for `action.params` to be set before accessing his properties If the create_uid isn't in the context or in the params, it will be set to False ## Steps to reproduce: - Create a user (to be deleted later) - Create a sign request with this user - Delete the user - Try to open the sign request - The error should be displayed opw-4786368
French companies using a fiscal year that does not end on 31 December can now generate annual tax reports with the correct dates. This prevents incorrect warnings during tax closing and better supports legitimate French reporting periods such as a June year-end.
Original PR description
In France, some of our users choose a different fiscal period, like finishing on 30 June. If they try to generate their tax report annually, they will have a warning when doing their tax closing, and the dates will be wrong. But it should be possible (form 3517-S-SD mention CA 12) A setting exists for it but was not made generic to avoid providing useless settings for everybody. So add France to these countries. opw-4968327
This fix ensures Australian Single Touch Payroll zeroing reports include the correct payslip dates. It helps keep payroll reporting accurate and avoids missing date information in compliance-related submissions.
Original PR description
steps to reproduce: 1. install l10n_au_hr_payroll_account 2. run the test `TestSingleTouchPayroll.test_stp_zeroing` the dates of the payslips are not set in the STP report build_error-228503
Users can now change the dates of recurring planning shifts without encountering a missing record error. The Sale Planning app now verifies that shifted records still exist before continuing, preventing crashes and making recurring shift edits safer.
Original PR description
Version: 17.0 Steps to reproduce: - Install sale_planning - Create a recurrence shift. - Change the date of second shift which is created by recurrence. - Give the edit value as All shifts. - save record, missing error occured. Issue: When a user changes the date of a shift created by recurrence, the system crash with the message, "Record does not exist or has been deleted." Cause: There was an issue between "Planning" and "Sale Planning". When a user moves a shift, "Planning" removes the old shift from the system except the first one, But 'sale planning' was still trying to work with that removed shift. Fix: Now, after 'Planning' does its work, 'Sale Planning' checks again to see that shifts are still there. It only works with shifts that actually exist. So crash no longer happens. Users can now safely change the date of recurring shifts without errors. task-4859892 Forward-Port-Of: odoo/enterprise#88234
Bank statement imports started from the accounting dashboard now continue through all batches instead of stopping after the first portion of the file. The import page also shows the correct file name, making the process clearer for users handling large bank statement files.
Original PR description
**PROBLEM** When importing bank statements from the dashboard, it only imports the first batch (by default the first 2000 lines) instead of importing the whole file. This is inconsistent with the…
**PROBLEM** When importing bank statements from the dashboard, it only imports the first batch (by default the first 2000 lines) instead of importing the whole file. This is inconsistent with the behavior of the import done from the reconcilation page. Also, on the import page, the file name is incorrect (it's always `bank_statement_import.csv`) **STEP TO REPRODUCE** file to reproduce the issue : [MP 2280260435_movements_-2025-04-01-191536.xlsx](https://github.com/user-attachments/files/20880784/MP.2280260435_movements_-2025-04-01-191536.xlsx) 1. install the accounting module 2. goes on the dashboard, click on the 3-dot button on the kanban for the bank account, and import a file. 3. make sure the file will be imported in multiple batches (reduced the batch size to 200) and click on import. 4. notice how only the first batch was imported. **CAUSE** In python, The `AccountBankStmtImportCSV` class override the execute_import method of the `base_import.import`. In this override, we add a entry in the `messages` list. (see `enterprise/account_bank_statement_import_csv/models/account_bank_statement_import_csv.py`) In JS, all entry in messages are treated as errors, and the import is interrupted. (see `odoo/addons/base_import/static/src/import_model.js`) https://github.com/odoo/odoo/blob/389b355e7ec761fe8dc2908ac5aec540b0345c48/addons/base_import/static/src/import_model.js#L410-L417 The message entry added in the python was used in the past to automatically open the reconcillation page with the statement lines added. This feature was removed, but not the message. **FIX** - Remove the problematic message entry. - Fix the name of the file in the import action. opw-4823808
This update corrects an automated test for the Knowledge calendar command so it selects a visible calendar item and verifies the correct event time after drag and drop. It helps keep the Knowledge feature's calendar behavior reliably tested and reduces false build failures.
Original PR description
fixed css selector that is being used as the previous selector wasn't visible so item was found but not visible , and the updated start and stop timings according to the action of dragging and dropping from 9:00:00 to 11:00:00 the start time should be 11:00:00 and stop time should be 12:00:00 build_error-163015
The Philippine BIR 2307 Excel export checks were updated to match the latest required format. This helps ensure reports include ZIP codes and use the correct tax-based payment description, reducing filing inaccuracies.
Original PR description
The BIR 2307 XLS export was missing the `ZIP_code` and incorrectly showing the `nature` of payment from the invoice line instead of the tax description. In this commit: --- - updates the tests to include the `zip_code` column and fetch the correct `nature` from the tax description. - adjust name fields to reflect individual vs company partner logic. community-PR- odoo/odoo#214940 --- task-4880921
Features or functions removed from Odoo
An old internal test that was not part of the normal official test process has been removed because it had become broken. This cleanup reduces maintenance noise without affecting customer-facing Odoo functionality.
Original PR description
`test_parse_inline_template` has never been run "officially" since it's not in a module's test directory, which is where the built-in test harness looks things up. Miraculously it actually worked…
`test_parse_inline_template` has never been run "officially" since it's not in a module's test directory, which is where the built-in test harness looks things up. Miraculously it actually worked still if one managed to get it run (via some other test harness), however with #212315 it's now broken: - #212315 unconditionally looks up the `test_tags` during `__init__` - way back when test tags were added in b356b190338e3ee032b9e3a7f670f76468965006, a default value for test tags was only set on classes defined somewhere within the `odoo.addons` namespace, this was kept on all subsequent updates (even after the `module` was removed from the test tags and moved to a separate attribute) As a result, when running `test_parse_inline_template` the initialisation of each test now fails with an `AttributeError` right in the `__init__`. Can't be arsed to move the test to a place where it's run, and clearly nobody's cared in the last 4 years. Forward-Port-Of: odoo/odoo#220832 Forward-Port-Of: odoo/odoo#220768
Miscellaneous changes