[FIX] delivery : removed service from rule-based delivery quantity
Current behaviour : Product of type service are accounted for when computing the quantity, weight and volume metrics used in the price computation of rule based delivery. Planned behaviour : Service-typed product should be excluded from such computations. opw-2647067 closes odoo/odoo#78402 X-original-commit: 2993c82db51e16787de72cbb67f04d5ae1928b68 Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This commit is contained in:
@@ -82,6 +82,8 @@ class ProviderGrid(models.Model):
|
||||
total_delivery += line.price_total
|
||||
if not line.product_id or line.is_delivery:
|
||||
continue
|
||||
if line.product_id.type == "service":
|
||||
continue
|
||||
qty = line.product_uom._compute_quantity(line.product_uom_qty, line.product_id.uom_id)
|
||||
weight += (line.product_id.weight or 0.0) * qty
|
||||
volume += (line.product_id.volume or 0.0) * qty
|
||||
|
||||
Reference in New Issue
Block a user