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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amrani
erp5
Commits
0d1ee91a
Commit
0d1ee91a
authored
Feb 13, 2018
by
Xiaowu Zhang
Committed by
Ayush Tiwari
Mar 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_pdm]: Migrate Resource_viewMovementHistory listbox's URL columns
parent
f68c139d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
23 deletions
+149
-23
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewMovementHistory/listbox.xml
...l_skins/erp5_pdm/Resource_viewMovementHistory/listbox.xml
+121
-4
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
...teItem/portal_components/extension.erp5.InventoryBrain.py
+10
-5
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+18
-14
No files found.
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewMovementHistory/listbox.xml
View file @
0d1ee91a
...
...
@@ -160,10 +160,18 @@
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
anchor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
count_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -172,6 +180,10 @@
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_display_style
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -180,6 +192,10 @@
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_style_list
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -188,10 +204,18 @@
<key>
<string>
domain_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -200,10 +224,18 @@
<key>
<string>
global_attributes
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
global_search_column
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hide_rows_on_no_search_criterion
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -220,6 +252,14 @@
<key>
<string>
meta_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
page_navigation_template
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
page_template
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -232,6 +272,10 @@
<key>
<string>
report_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
row_css_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -256,14 +300,36 @@
<key>
<string>
sort_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
stat_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
untranslatable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
url_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
url_parameter_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -338,6 +404,10 @@
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_display_style
</string>
</key>
<value>
<string>
table
</string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
...
...
@@ -348,6 +418,12 @@
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_style_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
...
...
@@ -404,10 +480,18 @@
<list/>
</value>
</item>
<item>
<key>
<string>
global_search_column
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
hide_rows_on_no_search_criterion
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<int>
20
</int>
</value>
...
...
@@ -419,7 +503,7 @@
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
<item>
...
...
@@ -428,6 +512,10 @@
<list/>
</value>
</item>
<item>
<key>
<string>
page_navigation_template
</string>
</key>
<value>
<string>
ListBox_viewSliderPageNavigationRenderer
</string>
</value>
</item>
<item>
<key>
<string>
page_template
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -448,6 +536,10 @@
<key>
<string>
report_tree
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
row_css_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<int>
0
</int>
</value>
...
...
@@ -472,7 +564,7 @@
<list>
<tuple>
<string>
date
</string>
<string>
Date
</string>
<string>
asc
</string>
</tuple>
</list>
</value>
...
...
@@ -492,7 +584,13 @@
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
...
...
@@ -511,6 +609,12 @@
<list/>
</value>
</item>
<item>
<key>
<string>
url_parameter_dict
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -518,6 +622,19 @@
</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: {\'date\': {}, \'getExplanationText\': {}, \'node_title\':{}, \'section_title\':{}, \'variation_category_item_list\': {},\'total_quantity\':{}, \'getTranslatedSimulationStateTitle\':{}}
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
...
...
@@ -530,7 +647,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.InventoryBrain.py
View file @
0d1ee91a
...
...
@@ -343,15 +343,20 @@ class MovementHistoryListBrain(InventoryListBrain):
return
self
.
_convertDateToZone
(
self
.
date_utc
)
date
=
ComputedAttribute
(
_date
,
1
)
def
getListItem
(
self
,
cname_id
,
selection_index
,
selection_name
):
document
=
self
.
getObject
()
if
document
.
isMovement
():
return
document
.
getExplanationValue
()
def
getListItemParamDict
(
self
,
cname_id
,
selection_index
,
selection_name
):
return
{}
def
getListItemUrl
(
self
,
cname_id
,
selection_index
,
selection_name
):
"""Returns the URL for column `cname_id`. Used by ListBox
Here we just want a link to the explanation of movement.
"""
document
=
self
.
getObject
()
if
document
.
isMovement
():
explanation
=
document
.
getExplanationValue
()
if
explanation
is
not
None
:
return
explanation
.
absolute_url
()
item
=
self
.
getListItem
(
cname_id
,
selection_index
,
selection_name
)
if
item
is
not
None
:
return
item
.
absolute_url
()
return
''
def
_debit
(
self
):
...
...
product/ERP5Form/ListBox.py
View file @
0d1ee91a
...
...
@@ -2344,9 +2344,13 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
result_dict
[
key
]
=
value
(
selection
=
selection
,
selection_name
=
selection
.
getName
(),
column_id
=
sql
,
index
=
self
.
index
)
except
TypeError
:
result_dict
[
key
]
=
value
()
if
result_dict
:
if
'jio_key'
not
in
result_dict
:
url
=
''
if
getattr
(
brain
,
'getListItem'
,
None
)
is
not
None
:
item
=
brain
.
getListItem
(
alias
,
self
.
index
,
selection_name
)
if
item
is
not
None
:
url
=
item
.
absolute_url
()
else
:
try
:
url
=
self
.
getObject
().
getPortalObject
().
restrictedTraverse
(
result_dict
[
'jio_key'
]).
absolute_url
()
...
...
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