Master wmsstaging3 jco

Depends also on wmsstaging2.  See commits.  
i'd prefer if you enclose pack_op.id into [], because i'm not sure that each time write() is overwritten we take into consideration that an int can be given...