Now villagers never out of stock! Don't waste your time. If you using easy villagers, you have to place villager outside, because seems like it uses own logic instead of vanila one - so it would not work.
EDIT: Seems like it still works even in currently open window, you need to refresh selling slot so it would accept trade again. So visually it shows that trade is unavailable, but in practice it always tradable.
How it works? Buy all items villager can provide, exit trading window. Ask villager for a trade again, now it has supplies without annoying 10 minute countdown! Checks 12000-ticks (i.e 10 minutes of real time). Or next day (sleeping), default villager has 2 restocks per day with 2400-tick between.
This mod WILL NOT BE UPDATED IN THE LATER MC VERSIONS!