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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
2a835360
Commit
2a835360
authored
Aug 14, 2015
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Multi|)RelationField: Cleanup imports.
parent
7e414004
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
product/ERP5Form/MultiRelationField.py
product/ERP5Form/MultiRelationField.py
+1
-4
product/ERP5Form/RelationField.py
product/ERP5Form/RelationField.py
+1
-12
No files found.
product/ERP5Form/MultiRelationField.py
View file @
2a835360
...
@@ -35,11 +35,9 @@ from Products.PythonScripts.Utility import allow_class
...
@@ -35,11 +35,9 @@ from Products.PythonScripts.Utility import allow_class
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
types
import
StringType
from
types
import
StringType
from
zLOG
import
LOG
from
Products.Formulator.DummyField
import
fields
from
Products.Formulator.DummyField
import
fields
from
Products.ERP5Type.Globals
import
get_request
from
Products.ERP5Type.Globals
import
get_request
from
AccessControl
import
Unauthorized
import
json
from
AccessControl
import
getSecurityManager
# Max. number of catalog result
# Max. number of catalog result
MAX_SELECT
=
30
MAX_SELECT
=
30
...
@@ -369,7 +367,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
...
@@ -369,7 +367,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
only erp5_autocompletion_ui bt5 to be installed
only erp5_autocompletion_ui bt5 to be installed
"""
"""
# XXX: Allow to specify more parameters to jquery-ui autocomplete widget?
# XXX: Allow to specify more parameters to jquery-ui autocomplete widget?
import
json
return
"""
return
"""
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
...
...
product/ERP5Form/RelationField.py
View file @
2a835360
...
@@ -29,19 +29,10 @@
...
@@ -29,19 +29,10 @@
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.Field
import
ZMIField
from
Products.Formulator.Field
import
ZMIField
from
Products.Formulator.DummyField
import
fields
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Products.CMFCore.utils
import
getToolByName
from
Products.PythonScripts.Utility
import
allow_class
from
Products.PythonScripts.Utility
import
allow_class
from
Products.ERP5Type.Message
import
Message
from
Products.ERP5Form
import
MultiRelationField
from
Products.ERP5Form
import
MultiRelationField
from
Products.ERP5Form.MultiRelationField
import
MAX_SELECT
,
\
from
Products.ERP5Form.MultiRelationField
import
SUB_FIELD_ID
,
ITEM_ID
NEW_CONTENT_PREFIX
,
\
SUB_FIELD_ID
,
ITEM_ID
,
\
NO_VALUE
from
types
import
StringType
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
zLOG
import
LOG
class
RelationStringFieldWidget
(
class
RelationStringFieldWidget
(
MultiRelationField
.
MultiRelationStringFieldWidget
):
MultiRelationField
.
MultiRelationStringFieldWidget
):
...
@@ -58,8 +49,6 @@ class RelationStringFieldWidget(
...
@@ -58,8 +49,6 @@ class RelationStringFieldWidget(
default
=
Widget
.
TextWidget
.
default
default
=
Widget
.
TextWidget
.
default
def
_generateRenderValueList
(
self
,
field
,
key
,
value
,
REQUEST
):
def
_generateRenderValueList
(
self
,
field
,
key
,
value
,
REQUEST
):
# value = value or NO_VALUE
if
REQUEST
.
get
(
if
REQUEST
.
get
(
'read_only_%s'
%
REQUEST
.
get
(
'read_only_%s'
%
REQUEST
.
get
(
'field__proxyfield_%s_%s_default'
%
(
field
.
id
,
field
.
_p_oid
),
'field__proxyfield_%s_%s_default'
%
(
field
.
id
,
field
.
_p_oid
),
...
...
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