[Erp5-dev] Modifying ZODB from zopectl debug - is it possible?
Łukasz Nowak
lukasz.nowak at ventis.com.pl
Mon Sep 24 15:01:09 CEST 2007
Hello,
I need to do some conversion on data in my zodb. I've found on plone
debugging page[1] that using get_transaction().commit() it will be
possible to save changes into ZODB.
That is my session:
zopectl> debug
>>> portal = app.erp5
>>> r = portal.product_module['1']
>>> r.setTitle('Testing...1...2...3')
>>> get_transaction().commit()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/home/shufla/work/erp5instance/Products/ERP5Type/patches/Transaction.py",
line 89, in commit
self._commit_prepare(jars, subjars, subtransaction)
File
"/home/shufla/work/erp5instance/Products/ERP5Type/patches/Transaction.py",
line 169, in _commit_prepare
tpc_prepare(self)
File
"/home/shufla/work/erp5instance/Products/CMFActivity/ActivityBuffer.py",
line 165, in tpc_prepare
activity.prepareQueueMessageList(self._activity_tool, message_list)
File
"/home/shufla/work/erp5instance/Products/CMFActivity/Activity/SQLDict.py",
line 98, in prepareQueueMessageList
activity_tool.SQLDict_writeMessageList( uid_list = uid_list,
AttributeError: SQLDict_writeMessageList
Hm. Unfortunately my knowledge about Zope integrals patched by ERP5 is
not enough to even *understand* why not.
So that's my question - is it possible and how to make some changes in
zopectl debugger? If not this way, how may I do it? I was looking for
some documentation about it, but nothing appropriate was found.
NB giving me special rights with:
>>> zope = app.acl_users.getUserById('zope')
>>> zope = zope.__of__(app.acl_users)
>>> from AccessControl.SecurityManagement import newSecurityManager
>>> newSecurityManager(None, zope)
where 'zope' if 'superuser' with all roles do not change anything...
Regards,
Luke
[1] http://docs.neuroinf.de/programming-plone/debug
--
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
More information about the Erp5-dev
mailing list