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
Nikola Balog
erp5
Commits
61b78ab1
Commit
61b78ab1
authored
Jul 21, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tinnies code style changes.
parent
e64f41a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
product/ERP5Configurator/Tool/ConfiguratorTool.py
product/ERP5Configurator/Tool/ConfiguratorTool.py
+13
-14
No files found.
product/ERP5Configurator/Tool/ConfiguratorTool.py
View file @
61b78ab1
...
@@ -216,12 +216,11 @@ class ConfiguratorTool(BaseTool):
...
@@ -216,12 +216,11 @@ class ConfiguratorTool(BaseTool):
return
self
.
view
()
return
self
.
view
()
response
=
self
.
_next
(
business_configuration
=
bc
,
kw
=
kw
)
response
=
self
.
_next
(
business_configuration
=
bc
,
kw
=
kw
)
## Parse server response
## Parse server response
command
=
response
[
"command"
]
if
response
[
"command"
]
==
"show"
:
if
command
==
"show"
:
return
self
.
ConfiguratorTool_dialogForm
(
previous
=
response
[
'previous'
],
return
self
.
ConfiguratorTool_dialogForm
(
previous
=
response
[
'previous'
],
form_html
=
response
[
"data"
],
form_html
=
response
[
"data"
],
next
=
response
[
'next'
])
next
=
response
[
'next'
])
elif
command
==
"install"
:
elif
response
[
"command"
]
==
"install"
:
return
self
.
startInstallation
(
bc
,
REQUEST
=
REQUEST
)
return
self
.
startInstallation
(
bc
,
REQUEST
=
REQUEST
)
def
_next
(
self
,
business_configuration
,
kw
):
def
_next
(
self
,
business_configuration
,
kw
):
...
@@ -354,7 +353,7 @@ class ConfiguratorTool(BaseTool):
...
@@ -354,7 +353,7 @@ class ConfiguratorTool(BaseTool):
if
html
is
None
:
if
html
is
None
:
## we have no more forms proceed to build
## we have no more forms proceed to build
response
.
update
(
command
=
"install"
,
data
=
None
)
response
.
update
(
command
=
"install"
,
data
=
None
)
else
:
else
:
## we have more forms
## we have more forms
next_state
=
self
.
restrictedTraverse
(
business_configuration
.
getNextTransition
()
\
next_state
=
self
.
restrictedTraverse
(
business_configuration
.
getNextTransition
()
\
...
@@ -371,12 +370,12 @@ class ConfiguratorTool(BaseTool):
...
@@ -371,12 +370,12 @@ class ConfiguratorTool(BaseTool):
he can no longer continue. """
he can no longer continue. """
if
reason
==
'no_available_transitions'
:
if
reason
==
'no_available_transitions'
:
form_html
=
self
.
BusinessConfiguration_viewStopForm
()
form_html
=
self
.
BusinessConfiguration_viewStopForm
()
response
.
update
(
command
=
"show"
,
next
=
None
,
\
response
.
update
(
command
=
"show"
,
next
=
None
,
\
previous
=
None
,
data
=
form_html
)
previous
=
None
,
data
=
form_html
)
elif
reason
==
'authentification_failure'
:
elif
reason
==
'authentification_failure'
:
form_html
=
self
.
BusinessConfiguration_viewUnauthenticatedForm
()
form_html
=
self
.
BusinessConfiguration_viewUnauthenticatedForm
()
response
.
update
(
command
=
"show"
,
data
=
form_html
,
response
.
update
(
command
=
"show"
,
data
=
form_html
,
next
=
None
,
previous
=
None
,)
next
=
None
,
previous
=
None
,)
return
response
return
response
...
@@ -403,7 +402,7 @@ class ConfiguratorTool(BaseTool):
...
@@ -403,7 +402,7 @@ class ConfiguratorTool(BaseTool):
## is client is not allowed access ?
## is client is not allowed access ?
if
business_configuration
is
None
:
if
business_configuration
is
None
:
form_html
=
self
.
BusinessConfiguration_viewUnauthenticatedForm
()
form_html
=
self
.
BusinessConfiguration_viewUnauthenticatedForm
()
return
self
.
ConfiguratorTool_dialogForm
(
form_html
=
form_html
)
return
self
.
ConfiguratorTool_dialogForm
(
form_html
=
form_html
)
## client can not go further his business configuration is already built
## client can not go further his business configuration is already built
if
business_configuration
.
isEndConfigurationState
():
if
business_configuration
.
isEndConfigurationState
():
form_html
=
self
.
BusinessConfiguration_viewStopForm
()
form_html
=
self
.
BusinessConfiguration_viewStopForm
()
...
@@ -417,9 +416,9 @@ class ConfiguratorTool(BaseTool):
...
@@ -417,9 +416,9 @@ class ConfiguratorTool(BaseTool):
business_configuration
.
getNextTransition
().
getDestination
())
business_configuration
.
getNextTransition
().
getDestination
())
response
[
'data'
]
=
self
.
Base_mainConfiguratorTemplate
(
response
[
'data'
]
=
self
.
Base_mainConfiguratorTemplate
(
form_html
=
form_html
,
form_html
=
form_html
,
current_state
=
next_state
,
current_state
=
next_state
,
business_configuration
=
business_configuration
)
business_configuration
=
business_configuration
)
return
response
return
response
security
.
declarePublic
(
Permissions
.
AccessContentsInformation
,
security
.
declarePublic
(
Permissions
.
AccessContentsInformation
,
...
@@ -466,7 +465,7 @@ class ConfiguratorTool(BaseTool):
...
@@ -466,7 +465,7 @@ class ConfiguratorTool(BaseTool):
REQUEST
.
set
(
'active_process_id'
,
active_process
.
getId
())
REQUEST
.
set
(
'active_process_id'
,
active_process
.
getId
())
request_restore_dict
=
{
'__ac_key'
:
REQUEST
.
get
(
'__ac_key'
,
request_restore_dict
=
{
'__ac_key'
:
REQUEST
.
get
(
'__ac_key'
,
None
),
}
None
),
}
self
.
activate
(
active_process
=
active_process
,
tag
=
'initialERP5Setup'
self
.
activate
(
active_process
=
active_process
,
tag
=
'initialERP5Setup'
).
initialERP5Setup
(
business_configuration
.
getRelativeUrl
(),
request_restore_dict
)
).
initialERP5Setup
(
business_configuration
.
getRelativeUrl
(),
request_restore_dict
)
return
self
.
ConfiguratorTool_viewInstallationStatus
(
REQUEST
)
return
self
.
ConfiguratorTool_viewInstallationStatus
(
REQUEST
)
...
...
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