mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] delivery_hibou: multi-rating orders insurance
This commit is contained in:
@@ -20,7 +20,7 @@ class DeliveryCarrier(models.Model):
|
||||
value = 0.0
|
||||
if order:
|
||||
if order.order_line:
|
||||
value = sum(order.order_line.filtered(lambda l: l.type != 'service').mapped('price_subtotal'))
|
||||
value = sum(order.order_line.filtered(lambda l: l.product_id.type != 'service').mapped('price_subtotal'))
|
||||
else:
|
||||
return value
|
||||
if picking:
|
||||
@@ -203,9 +203,9 @@ class DeliveryCarrier(models.Model):
|
||||
|
||||
res = []
|
||||
for carrier in self:
|
||||
carrier_packages = packages.filtered(lambda p: not p.carrier_tracking_ref and
|
||||
(not p.carrier_id or p.carrier_id == carrier) and
|
||||
p.packaging_id.package_carrier_type in (False, '', 'none', carrier.delivery_type))
|
||||
carrier_packages = packages and packages.filtered(lambda p: not p.carrier_tracking_ref and
|
||||
(not p.carrier_id or p.carrier_id == carrier) and
|
||||
p.packaging_id.package_carrier_type in (False, '', 'none', carrier.delivery_type))
|
||||
if packages and not carrier_packages:
|
||||
continue
|
||||
if hasattr(carrier, '%s_rate_shipment_multi' % self.delivery_type):
|
||||
|
||||
Reference in New Issue
Block a user