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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
985a690b
Commit
985a690b
authored
Jul 02, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core]: Add Diff Tool view to Diff between multiple objects
parent
88877845
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1433 additions
and
28 deletions
+1433
-28
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Diff%20Tool/view.xml
...core/ActionTemplateItem/portal_types/Diff%20Tool/view.xml
+4
-4
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/diff_multiple_object_action.xml
...rtal_types/portal_actions/diff_multiple_object_action.xml
+86
-0
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/diff_object_action.xml
...teItem/portal_types/portal_actions/diff_object_action.xml
+90
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.DiffTool.py
...tTemplateItem/portal_components/document.erp5.DiffTool.py
+5
-5
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
...skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
+5
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getDefaultRevisionDate.py
...tem/portal_skins/erp5_diff/Base_getDefaultRevisionDate.py
+22
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getDefaultRevisionDate.xml
...em/portal_skins/erp5_diff/Base_getDefaultRevisionDate.xml
+62
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
...lateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
+89
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.xml
...ateItem/portal_skins/erp5_diff/Base_getObjectDiffList.xml
+62
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectPathFromSelection.py
...portal_skins/erp5_diff/Base_getObjectPathFromSelection.py
+11
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectPathFromSelection.xml
...ortal_skins/erp5_diff/Base_getObjectPathFromSelection.xml
+62
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateItemList.py
...em/portal_skins/erp5_diff/Base_getRevisionDateItemList.py
+47
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateItemList.xml
...m/portal_skins/erp5_diff/Base_getRevisionDateItemList.xml
+62
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateList.xml
...eItem/portal_skins/erp5_diff/Base_getRevisionDateList.xml
+28
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionFromDate.xml
...eItem/portal_skins/erp5_diff/Base_getRevisionFromDate.xml
+28
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog.xml
...rtal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog.xml
+17
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox.xml
...ns/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox.xml
+151
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox_diff.xml
...p5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox_diff.xml
+165
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml
...diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml
+33
-8
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_path.xml
...diff/ERP5Site_viewDiffTwoObjectDialog/your_first_path.xml
+130
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
...iff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
+138
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_path.xml
...iff/ERP5Site_viewDiffTwoObjectDialog/your_second_path.xml
+130
-0
product/ERP5/tests/testERP5Core.py
product/ERP5/tests/testERP5Core.py
+4
-1
product/ERP5/tests/testXHTML.py
product/ERP5/tests/testXHTML.py
+2
-1
No files found.
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Diff%20Tool/view.xml
View file @
985a690b
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
<key>
<string>
categories
</string>
</key>
<key>
<string>
categories
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
action_type/object_
view
</string>
<string>
action_type/object_
action
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
category
</string>
</key>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_
view
</string>
</value>
<value>
<string>
object_
action
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
condition
</string>
</key>
<key>
<string>
condition
</string>
</key>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
<value>
<string>
View
Diff
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
visible
</string>
</key>
<key>
<string>
visible
</string>
</key>
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/
DiffTool_view
</string>
</value>
<value>
<string>
string:${object_url}/
ERP5Site_viewDiffTwoObjectDialog
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/diff_multiple_object_action.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
diff_multiple_object_action
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
106.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Diff Module Objects
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: object.absolute_url() + \'/ERP5Site_viewDiffTwoObjectDialog\'
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: object.getPortalType() in portal.getPortalModuleTypeList()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/portal_actions/diff_object_action.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
diff_object_action
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
105.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Diff Object
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
python: object.absolute_url() + \'/ERP5Site_viewDiffTwoObjectDialog?your_first_path=\' + str(object.getRelativeUrl())+\'&your_second_path=\' + str(object.getRelativeUrl())
]]>
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: object.getPortalType() not in portal.getPortalModuleTypeList()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.DiffTool.py
View file @
985a690b
...
@@ -206,11 +206,11 @@ class PortalPatch:
...
@@ -206,11 +206,11 @@ class PortalPatch:
security
.
declarePrivate
(
'removePropertyList'
)
security
.
declarePrivate
(
'removePropertyList'
)
def
removePropertyList
(
self
,
def
removePropertyList
(
self
,
obj
,
obj
,
export
,
export
,
property_list
=
None
,
property_list
=
None
,
keep_workflow_history
=
False
,
keep_workflow_history
=
False
,
keep_workflow_history_last_history_only
=
False
):
keep_workflow_history_last_history_only
=
False
):
"""
"""
This function removes un-necessary properties and attributes from the
This function removes un-necessary properties and attributes from the
object dict.
object dict.
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
View file @
985a690b
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<list>
<list>
<string>
columns
</string>
<string>
columns
</string>
<string>
count_method
</string>
<string>
count_method
</string>
<string>
lines
</string>
<string>
list_method
</string>
<string>
list_method
</string>
<string>
selection_name
</string>
<string>
selection_name
</string>
<string>
title
</string>
<string>
title
</string>
...
@@ -95,6 +96,10 @@
...
@@ -95,6 +96,10 @@
<key>
<string>
form_id
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<item>
<key>
<string>
list_method
</string>
</key>
<key>
<string>
list_method
</string>
</key>
<value>
<value>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getDefaultRevisionDate.py
0 → 100644
View file @
985a690b
"""
This script returns the default value for second_date field.
"""
portal
=
context
.
getPortalObject
()
request
=
context
.
REQUEST
history_size
=
portal
.
portal_preferences
.
getPreferredHtmlStyleZodbHistorySize
()
first_path
=
request
.
get
(
'your_first_path'
,
None
)
second_path
=
request
.
get
(
'your_second_path'
,
None
)
second_date
=
request
.
get
(
'your_second_date'
,
None
)
if
second_date
:
return
second_date
# In case both the paths are same, return the 2nd item from the date list.
# This is because its the case where we are trying to diff current and last
# revision of the same object.
elif
first_path
not
in
(
None
,
''
)
and
first_path
==
second_path
:
obj
=
portal
.
restrictedTraverse
(
first_path
)
date_list
=
obj
.
Base_getRevisionDateList
(
obj
,
size
=
history_size
)
return
str
(
date_list
[
1
])
return
second_date
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getDefaultRevisionDate.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getDefaultRevisionDate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.py
0 → 100644
View file @
985a690b
"""
Script that returns the list of diff of 2 historical states of ERP5 object(s).
This should is used as a 'list method' as it returns a list of temp base object
which have its properties as : `path` and `diff`.
"""
from
Products.ERP5Type.Document
import
newTempBase
portal
=
context
.
getPortalObject
()
portal_diff
=
portal
.
portal_diff
request
=
context
.
REQUEST
object_revision_list
=
[]
history_size
=
portal
.
portal_preferences
.
getPreferredHtmlStyleZodbHistorySize
()
# In case the request has been made via action on any ERP5 object, we get the
# paths as `your_<field_name>` as this is what use as field in dialog. Hence,
# its better to check for path in the request also.
if
first_path
is
None
:
first_path
=
request
.
get
(
'your_first_path'
,
None
)
if
second_path
is
None
:
second_path
=
request
.
get
(
'your_second_path'
,
None
)
# Case I: When we try to access the dialog directly from `portal_diff` or from
# selections in a module. If the paths are None, then return an empty list
# or try to get the paths from selection and then return the diff.
if
first_path
is
None
and
second_path
is
None
:
list_selection_name
=
request
.
get
(
'list_selection_name'
,
None
)
# In case the list_selection_name is there, it can be the case of selection
# from the module, hence we get the paths from the selection and use them to
# create diff.
if
list_selection_name
is
not
None
:
selected_obj_list
=
portal
.
portal_selections
.
getSelectionCheckedValueList
(
selection_name
=
list_selection_name
)
object_revision_list
.
extend
(
selected_obj_list
)
else
:
# Return an empty list here. This would be the case when we first access
# the dialog and then it try to get list of items to dipslay on the listbox
return
[]
# Case II: Get object revision from the date of the revisions.
# The default dates for revision are the 1st and 2nd
# revision dates.
if
first_date
not
in
(
None
,
''
):
first_obj
=
portal
.
restrictedTraverse
(
first_path
)
old_state_revision
=
context
.
Base_getRevisionFromDate
(
first_obj
,
first_date
)
object_revision_list
.
append
(
old_state_revision
)
if
second_date
not
in
(
None
,
''
):
second_obj
=
portal
.
restrictedTraverse
(
second_path
)
new_state_revision
=
context
.
Base_getRevisionFromDate
(
second_obj
,
second_date
)
object_revision_list
.
append
(
new_state_revision
)
# Case III: When the paths exist, but there is no revision given
# for the paths, we diff the current revision
if
first_path
!=
second_path
:
# Diff the current verison if both the paths are different
if
first_path
is
not
None
and
first_date
in
(
None
,
''
):
object_revision_list
.
append
(
portal
.
restrictedTraverse
(
first_path
))
if
second_path
is
not
None
and
second_date
in
(
None
,
''
):
object_revision_list
.
append
(
portal
.
restrictedTraverse
(
second_path
))
else
:
# If both the paths are same, diff between the current version
# and the last version(if it exists)
# Get the historical revisions for the object and check if there
# is more than one revision
obj
=
portal
.
restrictedTraverse
(
first_path
)
revision_date_list
=
obj
.
Base_getRevisionDateList
(
obj
,
size
=
history_size
)
if
len
(
revision_date_list
)
>
1
:
object_revision_list
.
append
(
obj
.
Base_getRevisionFromDate
(
obj
,
revision_date_list
[
1
]))
object_revision_list
.
append
(
obj
.
Base_getRevisionFromDate
(
obj
,
revision_date_list
[
0
]))
# Use DiffTool to get the diff between the 2 objects in object_revision_list List.
# These 2 objects can be revisions of same object, 2 different revisions of
# different objects or 2 current ERP5 object.
if
len
(
object_revision_list
)
>
1
:
# Using this last 2 Historical revision dicts, create a Diff
diff_list
=
portal_diff
.
diffPortalObject
(
object_revision_list
[
0
],
object_revision_list
[
1
]).
asBeautifiedJSONDiff
()
# Return a list of TempBase objects which can be displayed in a listbox
uid
=
1
tempbase_list
=
[]
for
diff_unit
in
diff_list
:
temp_obj
=
newTempBase
(
portal
,
diff_unit
[
'path'
],
**
diff_unit
)
temp_obj
.
setUid
(
uid
)
uid
=
uid
+
1
tempbase_list
.
append
(
temp_obj
)
return
tempbase_list
return
[]
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectDiffList.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
first_date=None, second_date=None, first_path=None, second_path=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getObjectDiffList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectPathFromSelection.py
0 → 100644
View file @
985a690b
portal
=
context
.
getPortalObject
()
# There would be multiple cases where this script will be called, but the only
# case where we use selections to get the diff. Hence, we check for the condition
# that list_selection_name is not None.
if
list_selection_name
is
not
None
:
# Get the selcted values for the web page selection
selected_obj_list
=
portal
.
portal_selections
.
getSelectionCheckedValueList
(
selection_name
=
list_selection_name
)
# Return the 1st object path from the selected_obj_list
return
selected_obj_list
[
selection_index
].
getRelativeUrl
()
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getObjectPathFromSelection.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
selection_index, list_selection_name=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getObjectPathFromSelection
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateItemList.py
0 → 100644
View file @
985a690b
"""
Script to get the list of dates for Historical Revisions for
any object inside ERP5. It is used in the 'items' field for Portal Diff
view for the list field regarding the Dates.
Params:
field_name - Name of the the field which gives us the path
selection_index - Index of the object we want to get from the selection list
in case we don't have any path from field
"""
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
request
=
context
.
REQUEST
date_list
=
[]
history_size
=
portal
.
portal_preferences
.
getPreferredHtmlStyleZodbHistorySize
()
# This will be the case when we try to refresh/update the diff, in
# that case we will be getting the second_object_path from the request.
# When we refresh or update the diff, we try to access the value for this field
# in the list method before validation, hence we need it to get it via using
# 'field_<field_name>'
# XXX: Not a good way to get the field value before validation.
path
=
request
.
form
.
get
(
'field_your_%s'
%
field_name
,
None
)
# If the path is still empty, we try to get it from request
if
path
is
None
:
path
=
request
.
get
(
'your_%s'
%
field_name
,
None
)
if
path
:
# When both paths are same, in case the action call is made
# from an ERP5 object
obj
=
portal
.
restrictedTraverse
(
path
)
date_list
=
obj
.
Base_getRevisionDateList
(
obj
,
size
=
history_size
)
# If there is no path from the field value, then we check for selections
else
:
# In case we are tryng to get the object path from selection,
# for example when we try to diff 2 objects from one module
list_selection_name
=
request
.
get
(
'list_selection_name'
)
# Get the selected values for the web page selection
if
list_selection_name
:
selected_obj_list
=
portal
.
portal_selections
.
getSelectionCheckedValueList
(
selection_name
=
list_selection_name
)
obj
=
selected_obj_list
[
selection_index
]
date_list
=
obj
.
Base_getRevisionDateList
(
obj
,
size
=
history_size
)
return
[(
str
(
DateTime
(
date
).
strftime
(
"%Y-%m-%d %H:%M"
)),
str
(
date
))
for
date
in
date_list
]
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateItemList.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
field_name, selection_index, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getRevisionDateItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionDateList.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getHistoricalRevisionsDateList
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
ZODBHistory
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getRevisionDateList
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/Base_getRevisionFromDate.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getRevisionFromDate
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
ZODBHistory
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getRevisionFromDate
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/
DiffTool_view
.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/
ERP5Site_viewDiffTwoObjectDialog
.xml
View file @
985a690b
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
action
</string>
</key>
<key>
<string>
action
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
ERP5Site_viewDiffTwoObjectDialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
...
@@ -53,7 +53,9 @@
...
@@ -53,7 +53,9 @@
<item>
<item>
<key>
<string>
bottom
</string>
</key>
<key>
<string>
bottom
</string>
</key>
<value>
<value>
<list/>
<list>
<string>
listbox
</string>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -65,21 +67,27 @@
...
@@ -65,21 +67,27 @@
<item>
<item>
<key>
<string>
hidden
</string>
</key>
<key>
<string>
hidden
</string>
</key>
<value>
<value>
<list/>
<list>
<string>
listbox_diff
</string>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
left
</string>
</key>
<key>
<string>
left
</string>
</key>
<value>
<value>
<list>
<list>
<string>
my_title
</string>
<string>
your_first_path
</string>
<string>
your_first_date
</string>
</list>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
right
</string>
</key>
<key>
<string>
right
</string>
</key>
<value>
<value>
<list/>
<list>
<string>
your_second_path
</string>
<string>
your_second_date
</string>
</list>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -87,7 +95,7 @@
...
@@ -87,7 +95,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
DiffTool_view
</string>
</value>
<value>
<string>
ERP5Site_viewDiffTwoObjectDialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
method
</string>
</key>
<key>
<string>
method
</string>
</key>
...
@@ -95,11 +103,11 @@
...
@@ -95,11 +103,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
name
</string>
</key>
<key>
<string>
name
</string>
</key>
<value>
<string>
DiffTool_view
</string>
</value>
<value>
<string>
ERP5Site_viewDiffTwoObjectDialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
pt
</string>
</key>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_
view
</string>
</value>
<value>
<string>
form_
dialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
row_length
</string>
</key>
<key>
<string>
row_length
</string>
</key>
...
@@ -111,7 +119,7 @@
...
@@ -111,7 +119,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Diff Tool
</string>
</value>
<value>
<string>
View Diff
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<key>
<string>
unicode_mode
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
columns
</string>
<string>
count_method
</string>
<string>
lines
</string>
<string>
list_method
</string>
<string>
selection_name
</string>
<string>
title
</string>
<string>
url_columns
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<list>
<tuple>
<string>
path
</string>
<string>
Property Name
</string>
</tuple>
<tuple>
<string>
diff
</string>
<string>
Diff Viewer
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
count_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_mode_listbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Diff
</string>
</value>
</item>
<item>
<key>
<string>
url_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
path
</string>
<string></string>
</tuple>
<tuple>
<string>
diff
</string>
<string></string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
Base_getObjectDiffList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/listbox_diff.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
css_class
</string>
<string>
default
</string>
<string>
gadget_url
</string>
<string>
js_sandbox
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_diff
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
listbox-gadget
</string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_gadget_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Diff Viewer
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.diff
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: field.restrictedTraverse(\'gadget_erp5_side_by_side_diff.html\').absolute_url()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getDiffGadgetSandbox()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/
DiffTool_view/my_titl
e.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/
ERP5Site_viewDiffTwoObjectDialog/your_first_dat
e.xml
View file @
985a690b
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
<key>
<string>
delegated_list
</string>
</key>
<key>
<string>
delegated_list
</string>
</key>
<value>
<value>
<list>
<list>
<string>
editable
</string>
<string>
items
</string>
<string>
title
</string>
<string>
title
</string>
</list>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_titl
e
</string>
</value>
<value>
<string>
your_first_dat
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
message_values
</string>
</key>
<key>
<string>
message_values
</string>
</key>
...
@@ -57,6 +57,16 @@
...
@@ -57,6 +57,16 @@
<key>
<string>
form_id
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -64,21 +74,23 @@
...
@@ -64,21 +74,23 @@
<key>
<string>
values
</string>
</key>
<key>
<string>
values
</string>
</key>
<value>
<value>
<dictionary>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
string
_field
</string>
</value>
<value>
<string>
my_
list
_field
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
form_id
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Title
</string>
</value>
<value>
<string>
First Document Revision
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</value>
</value>
...
@@ -86,4 +98,17 @@
...
@@ -86,4 +98,17 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getRevisionDateItemList(\'first_path\', 0)
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_path.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
display_width
</string>
<string>
required
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_first_path
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Path of First Document
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getObjectPathFromSelection(0, list_selection_name=REQUEST.get(\'list_selection_name\', None))
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_second_date
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Second Document Revision
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getDefaultRevisionDate()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getRevisionDateItemList(\'second_path\', 1)
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_path.xml
0 → 100644
View file @
985a690b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
display_width
</string>
<string>
required
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_second_path
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Path of Second Document
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Base_getObjectPathFromSelection(1, list_selection_name=REQUEST.get(\'list_selection_name\', None))
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/tests/testERP5Core.py
View file @
985a690b
...
@@ -236,7 +236,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -236,7 +236,8 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
'title'
:
'Configure Alarms'
},
'title'
:
'Configure Alarms'
},
{
'title'
:
'Undo'
,
'id'
:
'undo'
}],
{
'title'
:
'Undo'
,
'id'
:
'undo'
}],
'object'
:
[],
'object'
:
[],
'object_action'
:
[{
'id'
:
'post_query'
,
'title'
:
'Post a Query'
}],
'object_action'
:
[{
'id'
:
'post_query'
,
'title'
:
'Post a Query'
},
{
'id'
:
'diff_object_action'
,
'title'
:
'Diff Object'
}],
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'title'
:
'View Historical Comparison'
}],
'title'
:
'View Historical Comparison'
}],
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
},
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
},
...
@@ -260,6 +261,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -260,6 +261,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
expected
=
{
'folder'
:
[],
expected
=
{
'folder'
:
[],
'global'
:
[],
'global'
:
[],
'object'
:
[],
'object'
:
[],
'object_action'
:
[{
'id'
:
'diff_object_action'
,
'title'
:
'Diff Object'
}],
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'title'
:
'View Historical Comparison'
}],
'title'
:
'View Historical Comparison'
}],
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
}],
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
}],
...
@@ -278,6 +280,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -278,6 +280,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
expected
=
{
'folder'
:
[],
expected
=
{
'folder'
:
[],
'global'
:
[],
'global'
:
[],
'object'
:
[],
'object'
:
[],
'object_action'
:
[{
'id'
:
'diff_object_action'
,
'title'
:
'Diff Object'
}],
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'object_hidden'
:
[{
'id'
:
'view_historical_comparison'
,
'title'
:
'View Historical Comparison'
}],
'title'
:
'View Historical Comparison'
}],
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
}],
'object_jump'
:
[{
'id'
:
'jump_related_object'
,
'title'
:
'Related Objects'
}],
...
...
product/ERP5/tests/testXHTML.py
View file @
985a690b
...
@@ -50,7 +50,8 @@ class TestXHTMLMixin(ERP5TypeTestCase):
...
@@ -50,7 +50,8 @@ class TestXHTMLMixin(ERP5TypeTestCase):
# some forms have intentionally empty listbox selections like RSS generators
# some forms have intentionally empty listbox selections like RSS generators
FORM_LISTBOX_EMPTY_SELECTION_PATH_LIST
=
[
'erp5_web_widget_library/WebSection_viewContentListAsRSS'
,
FORM_LISTBOX_EMPTY_SELECTION_PATH_LIST
=
[
'erp5_web_widget_library/WebSection_viewContentListAsRSS'
,
'erp5_core/Base_viewHistoricalComparison'
,]
'erp5_core/Base_viewHistoricalComparison'
,
'erp5_diff/ERP5Site_viewDiffTwoObjectDialog'
,]
JSL_IGNORE_FILE_LIST
=
(
JSL_IGNORE_FILE_LIST
=
(
'diff2html.js'
,
'diff2html.js'
,
'diff2html-ui.js'
,
'diff2html-ui.js'
,
...
...
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