Add code to template as variant prefix
Following https://discuss.tryton.org/t/sql-query-to-compute-sku-for-template/2352
Having a code on template is useful to get a SKU for web shop that display variant as a single product (see #9010 (closed)).
My proposal is to add a prefix_code on template and a suffix_code on variant and to keep up to date the field code with the concatenation of both codes.
This design allow to have both codes stored in the database in the proper table which can have an index for searching.
Another option would have been to use a Function field that concatenate both codes but this means that we need to join the both table when doing a search which may not be very efficient with a lot of variants.