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
Titouan Soulard
erp5
Commits
1f0e50f9
Commit
1f0e50f9
authored
12 years ago
by
Romain Courteaud
Committed by
Rafael Monnerat
2 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to proxify to form with the same ID
parent
5dd7af44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+14
-4
product/ERP5Form/dtml/formProxify.dtml
product/ERP5Form/dtml/formProxify.dtml
+1
-1
No files found.
product/ERP5Form/Form.py
View file @
1f0e50f9
...
...
@@ -829,7 +829,7 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
# Find folders which can be surcharged by this skin folder
if
'_'
in
folder_id
:
surcharged_folder_id
=
'erp5_%s'
%
folder_id
.
split
(
'_'
)[
-
1
]
surcharged_folder_id
=
'erp5_%s'
%
folder_id
.
split
(
'_'
,
1
)[
-
1
]
if
(
surcharged_folder_id
!=
folder_id
)
and
\
(
getattr
(
portal
.
portal_skins
,
surcharged_folder_id
,
None
)
\
is
not
None
):
...
...
@@ -850,8 +850,8 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
for
i
in
obj
.
objectValues
():
if
(
i
.
meta_type
==
'ERP5 Form'
and
i
.
id
.
startswith
(
'Base_view'
)
and
i
.
id
.
endswith
(
'FieldLibrary'
)
and
'_view'
in
i
.
getId
()):
i
.
id
.
endswith
(
'FieldLibrary'
)
and
'_view'
in
i
.
getId
())
or
(
i
.
id
==
self
.
id
)
:
form_id
=
i
.
getId
()
form_path
=
'%s.%s'
%
(
obj
.
getId
(),
form_id
)
field_list
=
[]
...
...
@@ -1131,7 +1131,17 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
for
field_id
in
field_dict
.
keys
():
target
=
field_dict
[
field_id
]
target_form_id
,
target_field_id
=
target
.
split
(
'.'
)
target_list
=
target
.
split
(
'.'
)
if
len
(
target_list
)
==
2
:
target_form_id
,
target_field_id
=
target_list
elif
len
(
target_list
)
==
3
:
target_field_id
=
target_list
[
2
]
if
target_list
[
1
]
==
self
.
id
:
target_form_id
=
'/'
.
join
(
target_list
[:
2
])
else
:
target_form_id
=
target_list
[
1
]
else
:
raise
NotImplementedError
,
"Not supported path: %s"
%
target
# keep current group and position.
group
,
position
=
get_group_and_position
(
field_id
)
...
...
This diff is collapsed.
Click to expand it.
product/ERP5Form/dtml/formProxify.dtml
View file @
1f0e50f9
...
...
@@ -49,7 +49,7 @@ Keep empty values <input type="checkbox" name="keep_empty_value"> <br/>
field_id="field_object.getId()"
field_type="item['field_type']"
proxy_mark="item['proxy_flag'] and ' (Proxy)' or ''">
<option value="<dtml-var "'%s.%s' % (form_
id
, field_id)">">
<option value="<dtml-var "'%s.%s' % (form_
path
, field_id)">">
<dtml-var "'%s%s' % (field_id, proxy_mark)">
</option>
</dtml-let>
...
...
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