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
Léo-Paul Géneau
erp5
Commits
86bcf70b
Commit
86bcf70b
authored
Nov 25, 2016
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Person_createUserPreference: Move imports to script beginning.
parent
10773ebe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.py
...tem/portal_skins/erp5_base/Person_createUserPreference.py
+2
-2
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.py
View file @
86bcf70b
from
zExceptions
import
Unauthorized
from
Products.ERP5Type.Message
import
translateString
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
from
zExceptions
import
Unauthorized
raise
Unauthorized
(
script
.
getId
())
raise
Unauthorized
(
script
.
getId
())
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -10,7 +11,6 @@ if not context.getReference():
...
@@ -10,7 +11,6 @@ if not context.getReference():
# noop in case if invoked on non loggable object
# noop in case if invoked on non loggable object
return
return
from
Products.ERP5Type.Message
import
translateString
preference
=
portal
.
portal_preferences
.
createPreferenceForUser
(
preference
=
portal
.
portal_preferences
.
createPreferenceForUser
(
context
.
getReference
(),
enable
=
True
)
context
.
getReference
(),
enable
=
True
)
...
...
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