[IMP] rma_sale_mrp: black, isort, prettier

This commit is contained in:
Víctor Martínez
2022-10-10 15:04:05 +02:00
committed by Pedro M. Baeza
parent 2cb2c73c74
commit 5b67cc30f5

View File

@@ -38,14 +38,11 @@ class SaleOrder(models.Model):
component_index = data_list.index(first_component_dict)
# Prevent miscalculation if there partial deliveries
quantity = sum(
[
x.get("quantity", 0)
for x in data_list
if x.get("sale_line_id")
and x.get("product") == first_component_dict.get("product")
and x.get("sale_line_id")
== first_component_dict.get("sale_line_id")
]
x.get("quantity", 0)
for x in data_list
if x.get("sale_line_id")
and x.get("product") == first_component_dict.get("product")
and x.get("sale_line_id") == first_component_dict.get("sale_line_id")
)
data_list.insert(
component_index,