[FIX] product: add store=dict to field name_template

Recompute the name_template field if the template changes.

backport of 41628fc + f25c5d8 to 7.0 plus some optimisations in triggers
Fixes #3277
Merge branch '7.0' of https://github.com/odoo/odoo into 7.0-win32