How to configure Product/Variant Sequence

Hi all, despite searching the manual and forum I’m still lost understanding how to configure the Product and Variant sequences other than to create simple integer sequences.

My goal is to create a 7 digit integer sequence for the product code with a hyphen in the middle for easy short-term memory, starting with 100-0001 and incrementing sequentially (i.e. 100-0002, 100-0003, … 100-9999, 101-1000, 101-1001, 101-1002…). The variant sequence will be a simple 2-digit sequential series incrementing by 1 with a hyphen prefix (e.g. variant code 100-0001-01).

Can someone direct me to any documentation I’m missing or give guidance for creating the product sequence?

Thanks,
Dale

Make sure that you are treating Product and Variant sequences as two separate sequences.

Create a product sequence as follows:
Prefix: '100-' (Do note that this is a string, not a number)
Suffix: '-'
Next Number: 1000

This will create the product number: 100-1001-

Then you must create a Variant Sequence as follows:
Number padding: 2

Using the above information the following product+variant number was created:
100-1000-01

As stated above: The Product code is composed of template_code+variant_code.

The sequence can not be configured for that in standard.
But you can extend the product/template with a function field that format the code as you want.
Or extend the sequence to format it directly as its output. I could imagine that such formatting option could become standard as formatting pattern.

I do not think @dalers wants to have a fixed prefix. He want the sequence to start at 1000001.

1 Like

Thank you @dotbit and @ced for your reply. I saw in the Tryton Release 7.0 announcement that the current date could be used as a code suffix or prefix, and hoped the sequence field might support using an f-string to define the format of an incremented variable (similar concept to a formatted date).

Thank you also @ced for direction on how my goal could be performed. Alas, this is beyond my current skills but I can make do without a hyphen for now.

Fwiw, I am following the general recommendations of a PLM-specific part and BOM management software called PDXpert.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.