Łukasz Nowak
2007-09-24 13:01:09 UTC
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
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.
Regards,
Luke
[1] http://docs.neuroinf.de/programming-plone/debug
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):r = portal.product_module['1']
r.setTitle('Testing...1...2...3')
get_transaction().commit()
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.
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...zope = zope.__of__(app.acl_users)
from AccessControl.SecurityManagement import newSecurityManager
newSecurityManager(None, zope)
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...''
?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...''