[FIX] delivery: fix delivery price in catalog controller

Part-of: odoo/odoo#135811
This commit is contained in:
Valentin Vallaeys (vava)
2023-09-28 18:20:19 +00:00
parent 3389bbafad
commit 24f295b988
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -1,4 +1,5 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import controllers
from . import models
from . import wizard
+5 -3
View File
@@ -1,10 +1,12 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.http import request, Controller
from odoo.http import request, route
from odoo.addons.sale.controllers.catalog import CatalogController
class CatalogController(Controller):
class CatalogControllerDelivery(CatalogController):
@route()
def sale_product_catalog_update_sale_order_line_info(self, order_id, product_id, quantity):
""" Override of `sale` to recompute the delivery prices.
@@ -15,7 +17,7 @@ class CatalogController(Controller):
the quantity selected.
:rtype: float
"""
price_unit = super.sale_product_catalog_update_sale_order_line_info(
price_unit = super().sale_product_catalog_update_sale_order_line_info(
order_id, product_id, quantity
)
order = request.env['sale.order'].browse(order_id)