8bb95f12d74474da5df3dbeac3085a421008d292
carrier_id during GET method
Steps to reproduce: ------------------- - create a cart; - select an other shipping method than the default; - apply a coupon code; Issue: ------ The shipping method is modified. Cause: ------ In the `_check_carrier_quotation`, we try to update the carrier id with the partner's preferred carrier. This behavior can be changed using `force_carrier_id` and `keep_carrier` params. When we call this route with a `GET` method, these parameters don't exist. We will update the `carrier_id` according to: ```py if not force_carrier_id and self.partner_shipping_id.property_delivery_carrier_id and not keep_carrier: force_carrier_id = self.partner_shipping_id.property_delivery_carrier_id.id ``` This will have the effect of modifying the `carrier_id` that we have previously modified. Solution: --------- Perform this logic only during a `POST` method. When we call the route with a `GET` method, we only want the information, without modifying it. opw-3457243 closes odoo/odoo#133819 X-original-commit: 94ed203404b3b2121122697f5ebfe09cc21e3630 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%