[IMP] 7.0 version of module stock_obsolete

This is a port of the 6.0 module "stock_obsolete", for 7.0.
Not needed to use \ you can write your condition adding parenthesis