Skip to content

Commit

Permalink
[15.0][IMP] stock_available_mrp: black, isort, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanMForgeFlow committed Jan 27, 2022
1 parent d009419 commit 1ccd472
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions setup/stock_available_mrp/odoo/addons/stock_available_mrp
6 changes: 6 additions & 0 deletions setup/stock_available_mrp/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
7 changes: 2 additions & 5 deletions stock_available_mrp/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ccd472

Please sign in to comment.