diff --git a/frappe/model/naming.py b/frappe/model/naming.py index ab21fe0156..7dabb3d80d 100644 --- a/frappe/model/naming.py +++ b/frappe/model/naming.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE +import base64 import datetime import re import struct @@ -264,15 +265,36 @@ def make_autoname(key="", doctype="", doc="", *, ignore_validate=False): DE/09/01/00001 where 09 is the year, 01 is the month and 00001 is the series """ if key == "hash": - # Makeshift "ULID": first 4 chars are based on timestamp, other 8 are random - ts = hex(struct.unpack("