Create a folder in Plone and set uid

153 views Asked by At

I have a Plone project which I need to fork; sadly, the UID of the temp folder (for Archetypes objects) is used in the code (as a module level variable, at least, not as strings all over the source tree).

When starting with a fresh ZODB - can I create the temp folder and set the UID? Or should I simply change that constant in the new development branch?

1

There are 1 answers

0
Mathias On BEST ANSWER

You can set the uid for an AT object by...

obj._setUID(uid)

The _setUID method is defined in Products.Archetypes.Referencable Module

For more information you can also check the plone.app.transmogrifier uidupdater section.