Daily updates from Odoo
Tuesday, October 29, 2024
10 changes · 18.0
Enhancements to existing features
Belgian tax users can now create a payment directly while using the pay taxes wizard. This streamlines the process of paying taxes to the government and reduces the need for separate manual payment steps.
Original PR description
This commit will add the possibility to create a payment from the wizard to pay the taxes to the government. task: 4154861
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-4277788This 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 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-prPOS 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.
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-prFixes 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