How to achieve like Naming series auto-generate for my custom field? is there any method available to generate auto-incremented series like naming series
Hi thanks for the reply, i tried out this method and binded it in the uid field but it did not show the prefix on the field
def before_save(self):
if not self.uid:
year = nowdate().split(“-”)[0]
prefix = f"SAH-BAPs-{year}-"
self.uid = getseries(prefix,6)
In UI it shows like 000001 but I need it like SAH-BAP-2024-00001