Commit d532f92d authored by Aurel's avatar Aurel

revert as TransactionalVariable can not be imported here

parent a0b304a3
...@@ -53,18 +53,16 @@ ...@@ -53,18 +53,16 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
# First retrieve the document\n # First retrieve the document\n
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable\n portal = context.getPortalObject()\n
tv = getTransactionalVariable()\n document_list = portal.document_module.searchFolder(\n
key = "%s-%s" % (context.getPath(), reference)\n reference=reference,\n
try:\n validation_state="shared",\n
document = tv[key]\n sort_on=[(\'version\', \'DESC\')],\n
except KeyError:\n )\n
document_list = portal.document_module.searchFolder(reference=reference, validation_state="shared",\n if len(document_list) != 1:\n
sort_on=[(\'version\', \'DESC\')])\n raise ValueError, "Impossible to find document with reference %s" %(reference)\n
if len(document_list) != 1:\n document = document_list[0].getObject()\n
raise ValueError, "Impossible to find document with reference %s" %(reference)\n \n
else:\n
tv[key] = document = document_list[0].getObject()\n
\n \n
# Then parse it\n # Then parse it\n
from Products.ERP5OOo.OOoUtils import OOoParser\n from Products.ERP5OOo.OOoUtils import OOoParser\n
......
3 4
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment