# Use sequence to set template code

**URL:** <https://discuss.tryton.org/t/use-sequence-to-set-template-code/3085>\
**Category:** Ideas\
**Created:** [July 30, 2020, 11:02am UTC](https://discuss.tryton.org/t/use-sequence-to-set-template-code/3085 "2020-07-30T11:02:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [July 30, 2020, 11:02am UTC](https://discuss.tryton.org/t/use-sequence-to-set-template-code/3085/1 "2020-07-30T11:02:44Z")

</div>

[We added the option to set the product code by a sequence](https://bugs.tryton.org/issue8545) and latter [we added a code to template](https://bugs.tryton.org/issue9080) as suffix of template.

I’m wondering if it will make sense to set the code on the template?  
This will be more intuitive as all the variants of the same template will have the same suffix and also when using a single variant the code will be set on both template and product.

Toughts?

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 30, 2020, 5:10pm UTC](https://discuss.tryton.org/t/use-sequence-to-set-template-code/3085/2 "2020-07-30T17:10:52Z")

</div>

I think the best option would be to allow to configure two sequences one for the template and one for the product.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [July 30, 2020, 6:50pm UTC](https://discuss.tryton.org/t/use-sequence-to-set-template-code/3085/3 "2020-07-30T18:50:46Z")

</div>

Makes sense for me!

I’ve filled [Add sequence for template code (#9512) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue9512) which implments it.
