Sunday, January 21, 2024
2 changes · 17.0
Resolved issues and error corrections
This update fixes an issue where UPS shipments with Collect on Delivery payment method were failing due to incorrect data format. The COD amount is now sent to UPS as a text string instead of a number, which aligns with UPS requirements and allows orders with this payment method to process successfully.
Original PR description
Steps to reproduce: Set up a UPS shipping method, enable "Collect on Delivery" in the configuration. Make a sale order with this shipping method, confirm and validate the delivery. Error: ``` Missing or invalid COD monetary value for Package 1. Valid length is 0 to 8 numeric and can hold up to 2 decimal places. ``` Based on UPS documentation, the value for COD needs to be of type string. opw-3666755 Forward-Port-Of: odoo/enterprise#54715 Forward-Port-Of: odoo/enterprise#53896
This fix resolves a crash that occurs when users click "See Document" links in email notifications for certain record types that don't use the standard mail threading system. The issue affected rare cases where custom models implement email functionality without inheriting from the standard mail framework, such as the mail groups feature. The fix ensures these redirects work smoothly without errors.
Original PR description
'_redirect_to_record' is used notably when accessing 'mail/view' controller used notably with email notifications ('See Document' link). In order to try to avoid multi company issues a call to '_get_mail_redirect_suggested_company' is performed in order to find the record's preferred company.
However it is defined on 'mail.thread' which means the redirect crashes if invoked using a non thread record. This is quite rare but may happen with models using a mailgateway implementation similar to 'mail.thread' without inheriting from the mixin (see 'mail.group' model added in Odoo 16).
This limitation is present since a long time but is now more present since odoo/odoo@f4523fcd9219fd781a984dab11a0b8689e236b77 .
Task-3689459
Forward-Port-Of: odoo/odoo#150086
Forward-Port-Of: odoo/odoo#149794