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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
8e37853d
Commit
8e37853d
authored
Jul 21, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Server Buffer is not required on this new Implementation
parent
703f396b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
26 deletions
+8
-26
product/ERP5Configurator/Document/BusinessConfiguration.py
product/ERP5Configurator/Document/BusinessConfiguration.py
+2
-20
product/ERP5Configurator/Tool/ConfiguratorTool.py
product/ERP5Configurator/Tool/ConfiguratorTool.py
+6
-6
No files found.
product/ERP5Configurator/Document/BusinessConfiguration.py
View file @
8e37853d
...
...
@@ -169,7 +169,7 @@ class BusinessConfiguration(Item):
## exec next transition for this business configuration
self
.
_executeTransition
()
transition
=
self
.
getNextTransition
()
return
None
,
None
,
None
,
None
,
None
return
None
,
None
,
None
,
None
if
form_id
is
None
:
## go on until you find a form
self
.
_executeTransition
()
...
...
@@ -187,7 +187,7 @@ class BusinessConfiguration(Item):
if
self
.
_isAlreadyConfSaveInWorkflowHistory
(
transition
):
previous
=
translate
(
"Previous"
)
return
previous
,
form_html
,
form_title
,
\
translate
(
transition
.
getTitle
())
,
self
.
getServerBuffer
()
translate
(
transition
.
getTitle
())
security
.
declarePrivate
(
'_renderFormInContext'
)
def
_renderFormInContext
(
self
,
form_id
,
context
,
validation_errors
):
...
...
@@ -328,23 +328,6 @@ class BusinessConfiguration(Item):
self
.
_multi_entry_transitions
=
PersistentMapping
()
self
.
_multi_entry_transitions
[
transition_url
]
=
max_entry_number
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setServerBuffer'
)
def
setServerBuffer
(
self
,
**
kw
):
""" Set what we should return to client. """
if
getattr
(
aq_base
(
self
),
'_server_buffer'
,
None
)
is
None
:
self
.
_server_buffer
=
{}
for
item
,
value
in
kw
.
items
():
self
.
_server_buffer
[
item
]
=
value
self
.
_p_changed
=
1
security
.
declareProtected
(
Permissions
.
View
,
'getServerBuffer'
)
def
getServerBuffer
(
self
):
""" Get return buffer which will be sent to client and
afterwards deleted. """
server_buffer
=
getattr
(
aq_base
(
self
),
'_server_buffer'
,
{})
self
.
_server_buffer
=
{}
return
server_buffer
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setGlobalConfigurationAttr'
)
def
setGlobalConfigurationAttr
(
self
,
**
kw
):
""" Set global business configuration attribute. """
...
...
@@ -360,7 +343,6 @@ class BusinessConfiguration(Item):
global_configuration_attributes
=
getattr
(
self
,
'_global_configuration_attributes'
,
{})
return
global_configuration_attributes
.
get
(
key
,
default
)
############# Instance and Business Configuration ########################
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'buildConfiguration'
)
def
buildConfiguration
(
self
,
execute_after_setup_script
=
1
):
...
...
product/ERP5Configurator/Tool/ConfiguratorTool.py
View file @
8e37853d
...
...
@@ -335,8 +335,8 @@ class ConfiguratorTool(BaseTool):
### client can not continue at the momen
return
self
.
_terminateConfigurationProcess
(
response
,
reason
=
'no_available_transitions'
)
response
[
"previous"
],
html
,
form_title
,
response
[
"next"
]
,
\
response
[
'server_buffer'
]
=
business_configuration
.
_displayNextForm
()
response
[
"previous"
],
html
,
form_title
,
response
[
"next"
]
\
=
business_configuration
.
_displayNextForm
()
else
:
## validation passed
need_validation
=
0
...
...
@@ -347,9 +347,9 @@ class ConfiguratorTool(BaseTool):
'no_available_transitions'
)
## validation failure
rendered
=
True
response
[
"previous"
],
html
,
form_title
,
response
[
"next"
]
,
\
response
[
'server_buffer'
]
=
business_configuration
.
\
_displayNextForm
(
validation_errors
=
validation_errors
)
response
[
"previous"
],
html
,
form_title
,
response
[
"next"
]
=
\
business_configuration
.
_displayNextForm
(
validation_errors
=
validation_errors
)
if
html
is
None
:
## we have no more forms proceed to build
...
...
@@ -409,7 +409,7 @@ class ConfiguratorTool(BaseTool):
return
self
.
ConfiguratorTool_dialogForm
(
form_html
=
form_html
,
next
=
"Next"
)
response
[
'previous'
],
form_html
,
form_title
,
response
[
'next'
]
,
server_buffer
=
\
response
[
'previous'
],
form_html
,
form_title
,
response
[
'next'
]
=
\
business_configuration
.
_displayPreviousForm
()
next_state
=
self
.
restrictedTraverse
(
...
...
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