Wednesday, November 13, 2024
2 changes · saas-17.2
Resolved issues and error corrections
Customers who choose a non-default subscription plan on an online product page will now see that exact plan added to their cart. This prevents checkout mistakes and ensures the subscription option selected by the customer is honored.
Original PR description
Steps to reproduce: - Create a subscription product with two or more plans - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart Current behavior before PR: After this change https://github.com/odoo/enterprise/pull/71347/commits/a847237eaf91df641d6af6c7122a1e7216621f9a there is a div got added before the tag of the select dropdown menu. So when we are getting the value of the plan_id selected https://github.com/odoo/enterprise/blob/18.0/website_sale_subscription/static/src/js/website_sale_subscription.js#L14 we don't find any element with this path. Desired behavior after PR is merged: We are changing the path that we get the value of the selected plan out of so we can make sure it is getting the right element which will get the right value accordingly. opw-4296527
Duplicating several Point of Sale payment methods at once no longer causes an error. This helps store administrators manage payment setup more reliably without interruptions.
Original PR description
Currently, a traceback occurs when the user tries to duplicate multiple pos payment methods. To reproduce this issue: 1) Install Point of Sale 2) Try to duplicate multiple payment methods from the POS configuration Error:- ``` ValueError: Expected singleton: account.journal(14, 18) ``` This is because of the changes from the recent commit https://github.com/odoo/odoo/pull/175530/commits/0fbd47bdd2fe06feda7df747e8560b810a666386 In `copy` method, when multiple records are duplicated it executed the method at multiple times. so `self` should have a single record at a time. From the `saas-17.2`, the `copy` method changes to `copy_data`, So it is executed at a time when the `self` having multiple recordsets. This leads to a traceback as `self.journal_id.type` is used. https://github.com/odoo/odoo/blob/88604332ae37d75c1435a298319a378841abf25a/addons/point_of_sale/models/pos_payment_method.py#L166-L168 sentry-5790593911