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
alecs_myu
erp5
Commits
97ba45fb
Commit
97ba45fb
authored
Feb 29, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename version_priority ERP5Site property to version_priority_list.
parent
854bc009
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
19 deletions
+23
-19
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+10
-9
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewMigrateSourceCodeFromFilesystemDialog/my_version_priority.xml
...ateSourceCodeFromFilesystemDialog/my_version_priority.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Component_view/my_version.xml
...Item/portal_skins/erp5_core/Component_view/my_version.xml
+1
-1
product/ERP5/bootstrap/erp5_core/bt/change_log
product/ERP5/bootstrap/erp5_core/bt/change_log
+3
-0
product/ERP5/bootstrap/erp5_core/bt/revision
product/ERP5/bootstrap/erp5_core/bt/revision
+1
-1
product/ERP5Type/dynamic/component_package.py
product/ERP5Type/dynamic/component_package.py
+4
-4
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+3
-3
No files found.
product/ERP5/ERP5Site.py
View file @
97ba45fb
...
...
@@ -444,28 +444,29 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
return
self
.
title
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getVersionPriority'
)
def
getVersionPriority
(
self
):
'getVersionPriority
List
'
)
def
getVersionPriority
List
(
self
):
# Whatever happens, a version must always be returned otherwise it may
# render the site unusable when all Products will have been migrated
if
not
self
.
_version_priority
:
if
not
self
.
_version_priority
_list
:
return
(
'erp5'
,)
return
self
.
_version_priority
return
self
.
_version_priority
_list
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setVersionPriority'
)
def
setVersionPriority
(
self
,
value
):
'setVersionPriority
List
'
)
def
setVersionPriority
List
(
self
,
value
):
"""
XXX-arnau: must be written through an interaction workflow when ERP5Site
will become a real ERP5 object...
"""
self
.
_version_priority
=
value
self
.
_version_priority
_list
=
value
if
not
getattr
(
self
,
'_v_bootstrapping'
,
False
):
self
.
portal_components
.
resetOnceAtTransactionBoundary
()
version_priority
=
property
(
getVersionPriority
,
setVersionPriority
)
version_priority_list
=
property
(
getVersionPriorityList
,
setVersionPriorityList
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getUid'
)
def
getUid
(
self
):
...
...
@@ -1695,7 +1696,7 @@ class ERP5Generator(PortalGenerator):
# Return the fully wrapped object.
p
=
parent
.
this
().
_getOb
(
id
)
p
.
_setProperty
(
'version_priority'
,
(
'erp5'
,),
'lines'
)
p
.
_setProperty
(
'version_priority
_list
'
,
(
'erp5'
,),
'lines'
)
erp5_sql_deferred_connection_string
=
erp5_sql_connection_string
p
.
_setProperty
(
'erp5_catalog_storage'
,
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewMigrateSourceCodeFromFilesystemDialog/my_version_priority.xml
View file @
97ba45fb
...
...
@@ -123,7 +123,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(v, v) for v in here.getPortalObject().getVersionPriority()]
</string>
</value>
<value>
<string>
python: [(v, v) for v in here.getPortalObject().getVersionPriority
List
()]
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Component_view/my_version.xml
View file @
97ba45fb
...
...
@@ -108,7 +108,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.getPortalObject().getVersionPriority()
</string>
</value>
<value>
<string>
python: here.getPortalObject().getVersionPriority
List
()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/bt/change_log
View file @
97ba45fb
2012-02-28 arnaud.fontaine
* Rename version_priority ERP5Site property to version_priority_list.
2012-02-28 arnaud.fontaine
* Use a ListField for version and proxify error messages field in Component view.
...
...
product/ERP5/bootstrap/erp5_core/bt/revision
View file @
97ba45fb
41014
\ No newline at end of file
41015
\ No newline at end of file
product/ERP5Type/dynamic/component_package.py
View file @
97ba45fb
...
...
@@ -103,7 +103,7 @@ class ComponentDynamicPackage(ModuleType):
except
AttributeError
:
return
{}
version_priority_set
=
set
(
portal
.
getVersionPriority
())
version_priority_set
=
set
(
portal
.
getVersionPriority
List
())
# contentValues should not be used for a large number of objects, but
# this is only done at startup or upon reset, moreover using the Catalog
...
...
@@ -155,7 +155,7 @@ class ComponentDynamicPackage(ModuleType):
# wrongly considered as importable and thus the actual filesystem class
# ignored
elif
(
name
not
in
self
.
_registry_dict
and
name
.
replace
(
'_version'
,
''
)
not
in
site
.
getVersionPriority
()):
name
.
replace
(
'_version'
,
''
)
not
in
site
.
getVersionPriority
List
()):
return
None
return
self
...
...
@@ -182,7 +182,7 @@ class ComponentDynamicPackage(ModuleType):
component_name
=
fullname
.
replace
(
self
.
_namespace_prefix
,
''
)
if
component_name
.
endswith
(
'_version'
):
version
=
component_name
.
replace
(
'_version'
,
''
)
return
(
version
in
site
.
getVersionPriority
()
and
return
(
version
in
site
.
getVersionPriority
List
()
and
self
.
_getVersionPackage
(
version
)
or
None
)
component_id_alias
=
None
...
...
@@ -211,7 +211,7 @@ class ComponentDynamicPackage(ModuleType):
return
None
for
version
in
site
.
getVersionPriority
():
for
version
in
site
.
getVersionPriority
List
():
component
=
component_version_dict
.
get
(
version
,
None
)
if
component
is
not
None
:
break
...
...
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
97ba45fb
...
...
@@ -1589,9 +1589,9 @@ def bar(*args, **kwargs):
from
Products.ERP5.ERP5Site
import
getSite
site
=
getSite
()
ComponentTool
.
reset
=
assertResetCalled
priority_tuple
=
site
.
getVersionPriority
()
priority_tuple
=
site
.
getVersionPriority
List
()
try
:
site
.
setVersionPriority
((
'foo'
,)
+
priority_tuple
)
site
.
setVersionPriority
List
((
'foo'
,)
+
priority_tuple
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -1607,7 +1607,7 @@ def bar(*args, **kwargs):
finally
:
ComponentTool
.
reset
=
ComponentTool
.
_original_reset
site
.
setVersionPriority
(
priority_tuple
)
site
.
setVersionPriority
List
(
priority_tuple
)
transaction
.
commit
()
self
.
tic
()
...
...
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