Skip to content

Commit

Permalink
[ADD] product_internal_reference_generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Nov 3, 2023
1 parent 98c64c1 commit 24c8132
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def test_all(self):
line.attribute_id = self.attr1
line.value_ids.add(self.val1)
line.value_ids.add(self.val2)
line.save()
pt_car.save()
self.pt_car.btn_generate_sequence()
df1 = str(self.pt_seq.sequence_id.number_next_actual - 1) + "001"
Expand All @@ -52,11 +51,13 @@ def test_all(self):
line.attribute_id = self.attr2
line.value_ids.add(self.val3)
line.value_ids.add(self.val4)
line.save()
self.assertIn(df1, self.pt_car.product_variant_ids[0].default_code)
self.assertIn(df2, self.pt_car.product_variant_ids[1].default_code)
pt_car.save()
df3 = str(self.pt_seq.sequence_id.number_next_actual - 1) + "003"
self.assertIn(df3, self.pt_car.product_variant_ids[2].default_code)
self.assertIn(df3, self.pt_car.product_variant_ids[0].default_code)
df4 = str(self.pt_seq.sequence_id.number_next_actual - 1) + "004"
self.assertIn(df4, self.pt_car.product_variant_ids[3].default_code)
self.assertIn(df4, self.pt_car.product_variant_ids[1].default_code)
df5 = str(self.pt_seq.sequence_id.number_next_actual - 1) + "005"
self.assertIn(df5, self.pt_car.product_variant_ids[2].default_code)
df6 = str(self.pt_seq.sequence_id.number_next_actual - 1) + "006"
self.assertIn(df6, self.pt_car.product_variant_ids[3].default_code)
self.assertFalse(self.pt_plane.get_variant_next_default_code())

0 comments on commit 24c8132

Please sign in to comment.