From 5b67cc30f5d27b2551bd70f08d0c8bb3c98b5cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Mon, 10 Oct 2022 15:04:05 +0200 Subject: [PATCH] [IMP] rma_sale_mrp: black, isort, prettier --- rma_sale_mrp/models/sale_order.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rma_sale_mrp/models/sale_order.py b/rma_sale_mrp/models/sale_order.py index ff138568..418ac096 100644 --- a/rma_sale_mrp/models/sale_order.py +++ b/rma_sale_mrp/models/sale_order.py @@ -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,