[15.0][IMP] stock_available_mrp: black, isort, prettier

This commit is contained in:
Joan Mateu Jordi
2022-01-27 08:47:09 +01:00
parent d009419226
commit 1ccd472539
3 changed files with 9 additions and 5 deletions

View File

@@ -0,0 +1 @@
../../../../stock_available_mrp

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -61,11 +61,8 @@ class ProductProduct(models.Model):
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