akretion/odoo-shopinvader

View on GitHub
product_stock_state/models/product_product.py

Summary

Maintainability
A
25 mins
Test Coverage

Showing 1 of 1 total issue

Function _compute_stock_state has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def _compute_stock_state(self):
for product in self:
if product.qty_available >= product._get_stock_state_threshold():
product.stock_state = "in_stock"
elif product.qty_available > 0:
Severity: Minor
Found in product_stock_state/models/product_product.py - About 25 mins to fix
Category
Status