Use a reference mask to control the output of variant default code

Instead of hard coding the default code sequence for variant, with this enhancement user can set up a reference mask to make the default code of product variant adapted to his need.

A default reference mask will also be generated automatically.