product_stock_state/models/product_product.py
Showing 1 of 1 total issue
Function _compute_stock_state
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
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:
- Read upRead up