Daily updates from Odoo
Wednesday, January 29, 2025
23 changes · 18.0
Resolved issues and error corrections
Users can now download original PDF bills attached to newly created draft vendor bills without encountering an error. The fix ensures draft bill records are handled correctly when preparing the download, restoring a standard accounting workflow.
Original PR description
Users currently cannot retrieve original bills attached to newly created draft moves, because an error is blocking the action Steps to reproduce: - Go to Accounting > Vendor > Bills - Upload a pdf - Back in list view, select the created bill, Download > Original Bills Issue: Traceback will raise `AttributeError: 'bool' object has no attribute 'decode'` This occurs because, after https://github.com/odoo/odoo/commit/ce73ed61bcf293953bc0c821ceaef3ddb9a47e3c, draft moves are not named '/' anymore, the name field will be just `False`. However reportlab expects a string and it crashes opw-4502791
The web tour test suite has been re-enabled after being temporarily disabled to unblock an earlier release process. This helps improve confidence that guided tour behavior continues to work correctly, while avoiding an issue that interfered with the test engine.
Original PR description
In [1], we commented out the tour_automatic unit test file in the manifest to merge this PR as soon as possible. In this commit, we uncomment this file. The solution is to not patch browser.console because it can cause big problems in the Hoot unit test engine.
This fix prevents an internal error from occurring when Odoo tries to show a company-related warning. The warning can now be logged correctly, improving reliability in situations where company consistency checks are triggered.
Original PR description
Description of the issue/feature this PR addresses: In the company check warning message, self.model_name was used instead of self._name. Current behavior before PR: model_name is not an attribute of the class BaseModel, which causes an AttributeError when the warning message is triggered. Desired behavior after PR is merged: Warning message correctly logged without having an error. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a problem where pressing Escape while editing a form in a dialog could cause an error instead of closing cleanly. It improves reliability when users cancel edits, especially in areas like Studio and other popup form views.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where invoice identifiers could appear repeatedly in accounting report line names when the same sequence was used as both customer and payment reference. The report now avoids duplicate wording, making entries easier to read and reducing confusion for accounting users.
Original PR description
### Steps to reproduce: - Go to Accounting > Reports > Aged Receivable - Unfold any customer shown, click on the three dots next to an invoice, and select "View Journal Entry" - On the Journal Entry,…
### Steps to reproduce:
- Go to Accounting > Reports > Aged Receivable
- Unfold any customer shown, click on the three dots next to an invoice, and select "View Journal Entry"
- On the Journal Entry, add the invoice sequence to Customer Reference and Payment Reference
- Go back to the report, you should see the invoice name is now shown 4 times
### Cause:
The bug appeared in this commit (https://github.com/odoo/odoo/commit/eb872c09897eb9edd5b6e5b9e8171fa6764be3dc). When computing the line `display_name`, if there is a name, a reference and `line_name`. The variable line_name already include the reference:
`name = f'{line.move_id.ref} - {line.move_id.payment_reference}'` (https://github.com/odoo/odoo/commit/a6cbb7c2d3538d57dc8498f0dacf4566ea1492e7)
So `line_name` is different from `move_name` and the result is:
`line.move_id.name (line.move_id.ref) line.move_id.ref - line.move_id.payment_reference`
### Solution:
Check if the move_ref and the payment ref are the same, in that case only put one of the two as line_name. Then when computing the display_name, line_name will equal to move_name so line_name will not be included.
opw-4492298This fixes an issue where the user switch option could disappear on the login page when debug mode was enabled. Users can now switch between recently used accounts reliably while troubleshooting or testing.
Original PR description
**Description of the issue/feature this PR addresses:** The user switch component fails in debug mode with the following error in the console log > Error message: > OwlError: Got duplicate key in t-foreach: [object Object] > at UserSwitch.template This error happens because we are using the user object as a key ([object Object]), instead we should use the user_index **Current behavior before PR:** 1. Open a runbot 2. Log in and log out with admin account 3. Log in and log out with demo account 4. The user switch component appears on the login page 5. Adding ?debug=1 to the URL causes: - User switch component disappears - Console shows duplicate key error **Desired behavior after PR is merged:** - Having possibility to use switch user component in debug mode --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The autocomplete dropdown now keeps the highlighted option visible when users move through long lists with the keyboard. It also closes consistently when tabbing backward, making form navigation more predictable and reducing user frustration.
Original PR description
When the list of sources is longer than the `<AutoComplete>` height, navigating with the arrow keys did not scroll the menu. This commit makes sure the active option is always in focus and visible. task-3758859
This fixes an issue where employees on flexible working schedules could have a one-day time off request counted as two days. The change ensures leave duration is calculated from the actual requested date range, helping keep balances and approvals accurate.
Original PR description
### Steps to reproduce: - Create a working schedule that is flexible - Assign this working schedule to an Employee - Create a time off type and set the request unit to be 'half day' - Create an…
### Steps to reproduce: - Create a working schedule that is flexible - Assign this working schedule to an Employee - Create a time off type and set the request unit to be 'half day' - Create an allocation for the created time off type for the employee with the flexible working schedule - Create a leave for the mentioned employee with the created time off type for 1 day - Notice the duration of the leave is 2 days not 1 ### Cause: When creating a working schedule we compute the duration of the periods and since 'attendance.calendar_id.hours_per_day' won't have a value each period will be 1 day. https://github.com/odoo/odoo/blob/18.0/addons/resource/models/resource_calendar_attendance.py#L82 So, when getting the duration of the leave where its request_unit is not 'day' the duration will be the summation of the periods' duration of the working schedule for the employee which in this case will be 1 for each period -each day has 2 periods with the value of 1- ### Fix: Check if the employee if on flexible hours we calcualte the duration as the difference between the date_to and date_from rounded up in days opw-4309551
This fixes an issue in Point of Sale where product stock could be shown incorrectly when a cashier changed product options during configuration. The update reduces duplicate stock checks and ensures the displayed on-hand quantity matches the selected product variant, helping staff make more accurate sales decisions.
Original PR description
Before this commit, multiple requests were sent when the user changed options in the product configuration. Additionally, the on-hand quantity was displayed incorrectly when opening the product configuration. When opening the configuration popup, the product was initially set. However, once the configuration was mounted, the selected attributes could result in a different product variant. We call `computeProductProduct` to update the product. The issue occurred because, while the first request was still in progress, a second request was triggered to fetch the correct product information. Since the first request was not yet finished, the second request was ignored, causing the configuration to display an incorrect on-hand quantity for the selected product variant. opw-4385171 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website editor no longer shows an unnecessary help tooltip beside the option to serve custom fonts from Google servers. This reduces confusion for internal users configuring website fonts, without changing any website behavior.
Original PR description
Steps to reproduce: 1. Open website app 2. Click edit 3. Click on "Font Family" 4. Click on "Add a Custom Font" 5. Click on the question mark tooltip showing next to "Serve font from Google servers" - Removed the tooltip since the form is only accessible internally and not relevant to all users. This was only added in v18+ --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update brings Odoo's spreadsheet engine to a newer maintenance version with fixes for spreadsheet sessions, Excel import/export validation ranges, and chart trendlines. Business users should see more reliable spreadsheet behavior, especially when working with XLSX files and logarithmic chart trends.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/a881cffac [REL] 18.0.12 Task: 0 https://github.com/odoo/o-spreadsheet/commit/79731b80f [FIX] session: useless snapshot…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/a881cffac [REL] 18.0.12 Task: 0 https://github.com/odoo/o-spreadsheet/commit/79731b80f [FIX] session: useless snapshot on leave Task: 4356913 https://github.com/odoo/o-spreadsheet/commit/e8ae60230 [FIX] xlsx: fix data validation range Task: 4505771 https://github.com/odoo/o-spreadsheet/commit/b52dbde23 [REF] range: rename useFixedReference Task: 4506120 https://github.com/odoo/o-spreadsheet/commit/179614731 [FIX] xlsx: export data validation with unbounded range Task: 4505771 https://github.com/odoo/o-spreadsheet/commit/74263151a [FIX] charts: fix logarithmic dataset trendline Task: 4385057 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: Mehdi Rachico (mera) <mera@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 update prevents a Point of Sale crash that could happen when missing information was processed. It makes checkout-related data handling more reliable and helps avoid interruptions for users.
Original PR description
The error was caused by calling .trim() on a variable that could be undefined. This commit adds a check to ensure the variable is defined before calling .trim()
This fix keeps XML files from being selected as the main attachment for vendor bills when Italian localization is installed. It prevents unreadable files from being produced when users print original bills, preserving the expected PDF output.
Original PR description
**Issue:** When "l10n_it" is installed, an override of "_message_set_main_attachment_id" method is changing the default value of "filter_xml" param from True to False, which is impacting the general behavior when the module is installed. As a consequence, xml files can be set as main attachment of a bill, which generates unreadable PDF files when using "Print > Original Bills" action on a bill. opw-4439034 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The product configuration screen now respects the same editor setting that hides or shows the quantity selector on product pages. This keeps the shopping experience consistent and prevents customers from seeing a quantity button that the business intended to hide.
Original PR description
version: 18.0 Issue : When the "Select Quantity" button is hidden on the product page via the editor, it remains visible on the product configuration page. Fix: Added a condition for showQuantity to ensure the visibility of the "Select Quantity" button is consistently managed on both the product page and the product configuration page. With this fix, the visibility of the "Select Quantity" button can now be properly controlled for the product configuration page as well, aligning with the editor's settings. opw-4316784
This fixes a problem where partner autocomplete could fail during company onboarding because a required identifier was missing from the relevant company form. It also avoids problems when the autocomplete feature is later uninstalled, keeping the setup more reliable for businesses using or removing this option.
Original PR description
`partner_gid` was missing from `res_company_form_view_onboarding` view which was creating a bug when applying the partner autocomplete. Rollback of odoo/195000 as it created issues if you uninstalled `partner_autocomplete`. The field will still be present in the view, but it wouldn't exist in the database. opw-4489441 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now open IAP accounts even after the SMS module has been uninstalled. This prevents an unexpected error caused by SMS-specific account data remaining after the module is removed.
Original PR description
A traceback occurs when the user tries to open IAP accounts after uninstalling the SMS module. To reproduce: 1) Install hr 2) open IAP accounts from settings/technical/iap/iap accounts 3) Create a…
A traceback occurs when the user tries to open IAP accounts after uninstalling the SMS module. To reproduce: 1) Install hr 2) open IAP accounts from settings/technical/iap/iap accounts 3) Create a new iap account with service as `SMS` 4) Uninstall `SMS` module 5) Try to open the iap accounts again Error:- ``` ValueError: Invalid field 'sender_name' in 'iap.account' ``` This error occurs from the below line https://github.com/odoo/odoo/blob/1e7c2ca8c929d15c9015b960f7fcbe4560413e98/addons/iap/models/iap_account.py#L128 Because when the user creates an iap account with service_name as `SMS`, We include `sender_name` in the dict of updating fields. https://github.com/odoo/odoo/blob/1e7c2ca8c929d15c9015b960f7fcbe4560413e98/addons/iap/models/iap_account.py#L123-L126 But, the `sender_name` field is defined in the SMS module, So it will lead to the above traceback as the `SMS` module is uninstalled. https://github.com/odoo/odoo/blob/1e7c2ca8c929d15c9015b960f7fcbe4560413e98/addons/sms/models/iap_account.py#L9 sentry-6249864173
Brazilian electronic invoices now send the invoice line description instead of only the product name, letting businesses include the extra detail they entered for each line. The fix also prevents service transaction errors from being incorrectly cleared, improving reliability for Brazilian AvaTax electronic invoicing.
Original PR description
We always send the product name, but sometimes users want to add more information to the electronic invoice. It makes more sense to send the line description (account.move.line's name field) instead. That allows the user to specify what they want and also aligns better with what the API expects (their field is called "description", not "productName"). To avoid changing function signatures in stable we override _l10n_br_build_avatax_line and browse the account.move.line using line_id. In master we'll clean it up by providing "description" directly in _get_line_data_for_external_taxes() for both account.move and sale.order. This also fixes a mistake that cleared errors for service transactions (introduced in the merge of l10n_br_avatax_services [1]). [1] https://github.com/odoo/enterprise/pull/64714 task-4401787
Accountants can now edit Brazilian NCM codes used for service invoices so they match the format required by each city. This helps prevent invoice rejections in cities whose local tax systems expect different code formats, such as leading zeros or no periods.
Original PR description
Goods invoices go through a central, federal API. Service invoices however, go through an API maintained by the city the business is located in. Because of this, there are thousands of different…
Goods invoices go through a central, federal API. Service invoices however, go through an API maintained by the city the business is located in. Because of this, there are thousands of different APIs. Avatax sits between us and those city APIs, but certain differences are not handled by them. The most blocking is the format of the NCM code. We based our NCM codes on the official law [1], but unfortunately the required format differs between cities. Some cities require a leading zero in front of the code (e.g., 04.10 instead of 4.10), presumably because that's what non-service NCM codes look like. Other cities may not require periods. Cities reject invoices with "wrong" NCM codes, so at the moment our service invoice integration doesn't work there. This seems to affect around 25% of cities. Avalara states they cannot translate the codes for us due to the large number of cities involved. So, users will have to figure out the required format of the NCM code from their city hall and edit the NCM codes based on that. In order to do so we make the NCM codes editable for accountants and provide views and menu items. NCM codes are loaded from CSV and are non-updateable (noupdate=False) by default. To avoid changes being overwritten during module updates we turn them updateable in the model's init() (called during module update). In master this can be removed and done in post_init_hook instead, so that it only happens once during module installation. It's not needed to change the post_init_hook here. After module installation the records will be noupdate=False, but init() always runs before l10n_br.ncm.code.csv is reloaded so manual changes will persist. [1] https://www.planalto.gov.br/ccivil_03/leis/lcp/lcp116.htm task-4374334
The scheduled payment status check now runs only when there are payments that actually need checking. This reduces unnecessary background activity and helps keep online payment processing more efficient without changing the user experience.
Original PR description
The aim of this commit is making sure cron that runs every 6 hours and which checks all the payment status is only used when we do have payment that needs to be checked. no task id
This fixes a missing return in the Chilean electronic invoicing point-of-sale flow. It helps ensure POS order data is passed back correctly, reducing the risk of interrupted or incomplete processing for Chilean sales receipts.
Original PR description
The return was forgotten in a previous commit for an override of the `read_pos_data` method in the `pos_order` model.
The EU OSS reports now show the closing entry button again in version 18.0. This lets users complete closing entries directly from the report because the underlying closing process is expected to work correctly again.
Original PR description
From version 18.0, the closing should work fine and there's no need to hide the closing button anymore. This reverts commit cf86ce0e0c7c47336446da5b335cbc53b7602fcd.
Uploading large images to Documents no longer automatically shrinks them. This preserves the original file quality and avoids unexpected changes to images stored by users.
Original PR description
Bug === When uploading a big image in documents, it's resized. It has been fixed in 17.4 with `Task-3944609`, but we re-introduced the issue during the refactor of documents. Task-4505777
This update hides certain Shopee-related fields unless debug mode is enabled, reducing clutter and preventing accidental changes in normal use. It also lets users manually choose which products should have their inventory synced, improving control over stock updates.
Original PR description
Commit 6845ca19567577f70910ed269f91232453c93b20 let some fields visible in the view where they should only be available in debug mode. Also allows to manually change which product should have its inventory synced.