处理 坯料的制造订单生成的批次序列号不对 的bug
This commit is contained in:
@@ -424,6 +424,8 @@ class ProductionLot(models.Model):
|
|||||||
"""Generate `lot_names` from a string."""
|
"""Generate `lot_names` from a string."""
|
||||||
if first_lot.__contains__(display_name):
|
if first_lot.__contains__(display_name):
|
||||||
first_lot = first_lot[(len(display_name) + 1):]
|
first_lot = first_lot[(len(display_name) + 1):]
|
||||||
|
else:
|
||||||
|
first_lot = first_lot[-3:]
|
||||||
|
|
||||||
# We look if the first lot contains at least one digit.
|
# We look if the first lot contains at least one digit.
|
||||||
caught_initial_number = regex_findall(r"\d+", first_lot)
|
caught_initial_number = regex_findall(r"\d+", first_lot)
|
||||||
|
|||||||
Reference in New Issue
Block a user