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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
967274c8
Commit
967274c8
authored
Mar 24, 2023
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_computer_immobilisation: Only add api_revision to Computer JSON when defined
parent
7b539437
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
28 deletions
+13
-28
bt5/erp5_computer_immobilisation/DocumentTemplateItem/portal_components/document.erp5.Computer.py
...tTemplateItem/portal_components/document.erp5.Computer.py
+10
-4
bt5/erp5_computer_immobilisation/DocumentTemplateItem/portal_components/document.erp5.Computer.xml
...TemplateItem/portal_components/document.erp5.Computer.xml
+3
-24
No files found.
bt5/erp5_computer_immobilisation/DocumentTemplateItem/portal_components/document.erp5.Computer.py
View file @
967274c8
...
...
@@ -61,6 +61,9 @@ class Computer(Machine, JSONType):
,
PropertySheet
.
JSONTypeConstraint
)
def
useRevision
(
self
):
return
getattr
(
self
,
"use_jio_api_revision"
,
False
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'asJSONText'
)
def
asJSONText
(
self
):
...
...
@@ -77,10 +80,13 @@ class Computer(Machine, JSONType):
"title"
:
self
.
getTitle
().
decode
(
"UTF-8"
),
"compute_partition_list"
:
[],
}
if
self
.
useRevision
():
web_section
=
self
.
getWebSectionValue
()
web_section
=
web_section
.
getRelativeUrl
()
if
web_section
else
self
.
REQUEST
.
get
(
"web_section_relative_url"
,
None
)
if
web_section
:
compute_node_dict
[
"api_revision"
]
=
self
.
getJIOAPIRevision
(
web_section
)
revision
=
self
.
getJIOAPIRevision
(
web_section
)
if
revision
:
compute_node_dict
[
"api_revision"
]
=
revision
compute_partition_list
=
self
.
contentValues
(
portal_type
=
"Compute Partition"
,
checked_permission
=
"View"
...
...
bt5/erp5_computer_immobilisation/DocumentTemplateItem/portal_components/document.erp5.Computer.xml
View file @
967274c8
...
...
@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Computer
</string>
</value>
...
...
@@ -59,28 +53,13 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -93,7 +72,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -102,7 +81,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</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