Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
a4cc5d09
Commit
a4cc5d09
authored
Apr 12, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: update getObjectByOid
parent
9b7b9a78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
35 deletions
+24
-35
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.py
...TemplateItem/portal_components/extension.erp5.test_kaz.py
+21
-11
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.xml
...emplateItem/portal_components/extension.erp5.test_kaz.xml
+3
-24
No files found.
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.py
View file @
a4cc5d09
def
getObjectByOid
(
self
):
#XXXYYY
# ConflictError: database conflict error (oid 0x174c174d, class BTrees.OIBTree.OIBucket, serial this txn started with 0x03f7c3f85883f5bb 2024-04-08 14:48:20.745813, serial currently committed 0x03f7c3f95ce66c66 2024-04-08 14:49:21.773459)
def
getObjectByOid
(
self
,
oid
):
#XXXYYY
oid
=
0x174c174d
ob
=
self
.
_p_jar
[
oid
]
oid
=
0x154aaf61
#return ob
oid
=
0x174c283a
result
=
[
ob
.
__class__
,]
oid
=
0x174ac365
n
=
1
oid
=
0x11599980
for
k
,
v
in
ob
.
iteritems
():
oid
=
0x0f29c33d
result
.
append
((
k
,
k
.
__class__
,
v
,
v
.
__class__
))
oid
=
0x17501c78
n
+=
1
oid
=
0x17509394
if
n
>
100
:
oid
=
0x050ae6c4
break
oid
=
0x589a
return
result
oid
=
0x1770c10c
\ No newline at end of file
oid
=
0x1775c212
from
ZODB.utils
import
p64
oid
=
p64
(
int
(
str
(
oid
),
0
))
ob
=
self
.
_p_jar
.
get
(
oid
)
# ob = self._p_jar[oid]
if
1
:
return
ob
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.xml
View file @
a4cc5d09
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
test_kaz
</string>
</value>
<value>
<string>
test_kaz
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment