Commit aba5532b authored by Patrick's avatar Patrick

For a producer who manage his production or which give the available quantity...

For a producer who manage his production or which give the available quantity during pre-opening, then switch if product is into offer following the available stock
parent c85c5112
...@@ -271,7 +271,7 @@ def product_pre_save(sender, **kwargs): ...@@ -271,7 +271,7 @@ def product_pre_save(sender, **kwargs):
if producer.producer_pre_opening or producer.manage_production: if producer.producer_pre_opening or producer.manage_production:
product.producer_order_by_quantity = DECIMAL_ZERO product.producer_order_by_quantity = DECIMAL_ZERO
product.limit_order_quantity_to_stock = True product.limit_order_quantity_to_stock = True
if not product.is_box and product.is_into_offer: if not product.is_box:
# IMPORTANT : Deactivate offeritem whose stock is not > 0 and product is into offer # IMPORTANT : Deactivate offeritem whose stock is not > 0 and product is into offer
product.is_into_offer = product.stock > DECIMAL_ZERO product.is_into_offer = product.stock > DECIMAL_ZERO
elif not producer.manage_replenishment: elif not producer.manage_replenishment:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment