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
Levin Zimmermann
erp5
Commits
4877945b
Commit
4877945b
authored
Mar 30, 2021
by
Tatuya Kamada
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'arnau-RD-ERP5ify-portal_workflow' into ERP5ify-portal_workfow_yusei_20210303
parents
c8232258
2a7ec09f
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
333 additions
and
53 deletions
+333
-53
bt5/erp5_administration/ExtensionTemplateItem/portal_components/extension.erp5.ERP5Administration.py
...em/portal_components/extension.erp5.ERP5Administration.py
+6
-7
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessConfiguration.py
.../portal_components/document.erp5.BusinessConfiguration.py
+137
-9
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py
...plateItem/portal_components/tool.erp5.ConfiguratorTool.py
+0
-1
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_install.xml
...iness_lotse_configuration_workflow/transition_install.xml
+4
-0
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_setup_customer_bt5.xml
..._configuration_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_setup_standard_bt5.xml
..._configuration_workflow/transition_setup_standard_bt5.xml
+10
-0
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_install.xml
.../maxma_demo_configuration_workflow/transition_install.xml
+4
-0
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_setup_customer_bt5.xml
..._configuration_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_setup_standard_bt5.xml
..._configuration_workflow/transition_setup_standard_bt5.xml
+10
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_erp5_preferences.xml
...ration_workflow/transition_configure_erp5_preferences.xml
+4
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_organisation.xml
...figuration_workflow/transition_configure_organisation.xml
+4
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_user_accounts.xml
...iguration_workflow/transition_configure_user_accounts.xml
+4
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_user_accounts_number.xml
...on_workflow/transition_configure_user_accounts_number.xml
+4
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_install.xml
.../run_my_doc_configuration_workflow/transition_install.xml
+6
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_setup_customer_bt5.xml
..._configuration_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_setup_standard_bt5.xml
..._configuration_workflow/transition_setup_standard_bt5.xml
+10
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_accounting.xml
...5_consulting_workflow/transition_configure_accounting.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_categories.xml
...5_consulting_workflow/transition_configure_categories.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_erp5_preferences.xml
...ulting_workflow/transition_configure_erp5_preferences.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_organisation.xml
...consulting_workflow/transition_configure_organisation.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_roles.xml
...w/erp5_consulting_workflow/transition_configure_roles.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_user_accounts.xml
...onsulting_workflow/transition_configure_user_accounts.xml
+10
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_user_accounts_number.xml
...ng_workflow/transition_configure_user_accounts_number.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_install.xml
..._workflow/erp5_consulting_workflow/transition_install.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_setup_customer_bt5.xml
...rp5_consulting_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_setup_standard_bt5.xml
...rp5_consulting_workflow/transition_setup_standard_bt5.xml
+10
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_accounting.xml
...rp5_standard_workflow/transition_configure_accounting.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_erp5_preferences.xml
...andard_workflow/transition_configure_erp5_preferences.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_organisation.xml
...5_standard_workflow/transition_configure_organisation.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_user_accounts.xml
..._standard_workflow/transition_configure_user_accounts.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_user_accounts_number.xml
...rd_workflow/transition_configure_user_accounts_number.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_install.xml
...al_workflow/erp5_standard_workflow/transition_install.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_category.xml
...flow/erp5_standard_workflow/transition_setup_category.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_customer_bt5.xml
.../erp5_standard_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_portal_type_role.xml
...5_standard_workflow/transition_setup_portal_type_role.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_standard_bt5.xml
.../erp5_standard_workflow/transition_setup_standard_bt5.xml
+10
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_install.xml
...tal_workflow/officejs_sdk_workflow/transition_install.xml
+6
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_setup_customer_bt5.xml
...w/officejs_sdk_workflow/transition_setup_customer_bt5.xml
+4
-0
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_setup_standard_bt5.xml
...w/officejs_sdk_workflow/transition_setup_standard_bt5.xml
+10
-0
product/ERP5Type/Core/InteractionWorkflow.py
product/ERP5Type/Core/InteractionWorkflow.py
+0
-7
product/ERP5Type/Core/State.py
product/ERP5Type/Core/State.py
+0
-6
product/ERP5Type/Core/Workflow.py
product/ERP5Type/Core/Workflow.py
+0
-23
No files found.
bt5/erp5_administration/ExtensionTemplateItem/portal_components/extension.erp5.ERP5Administration.py
View file @
4877945b
...
...
@@ -32,15 +32,14 @@ def dumpWorkflowChain(self, ignore_default=False,
if
title
==
id_
:
title
=
None
chain
=
None
if
cbt
is
not
None
and
cbt
.
has_key
(
id_
):
cbt_list
=
[
x
for
x
in
cbt
[
id_
]
if
not
(
x
in
ignore_id_set
)]
if
keep_order
:
chain
=
cbt_list
else
:
chain
=
sorted
(
cbt_list
)
else
:
cbt_list
=
[
x
for
x
in
t
.
getTypeWorkflowList
()
if
not
(
x
in
ignore_id_set
)]
if
not
cbt_list
:
if
not
(
ignore_default
):
chain
=
[
'(Default)'
]
elif
keep_order
:
chain
=
cbt_list
else
:
chain
=
sorted
(
cbt_list
)
if
chain
:
types_info
.
append
({
'id'
:
id_
,
'title'
:
title
,
...
...
bt5/erp5_configurator/DocumentTemplateItem/portal_components/document.erp5.BusinessConfiguration.py
View file @
4877945b
...
...
@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from
Persistence
import
PersistentMapping
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
zLOG
import
LOG
,
ERROR
from
erp5.component.tool.ConfiguratorTool
import
_validateFormToRequest
from
erp5.component.document.Item
import
Item
...
...
@@ -56,8 +57,8 @@ def initializeDocument(workflow, document):
status_dict
=
{
state_bc_id
:
workflow
.
getSource
()}
variable_list
=
workflow
.
contentValues
(
portal_type
=
'Workflow Variable'
)
for
variable
in
variable_list
:
status_dict
[
variable
.
getTitle
()]
=
variable
.
getVariable
Value
(
object
=
object
)
workflow
.
_updateWorkflowHistory
(
document
,
status_dict
)
status_dict
[
variable
.
getTitle
()]
=
variable
.
getVariable
DefaultExpression
(
object
=
object
)
_updateWorkflowHistory
(
document
,
status_dict
)
def
_generateHistoryKey
(
workflow
):
"""
Generate a key used in the workflow history.
...
...
@@ -80,6 +81,46 @@ def getWorkflowHistory(state, document, remove_undo=0, remove_not_displayed=0):
else
:
result
.
append
(
x
.
copy
())
return
result
def
_updateWorkflowHistory
(
workflow
,
document
,
status_dict
):
"""
Change the state of the object.
"""
if
workflow
.
getPortalType
()
in
(
'Interaction Workflow'
,
'InteractionWorkflowDefinition'
):
return
# Create history attributes if needed
if
getattr
(
aq_base
(
document
),
'workflow_history'
,
None
)
is
None
:
document
.
workflow_history
=
PersistentMapping
()
# XXX this _p_changed is apparently not necessary
document
.
_p_changed
=
1
# Add an entry for the workflow in the history
workflow_key
=
workflow
.
getReference
()
if
not
document
.
workflow_history
.
has_key
(
workflow_key
):
document
.
workflow_history
[
workflow_key
]
=
()
# Update history
document
.
workflow_history
[
workflow_key
]
+=
(
status_dict
,)
# XXX this _p_changed marks the document modified, but only the
# PersistentMapping is modified
# document._p_changed = 1
# XXX this _p_changed is apparently not necessary
#document.workflow_history._p_changed = 1
def
undoTransition
(
state
,
document
):
"""
Reverse previous transition
"""
wh
=
getWorkflowHistory
(
state
,
document
,
remove_undo
=
1
)
status_dict
=
wh
[
-
2
]
# Update workflow state
state_bc_id
=
state
.
getParentValue
().
getStateBaseCategory
()
document
.
setCategoryMembership
(
state_bc_id
,
status_dict
[
state_bc_id
])
# Update workflow history
status_dict
[
'undo'
]
=
1
_updateWorkflowHistory
(
state
.
getParentValue
(),
document
,
status_dict
)
# XXX
LOG
(
"State, undo"
,
ERROR
,
"Variable (like DateTime) need to be updated!"
)
def
_checkPermission
(
transition
,
document
):
"""
Check if transition is allowed.
...
...
@@ -104,6 +145,90 @@ def getAvailableTransitionList(state, document):
if
value
:
result_list
.
append
(
transition
)
return
result_list
class
StateError
(
Exception
):
"""
Must call only an available transition
"""
pass
def
executeTransition
(
state
,
transition
,
document
,
form_kw
=
None
):
"""
Execute transition on the object.
"""
if
transition
not
in
getAvailableTransitionList
(
state
,
document
):
raise
StateError
else
:
execute
(
transition
,
document
,
form_kw
=
form_kw
)
def
_executeBeforeScript
(
self
,
document
,
form_kw
=
None
):
"""
Execute pre transition script.
"""
if
form_kw
is
None
:
form_kw
=
{}
script_id
=
getattr
(
self
.
aq_base
,
'before_script_id'
,
None
)
if
script_id
is
not
None
:
script
=
getattr
(
document
,
script_id
)
script
(
**
form_kw
)
def
_changeState
(
self
,
document
):
"""
Change the state of the object.
"""
state
=
self
.
getDestination
()
if
state
is
not
None
:
# Some transitions don't update the state
state_bc_id
=
self
.
getParentValue
().
getStateBaseCategory
()
document
.
setCategoryMembership
(
state_bc_id
,
state
)
def
_executeAfterScript
(
self
,
document
,
form_kw
=
None
):
"""
Execute post transition script.
"""
if
form_kw
is
None
:
form_kw
=
{}
script_id
=
getattr
(
self
.
aq_base
,
'after_script_id'
,
None
)
if
script_id
is
not
None
:
script
=
getattr
(
document
,
script_id
)
script
(
**
form_kw
)
def
execute
(
self
,
document
,
form_kw
=
None
):
"""
Execute transition.
"""
workflow
=
self
.
getParentValue
()
# Call the before script
_executeBeforeScript
(
self
,
document
)
# Modify the state
_changeState
(
self
,
document
)
# Get variable values
status_dict
=
workflow
.
getCurrentStatusDict
(
document
)
status_dict
[
'undo'
]
=
0
# Modify workflow history
state_bc_id
=
workflow
.
getStateBaseCategory
()
state_object
=
document
.
unrestrictedTraverse
(
document
.
getCategoryMembershipList
(
state_bc_id
)[
0
])
status_dict
[
state_bc_id
]
=
state_object
.
getReference
()
object_
=
workflow
.
getStateChangeInformation
(
document
,
state_object
,
transition
=
self
)
# Update all variables
for
variable
in
workflow
.
contentValues
(
portal_type
=
'Variable'
):
if
variable
.
getAutomaticUpdate
():
# if we have it in form get it from there
# otherwise use default
variable_title
=
variable
.
getTitle
()
if
variable_title
in
form_kw
:
status_dict
[
variable_title
]
=
form_kw
[
variable_title
]
else
:
status_dict
[
variable_title
]
=
variable
.
getInitialValue
(
object
=
object_
)
# Update all transition variables
if
form_kw
is
not
None
:
object_
.
REQUEST
.
other
.
update
(
form_kw
)
for
variable
in
self
.
contentValues
(
portal_type
=
'Transition Variable'
):
status_dict
[
variable
.
getCausalityTitle
()]
=
variable
.
getInitialValue
(
object
=
object_
)
_updateWorkflowHistory
(
workflow
,
document
,
status_dict
)
# Call the after script
_executeAfterScript
(
self
,
document
,
form_kw
=
form_kw
)
class
BusinessConfiguration
(
Item
):
"""
...
...
@@ -157,11 +282,11 @@ class BusinessConfiguration(Item):
def
initializeWorkflow
(
self
):
""" Initialize Related Workflow"""
workflow
=
self
.
getResourceValue
()
workflow_history
=
getattr
(
self
,
'workflow_history'
,
{})
if
workflow
is
None
:
return
if
self
.
getResource
()
not
in
workflow_history
:
workflow_history
=
getattr
(
self
,
'workflow_history'
,
{})
if
workflow
.
getReference
()
not
in
workflow_history
:
if
len
(
self
.
objectValues
(
"ERP5 Configuration Save"
))
>
0
:
raise
ValueError
(
"Business Configuration Cannot be initialized,
\
it contains one or more Configurator Save"
)
...
...
@@ -224,7 +349,7 @@ class BusinessConfiguration(Item):
## Add some variables so we can get use them in workflow after scripts
form_kw
[
'configuration_save_url'
]
=
configuration_save
.
getRelativeUrl
()
form_kw
[
'transition'
]
=
transition
.
getRelativeUrl
()
current_state
.
executeTransition
(
transition
,
self
,
form_kw
=
form_kw
)
executeTransition
(
current_state
,
transition
,
self
,
form_kw
=
form_kw
)
security
.
declarePrivate
(
'_displayNextForm'
)
def
_displayNextForm
(
self
,
\
...
...
@@ -319,7 +444,7 @@ class BusinessConfiguration(Item):
for
wh
in
workflow_history
:
## go one step back
current_state
=
self
.
getCurrentStateValue
()
current_state
.
undoTransition
(
self
)
undoTransition
(
current_state
,
self
)
if
not
wh
[
'transition'
]:
raise
ValueError
(
"Empty URL for transition in workflow history."
)
transition
=
self
.
unrestrictedTraverse
(
wh
[
'transition'
])
...
...
@@ -343,18 +468,21 @@ class BusinessConfiguration(Item):
current_state
=
self
.
getCurrentStateValue
()
transition
=
self
.
getNextTransition
()
next_state
=
self
.
unrestrictedTraverse
(
transition
.
getDestination
())
workflow
=
current_state
.
getParentValue
()
for
wh
in
getWorkflowHistory
(
current_state
,
self
):
if
next_state
==
self
.
unrestrictedTraverse
(
wh
[
'current_state'
]):
if
next_state
==
workflow
.
getStateValueById
(
wh
[
'current_state'
]):
configuration_save
=
self
.
unrestrictedTraverse
(
wh
[
'configuration_save_url'
])
return
configuration_save
security
.
declarePrivate
(
'_isAlreadyConfSaveInWorkflowHistory'
)
def
_isAlreadyConfSaveInWorkflowHistory
(
self
,
transition
):
""" check if we have an entry in worklow history for this state """
workflow_history
=
getWorkflowHistory
(
self
.
getCurrentStateValue
(),
self
,
remove_undo
=
1
)
current_state
=
self
.
getCurrentStateValue
()
workflow
=
current_state
.
getParentValue
()
workflow_history
=
getWorkflowHistory
(
current_state
,
self
,
remove_undo
=
1
)
workflow_history
.
reverse
()
for
wh
in
workflow_history
:
wh_state
=
self
.
unrestrictedTraverse
(
wh
[
'current_state'
])
wh_state
=
workflow
.
getStateValueById
(
wh
[
'current_state'
])
for
wh_transition
in
getAvailableTransitionList
(
wh_state
,
self
):
if
wh_transition
.
getTransitionFormId
()
is
not
None
and
\
wh_transition
!=
transition
:
...
...
bt5/erp5_configurator/ToolComponentTemplateItem/portal_components/tool.erp5.ConfiguratorTool.py
View file @
4877945b
...
...
@@ -143,7 +143,6 @@ class ConfiguratorTool(BaseTool):
response
=
{}
business_configuration
.
initializeWorkflow
()
## initial state no previous form to validate
if
business_configuration
.
isInitialConfigurationState
():
need_validation
=
0
...
...
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_displayEBusinessLotseDownload
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_ebusiness_lotse/WorkflowTemplateItem/portal_workflow/ebusiness_lotse_configuration_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_displayMaxmaDemoDownload
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_maxma_demo/WorkflowTemplateItem/portal_workflow/maxma_demo_configuration_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupMaxmaDemoStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_erp5_preferences.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupRunMyDocPreferences
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_organisation.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupRunMyDocOrganisation
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_user_accounts.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupRunMyDocList
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_configure_user_accounts_number.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupRunMyDocUserNumber
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_run_my_doc/WorkflowTemplateItem/portal_workflow/run_my_doc_configuration_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupRunMyDocStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_accounting.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupAccounting
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_categories.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_configureCategories
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_erp5_preferences.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupPreferences
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_organisation.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_configureConsultingOrganisation
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_roles.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_configurePortalTypeRoles
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_user_accounts.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupEmployeeList
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_configure_user_accounts_number.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupEmployeesNumber
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_displayDownload
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_consulting_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_accounting.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupAccounting
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_erp5_preferences.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupPreferences
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_organisation.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupOrganisation
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_user_accounts.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupEmployeeList
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_configure_user_accounts_number.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupEmployeesNumber
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_displayDownload
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_category.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupStandardCategory
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_portal_type_role.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupPortalTypeRole
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/erp5_standard_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_install.xml
View file @
4877945b
...
...
@@ -23,6 +23,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_setup_customer_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,10 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupCustomerBT5
</string>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
bt5/erp5_configurator_standard/WorkflowTemplateItem/portal_workflow/officejs_sdk_workflow/transition_setup_standard_bt5.xml
View file @
4877945b
...
...
@@ -23,6 +23,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
after_script_id
</string>
</key>
<value>
<string>
BusinessConfiguration_setupOfficeJSDevelopmentStandardBT5
</string>
</value>
</item>
<item>
<key>
<string>
before_script_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
...
...
product/ERP5Type/Core/InteractionWorkflow.py
View file @
4877945b
...
...
@@ -150,13 +150,6 @@ class InteractionWorkflow(Workflow):
def
getValidRoleList
(
self
):
return
sorted
(
self
.
getPortalObject
().
acl_users
.
valid_roles
())
security
.
declarePrivate
(
'_updateWorkflowHistory'
)
def
_updateWorkflowHistory
(
self
,
document
,
status_dict
):
"""
Stateless.
"""
return
security
.
declarePrivate
(
'getinteraction_workflowVariableMatchDict'
)
def
getWorklistVariableMatchDict
(
self
,
info
,
check_guard
=
True
):
return
None
...
...
product/ERP5Type/Core/State.py
View file @
4877945b
...
...
@@ -34,12 +34,6 @@ from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from
Products.ERP5Type.XMLMatrix
import
XMLMatrix
from
Products.ERP5Type.XMLObject
import
XMLObject
class
StateError
(
Exception
):
"""
Must call only an available transition
"""
pass
class
CustomStorageMatrixMixin
(
XMLMatrix
):
"""
Prototype of a mixin allowing to have custom storage for matrix
...
...
product/ERP5Type/Core/Workflow.py
View file @
4877945b
...
...
@@ -167,29 +167,6 @@ class Workflow(XMLObject):
except
(
ObjectDeleted
,
ObjectMoved
):
pass
def
_updateWorkflowHistory
(
self
,
document
,
status_dict
):
"""
Change the state of the object.
"""
# Create history attributes if needed
if
getattr
(
aq_base
(
document
),
'workflow_history'
,
None
)
is
None
:
document
.
workflow_history
=
PersistentMapping
()
# XXX this _p_changed is apparently not necessary
document
.
_p_changed
=
1
# Add an entry for the workflow in the history
workflow_key
=
self
.
getReference
()
if
not
document
.
workflow_history
.
has_key
(
workflow_key
):
document
.
workflow_history
[
workflow_key
]
=
()
# Update history
document
.
workflow_history
[
workflow_key
]
+=
(
status_dict
,)
# XXX this _p_changed marks the document modified, but only the
# PersistentMapping is modified
# document._p_changed = 1
# XXX this _p_changed is apparently not necessary
#document.workflow_history._p_changed = 1
security
.
declarePublic
(
'getDateTime'
)
def
getDateTime
(
self
):
"""
...
...
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