From 1ccd472539796ebdffc6865b00f2c5bd983ea6f1 Mon Sep 17 00:00:00 2001 From: Joan Mateu Jordi Date: Thu, 27 Jan 2022 08:47:09 +0100 Subject: [PATCH] [15.0][IMP] stock_available_mrp: black, isort, prettier --- setup/stock_available_mrp/odoo/addons/stock_available_mrp | 1 + setup/stock_available_mrp/setup.py | 6 ++++++ stock_available_mrp/models/product_product.py | 7 ++----- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 120000 setup/stock_available_mrp/odoo/addons/stock_available_mrp create mode 100644 setup/stock_available_mrp/setup.py diff --git a/setup/stock_available_mrp/odoo/addons/stock_available_mrp b/setup/stock_available_mrp/odoo/addons/stock_available_mrp new file mode 120000 index 000000000000..cd15a8caeba7 --- /dev/null +++ b/setup/stock_available_mrp/odoo/addons/stock_available_mrp @@ -0,0 +1 @@ +../../../../stock_available_mrp \ No newline at end of file diff --git a/setup/stock_available_mrp/setup.py b/setup/stock_available_mrp/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/stock_available_mrp/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_available_mrp/models/product_product.py b/stock_available_mrp/models/product_product.py index e6ee21ede00b..356fb6e2611e 100644 --- a/stock_available_mrp/models/product_product.py +++ b/stock_available_mrp/models/product_product.py @@ -61,11 +61,8 @@ def _compute_available_quantities_dict(self): else: # Find the lowest quantity we can make with the stock at hand components_potential_qty = min( - [ - component_qties[component.id][stock_available_mrp_based_on] - / need - for component, need in component_needs.items() - ] + component_qties[component.id][stock_available_mrp_based_on] / need + for component, need in component_needs.items() ) potential_qty = bom_id.product_qty * components_potential_qty potential_qty = potential_qty > 0.0 and potential_qty or 0.0