The attributes doesn't work when product is viewed outside the template

Use a Function field to always get the attribute_set.

issue4209
review12581002