Daily updates from Odoo
Tuesday, October 29, 2024
19 changes
15 changes
Resolved issues and error corrections
Fixes an eCommerce display issue where turning product tags on or off could incorrectly make a product appear unavailable or without a valid option. Product availability messages now depend only on the product's actual sale status, helping avoid customer confusion and lost sales.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Go to eCommerce; 2. open a product page; 3. open editor; 4. toggle "Product Tags" in the CUSTOMIZE tab. Issue ----- Product suddenly gets displayed as not…
Versions
--------
- 18.0+
Steps
-----
1. Go to eCommerce;
2. open a product page;
3. open editor;
4. toggle "Product Tags" in the CUSTOMIZE tab.
Issue
-----
Product suddenly gets displayed as not having a valid combination.
Cause
-----
PR #173823 modified the template, accidentally inserting some elements between this element:
```xml
<form t-if="product._is_add_to_cart_possible()" action="/shop/cart/update" method="POST">
```
and its consequent elements:
```xml
<p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
<p t-else="" class="alert alert-warning">This product has no valid combination.</p>
```
As the last of these newly introduced elements happened to include `t-if="is_view_active('website_sale.product_tags')"`, the template is still valid as far as the renderer is concerned, but obviously the display of product tags shouldn't be a prerequisite of product availability.
Solution
--------
Move the two elements back to where they make sense: right after the `product._is_add_to_cart_possible()` check.
opw-4277788The mobile editing toolbar now stays directly above the on-screen keyboard instead of leaving an awkward gap. This makes editing content on phones smoother and reduces visual confusion for users.
Original PR description
Current behavior before PR: When the keyboard opens on mobile, the toolbar appears in the wrong position, leaving a space between the toolbar and the keyboard. Desired behavior after PR is merged: Now, when the keyboard opens on mobile, the toolbar will correctly stick to the top of the keyboard. task:4196686
This fixes a checkout error that could happen when shoppers switched between home delivery and in-store pickup after reloading the cart page. Customers can now change delivery options more reliably, reducing failed checkout attempts.
Original PR description
Steps:
- Activate multiple Delivery Methods
- Add a product to cart in /shop
- set delivery method to pickup in store and reload the page
- change delivery method to another method and then try changing it back to pickup in store
Issue:
- Traceback : object not subscriptable
Cause:
- `editPickupLocationButton.dataset.pickupLocationData` is set to "{}" and `_showPickupLocation` calls `_setPickupLocation` with this object leading to traceback
Fix:
- Added a check for empty json object
opw-4282496
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes several small issues in automated guided tours for Project, Project Todo, and Website Sale Autocomplete. These changes help keep test flows stable by avoiding duplicate actions, using existing sample data, and waiting for records to be created before continuing.
Original PR description
In this commit, we make little fix for multiple tours. project_update_tour_tests.js: remove two time click. project_todo_main_functions.js: fill marc instead of test to avoid to create a new user. autocomplete_tour.js: precise trigger to remove run functions. project_tour.js: check the new record is created before continue the tour. 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 a problem where non-admin employees could get stuck after choosing an API key expiration date beyond the allowed limit. The system now blocks the invalid date earlier, so users can correct it and continue creating their API key without being trapped by permission limits.
Original PR description
Steps to reproduce: ------------------- - login as a non-admin employee - create a new API key - set a custom date in longer than 3 months (a warning appears) - click on generate - error occurs Issue: ------ It is no longer possible to modify the date. Cause: ------ Employees do not have write access to this model. They are therefore no longer able to modify the record already created. Solution: --------- Trigger a `ValidationError` when creating a `res.users.apikeys.description` record if the expiration date is not correct. opw-4273666
Microsoft Calendar synchronization could fail when refreshing a user's connection token because an expected service value was not provided. This fix keeps the existing default Microsoft Calendar service behavior when no specific service is supplied, preventing sync errors for affected users.
Original PR description
Description of the issue/feature this PR addresses: While getting a token for Microsoft Calendar, the `_refresh_microsoft_calendar_token` method has been called without service parameters. Current…
Description of the issue/feature this PR addresses:
While getting a token for Microsoft Calendar, the `_refresh_microsoft_calendar_token` method has been called without service parameters.
Current behavior before PR:
Raising an error
```
User._refresh_microsoft_calendar_token() missing 1 required positional argument.
```
IMO, the extra parameter `service` has been added so that dynamic service can be used.
Fixing by making service as default argument None, and if no service passed, then it will use microsoft_service (current behaviour)
```
TypeError: User._refresh_microsoft_calendar_token() missing 1 required positional argument: 'service'
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/microsoft_calendar/controllers/main.py", line 45, in microsoft_calendar_sync_data
need_refresh = request.env.user.sudo().with_context(dont_notify=True)._sync_microsoft_calendar()
File "addons/microsoft_calendar/models/res_users.py", line 105, in _sync_microsoft_calendar
with microsoft_calendar_token(self) as token:
File "contextlib.py", line 137, in __enter__
return next(self.gen)
File "addons/microsoft_calendar/models/microsoft_sync.py", line 52, in microsoft_calendar_token
yield user._get_microsoft_calendar_token()
File "addons/microsoft_calendar/models/res_users.py", line 35, in _get_microsoft_calendar_token
self._refresh_microsoft_calendar_token()
```
sentry-6026445994
OPW: 4290260
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update applies the project's JavaScript formatting rules to web test files that previously missed automated checks. It helps keep the test suite consistent and easier to maintain, without changing customer-facing behavior.
Original PR description
Since the creation of v18, the JavaScript tooling wasn't enabled. The tooling was enabled in commit[1]. In this commit, we applied a manual eslint pass inside the "web/static/tests" directory to ensure we have well-formatted .test.js files. ``` eslint '**/web/static/tests/**/*.js' --fix ``` [1]: https://github.com/odoo/odoo/commit/f3407c392d4e7595e9a299662115df03bacbd41c
POS refund and reversal accounting entries now include the correct product details and quantities from the original sale. Refund quantities are shown as negative, making records clearer and helping reduce reporting or reconciliation errors.
Original PR description
This PR resolves issues with POS order reversals by: - **Including Product Details and Quantity**: Reversal entries now capture `product_id`, `product_uom_id` and accurate `quantity`, matching the original order. - **Adjust Quantity Sign Based on Refund Status in POS Closing Entry**: The quantity for refund lines is now set to negative, accurately reflecting the refund status in the entry.
Fixes an issue where message author avatars disappeared for guests after a member left a public chat channel. This keeps chat history clearer and easier to follow for external or guest viewers.
Original PR description
Steps to reproduce: - Create a public channel - Add a non website_published user as a new member - Log in as that new member and send a message then leave the channel - Open the channel as a guest - The author avatar of the message is not there
This fixes a toolbar issue in the HTML editor where clicking near the edge of dropdown items could close the toolbar instead of selecting the option. It also ensures the selected 13px font size is displayed correctly, making formatting controls more reliable for users.
Original PR description
Description of the issue this PR addresses: Current behavior before PR: Clicking near the edge of a toolbar dropdown item would not work. This occurred because the `user-select-none` class was applied to the child element rather than the dropdown item itself, causing `onSelectionChange` to be triggered, followed by `updateToolbarVisibility` closing the toolbar. Desired behavior after PR is merged: The `user-select-none` class is now applied directly to the dropdown item, preventing `updateToolbarVisibility` from closing the toolbar when clicking near the edges of dropdown items. task-4241028 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an error that stopped users from synchronizing their Odoo calendar with Outlook. By passing the required calendar service information during token refresh, Outlook calendar sync can proceed normally instead of showing a traceback.
Original PR description
When the user tries to synchronize calendar with Outlook calendar, a traceback will appear. Traceback: ``` TypeError: User._refresh_microsoft_calendar_token() missing 1 required positional argument:…
When the user tries to synchronize calendar with Outlook calendar,
a traceback will appear.
Traceback:
```
TypeError: User._refresh_microsoft_calendar_token() missing 1 required positional argument: 'service'
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/microsoft_calendar/controllers/main.py", line 45, in microsoft_calendar_sync_data
need_refresh = request.env.user.sudo().with_context(dont_notify=True)._sync_microsoft_calendar()
File "addons/microsoft_calendar/models/res_users.py", line 105, in _sync_microsoft_calendar
with microsoft_calendar_token(self) as token:
File "contextlib.py", line 137, in __enter__
return next(self.gen)
File "addons/microsoft_calendar/models/microsoft_sync.py", line 52, in microsoft_calendar_token
yield user._get_microsoft_calendar_token()
File "addons/microsoft_calendar/models/res_users.py", line 35, in _get_microsoft_calendar_token
self._refresh_microsoft_calendar_token()
```
https://github.com/odoo/odoo/blob/88fa5a113debfbf65f9b0862b14c15ef4da45d12/addons/microsoft_calendar/models/res_users.py#L35
Here, ``_refresh_microsoft_calendar_token`` method is called without ``service`` argument.
https://github.com/odoo/odoo/blob/88fa5a113debfbf65f9b0862b14c15ef4da45d12/addons/microsoft_calendar/models/res_users.py#L41
Here, the ``service`` argument is added but not used anywhere.
sentry-6026445994
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe upload button for quote builder documents is now hidden until a quotation template has been saved. This prevents users from triggering an error when adding documents before the system has created the template record needed to attach them correctly.
Original PR description
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module -…
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module - Sales > Configuration > Sales Order > Quotation Templates - Create New > Quote Builder > Click on Upload - Try to upload a file Traceback: --- ``ValueError: invalid literal for int() with base 10: 'false'`` Previous Behaviour: --- When attempting to upload a file in the ``Quotation Templates`` without first saving the template, the template ID is not generated at [1]. As a result, at [2], we encounter an issue where ``int(sale_order_template_id) = 'false'``. This happens because the template tries to access its name in the uploaded file. If the template name is not available and we attempt to upload the file, ``resId`` at [1] will be returned as false. Solution: --- Until the template is saved, the upload button will remain hidden. Once the template is saved, the upload button will be displayed. This ensures that when a file is uploaded, the template name will be properly associated with it. [1]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/static/src/js/quotation_document_kanban/quotation_document_kanban_widget.js#L21-L23 [2]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/controllers/quotation_document.py#L24-L26 sentry-5963406254 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes several issues in the salary contract flow: applicant names now display correctly when signing, dependent benefit options only appear when relevant, and dropdown menus look editable. This reduces confusion for applicants and HR teams using the salary configurator.
Original PR description
1. When an applicant (who doesn't have an employee record yet) signs a contract their name is shown as `simulation employee` instead of their actual name. 2. Dependent benefits are visible although the mandatory benefits aren't selected. For example: the dialog box showing the number of insured children under ambulatory insurance is visible although the abulatory insurance isn't selected on the salary configurator. 3. The dropdown menus on the salary configurator have a grey color which makes the user think that they aren't editable. These changes fix the above issues. task-4280657
This fix prevents subscription order lines from being recalculated more broadly than needed. It helps reduce unnecessary processing, improving reliability and performance for subscription-related sales operations.
The Loan Accounting app now correctly depends on the Import & Export feature it uses. This prevents the database from becoming inaccessible when Import & Export is disabled while the loan app remains installed.
Original PR description
**Steps to reproduce:** - Install account_loans - Go to Settings - Disable "Import & Export" option - Save **Issue:** The db is not accessible anymore because of the following error: ``` The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle: - @base_import/import_action/import_action - @base_import/import_model The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems: - @account_loans/components/loans/import_action ``` **Cause:** When "Import & Export" option is disabled, "base_import" module and many others are unsintalled because they depend on "base_import" module. "account_loans" is not uninstalled but it should be because it depends on "base_import" module as it extends its "ImportAction" component. opw-4283944
4 changes
Resolved issues and error corrections
This update resolves an issue where external tax calculators were incorrectly processing taxes on down payment invoices. To ensure accurate calculations, down payment invoices no longer send tax information to external calculators, reverting to a standard invoice calculation. This simplifies the process and avoids discrepancies due to tax rounding and exemptions.
Original PR description
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by…
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from account.tax records. It's not always going to match. It's not possible to fix this by externally calculating taxes on the down payment invoice. The single down payment line cannot accomodate all different tax categories. Creating a down payment line per tax category (e.g. avatax_category_id) was considered, but a specific down payment product would need to be created per used tax category which would clutter the database. On top of that, down payment products are removed in later versions [1] which would complicate this approach even further. This solves the issue by not calculating taxes on down payments at all. The down payment invoice will not be sent to external tax calculators. The resulting down payment lines on the SO won't have taxes set, and those lines will be excluded from the request to the external tax calculator. The final, "regular invoice" transaction will happen as if no down payments were made. The down payment lines won't be sent, so this will look like a regular invoice from the external calculator's view. By default, the downpayment lines equal the subtotal of the selected down payment amount. We remove tax_ids from the lines because we cannot count on calculating tax locally (see above). To keep the behavior analogous we override the downpayment wizard to create a single down payment line with a total equal to the entered total in the wizard. [1] odoo/odoo@9aa52dd6418e5881adc2d96d15d062b55d6150c5 opw-3971513
This update corrects a recent translation of payroll rule codes that was causing errors in salary calculations. The change reverts the translation, ensuring accurate payroll processing for French company structures like 'cadre'. This resolves confusion and improves the reliability of the payroll system.
Original PR description
Steps to reproduce: - Switch to 'FR company' > New employee > New contract (Use defaults) - Payroll app > Payslips > All Payslips - New Payslip for your employee using a french structure (like 'cadre') - Compute sheet > Salary computation tab - (Maybe set 'Salary Journal' in Configuration > Structures if needed) Salary rule codes were translated leading to confusion in the fields to fetch when computing payroll sheets. opw-4240326
This update enhances the report editor's ability to display placeholder content for 't-out' fields. Previously, developers could manually adjust expressions to avoid placeholders, but now a new 'data-oe-demo' attribute provides a clearer signal for placeholder content within the studio environment, ensuring consistent and correct display.
Original PR description
Some reports have been edited to have qweb default content that was meant to only be used from within studio. ```xml <t t-field="some_field">studio placeholder</t> ``` This content is displayed if the evaluated value is either False or None. This can also happen outside studio, if the field is not required. An attribute `data-oe-demo` was introduced for t-fields. ```xml <t t-field="some_field" data-oe-demo="studio placeholder"/> ``` This attribute was introduced for t-field nodes in order to only display placeholder content inside the report editor. We didn't introduce it for `t-out` as it was possible to change the expression `<t t-out="obj.prop"/>` -> `<t t-out="obj.prop or ''"/>` While this definitely works, the attribute better signals the intent of the change. We thus add support for the attribute on t-out.
This update resolves an issue preventing the correct generation of the 'COA SAT (XML)' report for Mexican companies. The previous XSLT was incorrect, causing validation failures. This fix ensures the report meets SAT requirements and allows for proper filing.
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward-Port-Of: odoo/enterprise#72882