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
6e18b0f6
Commit
6e18b0f6
authored
Jul 04, 2019
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_pdm: add supply_cell_interaction_workflow
parent
22db9230
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
353 additions
and
0 deletions
+353
-0
bt5/erp5_pdm/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+16
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow.xml
...Item/portal_workflow/supply_cell_interaction_workflow.xml
+46
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/interactions.xml
...orkflow/supply_cell_interaction_workflow/interactions.xml
+28
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/interactions/SupplyCell_updateBasePrice.xml
...tion_workflow/interactions/SupplyCell_updateBasePrice.xml
+100
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts.xml
...tal_workflow/supply_cell_interaction_workflow/scripts.xml
+28
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts/SupplyCell_updateSliceBasePrice.py
...ction_workflow/scripts/SupplyCell_updateSliceBasePrice.py
+24
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts/SupplyCell_updateSliceBasePrice.xml
...tion_workflow/scripts/SupplyCell_updateSliceBasePrice.xml
+62
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/variables.xml
...l_workflow/supply_cell_interaction_workflow/variables.xml
+22
-0
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/worklists.xml
...l_workflow/supply_cell_interaction_workflow/worklists.xml
+22
-0
bt5/erp5_pdm/bt/template_portal_type_workflow_chain_list
bt5/erp5_pdm/bt/template_portal_type_workflow_chain_list
+4
-0
bt5/erp5_pdm/bt/template_workflow_id_list
bt5/erp5_pdm/bt/template_workflow_id_list
+1
-0
No files found.
bt5/erp5_pdm/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
6e18b0f6
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
<type>
Internal Supply
</type>
<type>
Internal Supply
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Internal Supply Cell
</type>
<workflow>
supply_cell_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Internal Supply Line
</type>
<type>
Internal Supply Line
</type>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
...
@@ -23,6 +27,10 @@
...
@@ -23,6 +27,10 @@
<type>
Purchase Supply
</type>
<type>
Purchase Supply
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Purchase Supply Cell
</type>
<workflow>
supply_cell_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Purchase Supply Line
</type>
<type>
Purchase Supply Line
</type>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
...
@@ -43,6 +51,10 @@
...
@@ -43,6 +51,10 @@
<type>
Sale Supply
</type>
<type>
Sale Supply
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Sale Supply Cell
</type>
<workflow>
supply_cell_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Sale Supply Line
</type>
<type>
Sale Supply Line
</type>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
...
@@ -51,6 +63,10 @@
...
@@ -51,6 +63,10 @@
<type>
Service
</type>
<type>
Service
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Supply Cell
</type>
<workflow>
supply_cell_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Supply Line
</type>
<type>
Supply Line
</type>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
<workflow>
edit_workflow, reindex_object_interaction_workflow, supply_line_interaction_workflow
</workflow>
...
...
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionWorkflowDefinition"
module=
"Products.ERP5.InteractionWorkflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
creation_guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
supply_cell_interaction_workflow
</string>
</value>
</item>
<item>
<key>
<string>
manager_bypass
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Supply Cell Interaction Workflow
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/interactions.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interactions
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/interactions/SupplyCell_updateBasePrice.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
SupplyCell_updateSliceBasePrice
</string>
</list>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupplyCell_updateBasePrice
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setBasePrice
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Scripts"
module=
"Products.DCWorkflow.Scripts"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
scripts
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts/SupplyCell_updateSliceBasePrice.py
0 → 100644
View file @
6e18b0f6
supply_cell
=
state_change
[
'object'
]
supply_line
=
supply_cell
.
getParentValue
()
quantity_criterion_list
=
[
criterion
for
criterion
in
supply_cell
.
getCriterionList
()
if
criterion
.
property
==
'quantity'
]
if
len
(
quantity_criterion_list
)
==
1
:
quantity_criterion
=
quantity_criterion_list
[
0
]
else
:
return
if
supply_cell
.
getParentValue
().
isBasePricePerSlice
():
quantity_step_list
=
[
None
]
+
supply_line
.
getQuantityStepList
(
base_id
=
'path'
)
+
[
None
]
try
:
index
=
quantity_step_list
.
index
(
quantity_criterion
.
min
)
except
KeyError
:
# _range_criterion is set to {} if criterion is None
index
=
0
min_quantity
=
quantity_step_list
[
index
]
max_quantity
=
quantity_step_list
[
index
+
1
]
supply_cell
.
setSliceQuantityRange
((
min_quantity
,
max_quantity
))
supply_cell
.
setSliceBasePrice
(
supply_cell
.
getBasePrice
())
else
:
supply_cell
.
setSliceQuantityRange
(
None
)
supply_cell
.
setSliceBasePrice
(
None
)
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/scripts/SupplyCell_updateSliceBasePrice.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupplyCell_updateSliceBasePrice
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/variables.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Variables"
module=
"Products.DCWorkflow.Variables"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variables
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/supply_cell_interaction_workflow/worklists.xml
0 → 100644
View file @
6e18b0f6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Worklists"
module=
"Products.DCWorkflow.Worklists"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
worklists
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/bt/template_portal_type_workflow_chain_list
View file @
6e18b0f6
Component | edit_workflow
Component | edit_workflow
Component | validation_workflow
Component | validation_workflow
Internal Supply Cell | supply_cell_interaction_workflow
Internal Supply Line | edit_workflow
Internal Supply Line | edit_workflow
Internal Supply Line | reindex_object_interaction_workflow
Internal Supply Line | reindex_object_interaction_workflow
Internal Supply Line | supply_line_interaction_workflow
Internal Supply Line | supply_line_interaction_workflow
...
@@ -9,6 +10,7 @@ Measure | conversion_interaction_workflow
...
@@ -9,6 +10,7 @@ Measure | conversion_interaction_workflow
Measure | edit_workflow
Measure | edit_workflow
Product | edit_workflow
Product | edit_workflow
Product | validation_workflow
Product | validation_workflow
Purchase Supply Cell | supply_cell_interaction_workflow
Purchase Supply Line | edit_workflow
Purchase Supply Line | edit_workflow
Purchase Supply Line | reindex_object_interaction_workflow
Purchase Supply Line | reindex_object_interaction_workflow
Purchase Supply Line | supply_line_interaction_workflow
Purchase Supply Line | supply_line_interaction_workflow
...
@@ -21,6 +23,7 @@ Quantity Unit Conversion Group | conversion_interaction_workflow
...
@@ -21,6 +23,7 @@ Quantity Unit Conversion Group | conversion_interaction_workflow
Quantity Unit Conversion Group | edit_workflow
Quantity Unit Conversion Group | edit_workflow
Quantity Unit Conversion Group | validation_workflow
Quantity Unit Conversion Group | validation_workflow
Resource Measures Consistency Constraint | dynamic_class_generation_interaction_workflow
Resource Measures Consistency Constraint | dynamic_class_generation_interaction_workflow
Sale Supply Cell | supply_cell_interaction_workflow
Sale Supply Line | edit_workflow
Sale Supply Line | edit_workflow
Sale Supply Line | reindex_object_interaction_workflow
Sale Supply Line | reindex_object_interaction_workflow
Sale Supply Line | supply_line_interaction_workflow
Sale Supply Line | supply_line_interaction_workflow
...
@@ -28,6 +31,7 @@ Sale Supply | edit_workflow
...
@@ -28,6 +31,7 @@ Sale Supply | edit_workflow
Sale Supply | validation_workflow
Sale Supply | validation_workflow
Service | edit_workflow
Service | edit_workflow
Service | validation_workflow
Service | validation_workflow
Supply Cell | supply_cell_interaction_workflow
Supply Line | edit_workflow
Supply Line | edit_workflow
Supply Line | reindex_object_interaction_workflow
Supply Line | reindex_object_interaction_workflow
Supply Line | supply_line_interaction_workflow
Supply Line | supply_line_interaction_workflow
...
...
bt5/erp5_pdm/bt/template_workflow_id_list
View file @
6e18b0f6
conversion_interaction_workflow
conversion_interaction_workflow
supply_cell_interaction_workflow
supply_line_interaction_workflow
supply_line_interaction_workflow
transformation_interaction_workflow
transformation_interaction_workflow
\ No newline at end of file
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