Hello,
In sale.order.line I have a set a warning message. It pop-ups when the stock level is less than the requested quantity of product in the sale order. The message works perfectly. But the problem is even if the user is warnned that there is not enough stock the order can be confirmed. This should not happen.the order must not get confirmed. How can I do this? Someone please help.
this is my warning message code: It is written in def product_id_change
if (qty > product_obj.available_qty):
warn_msg = _('You requested %.2f.The available stock is %.2f !') %(qty,product_obj.available_qty)
warning_msgs += _("Not enough stock ! : ") + warn_msg +"\n\n"