diff --git a/product_internal_reference_generator/models/product_template.py b/product_internal_reference_generator/models/product_template.py index 9101e98ad..ca32023e7 100644 --- a/product_internal_reference_generator/models/product_template.py +++ b/product_internal_reference_generator/models/product_template.py @@ -18,8 +18,9 @@ def onchange_int_ref_template_id(self): def btn_generate_sequence(self): self.ensure_one() - self.variants_prefix = self.int_ref_template_id.sequence_id.get_next_char(0) + # self.variants_prefix = self.int_ref_template_id.sequence_id.get_next_char(0) int_ref_next_val = self.int_ref_template_id.sequence_id.next_by_id() + self.variants_prefix = int_ref_next_val var_seq = self.env["ir.sequence"].create( { "name": "variants " + int_ref_next_val, diff --git a/product_internal_reference_generator/views/product.xml b/product_internal_reference_generator/views/product.xml index 520f213d7..766f6bb60 100644 --- a/product_internal_reference_generator/views/product.xml +++ b/product_internal_reference_generator/views/product.xml @@ -9,6 +9,7 @@ for="int_ref_template_id" class="o_form_label" attrs="{'invisible': [('variants_prefix', '!=', False)]}" + string="Int. Ref. Template" />