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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
e51cf7f0
Commit
e51cf7f0
authored
5 years ago
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX restore a constructUrlFor NOTFORMERGE
I need this to be able to update an instance
parent
58144924
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+1
-0
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+6
-0
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+7
-0
No files found.
product/ERP5/ERP5Site.py
View file @
e51cf7f0
...
...
@@ -232,6 +232,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
The *only* function this class should have is to help in the setup
of a new ERP5. It should not assist in the functionality at all.
"""
constructUrlFor
=
CMFSite
.
absolute_url
meta_type
=
'ERP5 Site'
portal_type
=
'ERP5 Site'
constructors
=
((
'addERP5Site'
,
manage_addERP5SiteForm
),
manage_addERP5Site
,
)
...
...
This diff is collapsed.
Click to expand it.
product/ERP5Type/Base.py
View file @
e51cf7f0
...
...
@@ -733,6 +733,12 @@ class Base( CopyContainer,
could work as a workflow but CPU expensive
"""
def
constructUrlFor
(
self
,
form_id
=
''
,
dialog_id
=
''
,
parameter_dict
=
None
,
*
args
,
**
kw
):
from
ZTUtils
import
make_query
url
=
'%s/%s'
%
(
self
.
absolute_url
(),
form_id
or
dialog_id
)
if
parameter_dict
:
url
=
'%s?%s'
%
(
url
,
make_query
(
parameter_dict
))
return
url
meta_type
=
'ERP5 Base Object'
portal_type
=
'Base Object'
#_local_properties = () # no need since getattr
...
...
This diff is collapsed.
Click to expand it.
product/ERP5Type/Core/Folder.py
View file @
e51cf7f0
...
...
@@ -158,6 +158,13 @@ class FolderMixIn(ExtensionClass.Base):
# flag to hold the status of migration for this folder
_migration_in_progress
=
False
def
constructUrlFor
(
self
,
form_id
=
''
,
dialog_id
=
''
,
parameter_dict
=
None
,
*
args
,
**
kw
):
from
ZTUtils
import
make_query
url
=
'%s/%s'
%
(
self
.
absolute_url
(),
form_id
or
dialog_id
)
if
parameter_dict
:
url
=
'%s?%s'
%
(
url
,
make_query
(
parameter_dict
))
return
url
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
...
...
This diff is collapsed.
Click to expand it.
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