| Total Complexity | 1 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 2 | # |
||
| 3 | # This file is part of SENAITE.CORE |
||
| 4 | # |
||
| 5 | # Copyright 2018 by it's authors. |
||
| 6 | |||
| 7 | from bika.lims.idserver import renameAfterCreation |
||
| 8 | from bika.lims import logger |
||
| 9 | |||
| 10 | |||
| 11 | def auto_generate_id(obj, event): |
||
| 12 | """Generate ID with the IDServer from senaite.core |
||
| 13 | """ |
||
| 14 | logger.info("Auto-Generate ID for {}".format(repr(obj))) |
||
| 15 | renameAfterCreation(obj) |
||
| 16 |