Thursday, February 27, 2025
2 changes · saas-17.4
Resolved issues and error corrections
Checkout payments using the Demo payment method no longer crash when a customer’s address does not include a state or region. The payment form now ensures a state value is present, helping customers complete purchases more reliably.
Original PR description
An error occurs when a user attempts to make a payment without specifying a 'state' in the address. Step to produce: - Install the `website_sale` module. - Enable Demo payment method. - Navigate to `/shop`, add a product, and open the cart. - Click on the Checkout button and enter an address without a 'state'. - Click on `Pay With Demo` for payment. `KeyError: 'state'` This issue occurs because the system attempts to retrieve the 'state' from the address at [1], but it is missing in it. Link [1]: https://github.com/odoo/odoo/blob/169bbab49bb345c1243b02da0a1510e45faba64e/addons/website_sale/controllers/main.py#L1666 To resolve this issue, add a `state` in the payment express checkout form as a label to ensure that the address always contains a 'state', And provide a default value in 'state' if it is not available in address. Sentry-6295883035 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A crash in the IoT hardware driver was fixed by removing a translation call that was not available in that environment. This helps connected devices remain stable when handling serial driver errors.
Original PR description
This line would consistently crash with: `NameError: name '_' is not defined`