Friday, June 21, 2024
8 changes · 17.0
Resolved issues and error corrections
The project now uses Werkzeug versions that better match Ubuntu Noble and Debian Bookworm. This helps avoid warning messages on newer Python versions and keeps deployments smoother on supported operating systems.
Original PR description
Adapt [werkzeug version for Ubuntu Noble](https://packages.ubuntu.com/noble/python3-werkzeug) mainly to avoid deprecation warnings in python 3.12. While at it, adapt for Bookworm as it provides [python 3.11](https://packages.debian.org/bookworm/python3).
The customer portal now only shows the “Quotations to review” alert when there is at least one quotation needing attention. This avoids confusing customers with an alert that points to zero pending quotations.
Original PR description
Problem --- Since the [portal redesign](https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8), made the "Quotations to review" button in the portal an alert, it no longer makes sense to display it when there are 0 quotes to review opw-3991880
Razorpay payments now avoid creating extra saved payment methods when a customer pays a duplicated quotation using an already saved method. This keeps customer payment records cleaner and prevents confusion from duplicate entries.
Original PR description
Steps: - Install sale and razopay app. - Set-up razorpay provider. - Create quotation. - Pay that quotation via razorpay and save payment details. - Duplicate that quote and pay it via already saved method. Issue: - Creating duplicate token when paying via token. Cause: - Since [PR] we are creating token in odoo when razorpay give token_id in notification_data and tokenization is enabled on razorpay and in some case when we pay quote via token it return token in notification_data and since we forgot to check if transaction is already connected to token or not it always create new token :( Fix: - Add condition to check if transaction is connected to token or not and only create token if transaction is not connected to token. Additionally pass entity_data in token creation method so it pass proper data when we don't find `id` in `notification_data`. [PR]: https://github.com/odoo/odoo/pull/159250
This update removes a previously added loyalty program view change because it is not needed in Odoo 17. It helps avoid unnecessary duplicate rendering behavior while keeping gift card and e-wallet setup aligned with the current version.
Original PR description
This reverts commit ac93012e3cf954b5b3bcd4475b63ab027d461355. The gift card/ewallet programs were created without rewards or rules, and the issue is not present in 17 so no need to keep this forward-ported commit. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The live chat window can now be closed without causing an error if its related chat session or member record was deleted elsewhere. This prevents customers or operators from seeing a crash in an uncommon but disruptive scenario.
Original PR description
When user tries to close chat window when current channels/members are deleted. Steps to reproduce error: - Activate 'im_livechat' and 'website' module - Open the 'website' module and clicked Contact…
When user tries to close chat window when current channels/members
are deleted.
Steps to reproduce error:
- Activate 'im_livechat' and 'website' module
- Open the 'website' module and clicked Contact us menu
- Open chat-bot and start conversation
- Duplicate the tab and Go to the Settings>Technical>Channels/Members in second tab
- Delete the current channels/members from second tab
- Go to the first tab and close chat window
- Error will be generated
sentry traceback-
```ValueError: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5830, in ensure_one
_id, = self._ids
ValueError: Expected singleton: discuss.channel.member()
File "odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "odoo/http.py", line 1732, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1960, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/mail/models/discuss/mail_guest.py", line 40, in wrapper
return func(self, *args, **kwargs)
File "addons/im_livechat/controllers/main.py", line 286, in visitor_leave_session
member.sudo()._rtc_leave_call()
File "addons/mail/models/discuss/discuss_channel_member.py", line 297, in _rtc_leave_call
self.ensure_one()
File "odoo/models.py", line 5833, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
Here at [1] member got empty value when current channels/members are deleted from 'discuss.channel.member' model by user.
This commit resolved the above issue by calling '_rtc_leave_call()' method when a member is available.
[1]-https://github.com/odoo/odoo/blob/952ebac37dc65b3fd62ae211cee1fd45fa63cd47/addons/im_livechat/controllers/main.py#L284-L286
sentry-4719812967
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixes an issue where uploaded PDF attachments on newly created invoices showed an empty preview when Document Digitalization was disabled. The invoice view now refreshes after uploads so users can immediately see the PDF preview.
Original PR description
**Steps to reproduce:** - Install Invoicing - Go to "Invoicing / Configuration / Settings" - Deactivate "Document Digitalization" - Create an invoice - Upload a PDF via paperclip button or drag and drop in the chatter **Issue:** The preview box appears but it is empty. **Cause:** In "onUploaded" function of Chatter component, the parent view is not reloaded once the attachment is uploaded because "hasParentReloadOnAttachmentsChanged" property is False. This property depends on "post_refresh" option. **Solution:** Add "post_refresh" option for "message_ids" field in the view as it is done when "account_invoice_extract" module is installed. opw-3887671 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now save Peppol invoicing settings even when the endpoint field is left empty. This prevents an unexpected error and makes the configuration flow more reliable for companies using Peppol e-invoicing.
Original PR description
This traceback arises when the user doesn't give the Peppol endpoint and tries to save it. To reproduce this issue: 1) Install `account_peppol` 2) create a `Belgium` company and switch to that company. 3) Activate `Use PEPPOL Invoicing` in invoice settings 4) Change the Peppol EAS as `0201 - Codice Univoco Unità Organizzativa iPA` 5) Remove the `Endpoint` and try to save it. Error:- ``` TypeError: expected string or bytes-like object ``` When the user makes the `endpoint` as empty its value is `False`. which leads to the above traceback, as the `endpoint` is used to match the `endpoint_rule`. https://github.com/odoo/odoo/blob/c6c0f6ea677f5cb5935d6a3766bca5990539d17a/addons/account_peppol/models/res_company.py#L113-L114 After applying this commit will resolve this issue by giving a `fallback value` and make code more robust. when thepeppol_endpoint is not given by the user. sentry-5121223884
The employee attendance kiosk now uses smaller profile images to reduce loading time. This should make the check-in experience quicker and smoother, especially on slower networks or devices.
Original PR description
In this commit, used `avatar_512` that will help to decrease load time on kiosk mode of hr attendance. 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