8.0 port module stock_reserve

Is the assertion necessary with the new api?
Also, if `self._ids` is a tuple, it will fail the string substitution so it should be put in a tuple (I don't know what `self._ids` is supposed to be so do not take my remark into account if it is irrelevant).