I am transferring content from Archetypes to Dexterity, and I need new elements for the same UID as the old ones.
In Archetypes elements, I can call context._setUID ('my-uid'). Is there something similar for Dexterity?
For UUID Dexterity values, the plone.uuid package is used . plone.uuid just stores the value in the attribute.
plone.uuid
It is enough to set a predefined UUID for an existing obj agility object:
obj
from plone.uuid.interfaces import ATTRIBUTE_NAME setattr(obj, ATTRIBUTE_NAME, uuid)