Monday, October 21, 2024
1 change · saas-17.4
Resolved issues and error corrections
Customers shopping on Ecuador-based websites can now create a new billing address during checkout without encountering an error. The checkout form now properly handles required tax identification details, preventing failed purchases and reducing support issues.
Original PR description
Steps to reproduce: - Install `l10n_ec_website_sale` - Change the company of the first website to 'EC Company' - Change company of demo user to 'EC Company' - Connect as demo - Make a purchase -…
Steps to reproduce: - Install `l10n_ec_website_sale` - Change the company of the first website to 'EC Company' - Change company of demo user to 'EC Company' - Connect as demo - Make a purchase - Checkout and fill the address - Create a new billing address Issues: A traceback appears, the reason is that `show_vat` is false here as we are editing a new billing address as such `partner_sudo != order_sudo.partner_id`. https://github.com/odoo/odoo/blob/4c025f91d4a13c9a150c4c16ac9754da0b2c79e4/addons/website_sale/controllers/main.py#L1159-L1168 Since `show_vat` is False the VAT fields will not be shown. https://github.com/odoo/odoo/blob/d61a8212ca795009ca4f39462991614a42e41700/addons/website_sale/views/templates.xml#L1990 However for ecuadorian company for example `vat` and `l10n_latam_identification_type_id` is set as mandatory. https://github.com/odoo/odoo/blob/4c025f91d4a13c9a150c4c16ac9754da0b2c79e4/addons/l10n_ec_website_sale/controllers/main.py#L17-L18 This discrepancy causes a traceback later on as we are requiring a field which is not visible in the view. https://github.com/odoo/odoo/blob/d61a8212ca795009ca4f39462991614a42e41700/addons/website_sale/static/src/js/address.js#L127-L135 opw-4139919