From 62a54d655f4d658b6f99fc31bd55baabcd3e4668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 30 Oct 2025 10:23:35 +0100 Subject: [PATCH] Set shipment cost method to order for sale from web shop Closes #14336 --- modules/web_shop/tryton.cfg | 5 +++++ modules/web_shop/web.py | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/modules/web_shop/tryton.cfg b/modules/web_shop/tryton.cfg index b07177bca2..c561aff1be 100644 --- a/modules/web_shop/tryton.cfg +++ b/modules/web_shop/tryton.cfg @@ -15,6 +15,7 @@ extras_depend: product_attribute product_image sale_price_list + sale_shipment_cost xml: web.xml product.xml @@ -52,3 +53,7 @@ model: [register sale_price_list] model: web.Shop_PriceList + +[register sale_shipment_cost] +model: + web.Shop_ShipmentCost diff --git a/modules/web_shop/web.py b/modules/web_shop/web.py index ef11d98cff..71ada0694f 100644 --- a/modules/web_shop/web.py +++ b/modules/web_shop/web.py @@ -301,6 +301,15 @@ class Shop_PriceList(metaclass=PoolMeta): return sale +class Shop_ShipmentCost(metaclass=PoolMeta): + __name__ = 'web.shop' + + def get_sale(self, party=None): + sale = super().get_sale(party=party) + sale.shipment_cost_method = 'order' + return sale + + class Shop_TaxRuleCountry(metaclass=PoolMeta): __name__ = 'web.shop'