[FIX]delivery_ups: section in SO

When there is a sale_order_line that has either no product_id nor
product_uom nor product_uom_qty (typically a section line),
the computing of the product_qty used in delivery return 0 for each
line below that sale_order_line.

OPW-2034915

Steps:
Create a SO
Add some lines
One should be a section (not the last line)
Save

Check product_qty on each line. The lines after the section will
have a product_qty = O

closes odoo/odoo#35010

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
jev-odoo
2019-07-19 11:14:14 +00:00
parent c492cecfc0
commit 20eca78cb9
+1 -1
View File
@@ -140,7 +140,7 @@ class SaleOrderLine(models.Model):
def _compute_product_qty(self):
for line in self:
if not line.product_id or not line.product_uom or not line.product_uom_qty:
return 0.0
continue
line.product_qty = line.product_uom._compute_quantity(line.product_uom_qty, line.product_id.uom_id)
def _is_delivery(self):