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
7ca79462
Commit
7ca79462
authored
Jun 24, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configurator_standard: check inventory conversion with measure and unit/piece
parent
e77effb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
...components/test.erp5.testStandardConfigurationWorkflow.py
+55
-0
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
View file @
7ca79462
...
@@ -917,6 +917,60 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -917,6 +917,60 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
resource_uid
=
resource
.
getUid
(),
resource_uid
=
resource
.
getUid
(),
node_uid
=
node
.
getUid
()))
node_uid
=
node
.
getUid
()))
def
stepCheckMeasureConversion
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
resource
=
self
.
portal
.
product_module
.
newContent
(
portal_type
=
'Product'
,
quantity_unit_value
=
self
.
portal
.
portal_categories
.
quantity_unit
.
unit
.
piece
)
resource
.
newContent
(
portal_type
=
'Measure'
,
metric_type_value
=
self
.
portal
.
portal_categories
.
metric_type
.
mass
,
quantity_unit_value
=
self
.
portal
.
portal_categories
.
quantity_unit
.
mass
.
kilogram
,
quantity
=
3
,
)
node
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
purchase_trade_condition_value_list
=
self
.
getBusinessConfigurationObjectList
(
sequence
[
'business_configuration'
],
'Purchase Trade Condition'
)
self
.
assertNotEqual
(
len
(
purchase_trade_condition_value_list
),
0
)
purchase_trade_condition_value
=
purchase_trade_condition_value_list
[
0
]
delivery
=
self
.
portal
.
purchase_packing_list_module
.
newContent
(
portal_type
=
'Purchase Packing List'
,
start_date
=
'2010-01-26'
,
price_currency
=
'currency_module/EUR'
,
destination_value
=
node
,
destination_section_value
=
node
,
specialise_value
=
purchase_trade_condition_value
)
delivery
.
newContent
(
portal_type
=
'Purchase Packing List Line'
,
resource_value
=
resource
,
quantity
=
5
)
delivery
.
confirm
()
delivery
.
start
()
delivery
.
stop
()
self
.
tic
()
self
.
assertEqual
(
5
,
self
.
portal
.
portal_simulation
.
getCurrentInventory
(
resource_uid
=
resource
.
getUid
(),
node_uid
=
node
.
getUid
()))
self
.
assertEqual
(
5
,
self
.
portal
.
portal_simulation
.
getCurrentInventory
(
quantity_unit
=
'unit/piece'
,
resource_uid
=
resource
.
getUid
(),
node_uid
=
node
.
getUid
()))
self
.
assertEqual
(
15
,
self
.
portal
.
portal_simulation
.
getCurrentInventory
(
quantity_unit
=
'mass/kilogram'
,
resource_uid
=
resource
.
getUid
(),
node_uid
=
node
.
getUid
()))
self
.
assertEqual
(
15000
,
self
.
portal
.
portal_simulation
.
getCurrentInventory
(
quantity_unit
=
'mass/gram'
,
resource_uid
=
resource
.
getUid
(),
node_uid
=
node
.
getUid
()))
def
stepConfiguredPropertySheets
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepConfiguredPropertySheets
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""
"""
Configurator can configure some PropertySheets.
Configurator can configure some PropertySheets.
...
@@ -1389,6 +1443,7 @@ class TestStandardConfiguratorWorkflow(StandardConfigurationMixin):
...
@@ -1389,6 +1443,7 @@ class TestStandardConfiguratorWorkflow(StandardConfigurationMixin):
stepCheckInstanceIsConfigured%(country)s
stepCheckInstanceIsConfigured%(country)s
stepTic
stepTic
stepCheckQuantityConversion
stepCheckQuantityConversion
stepCheckMeasureConversion
"""
+
\
"""
+
\
StandardConfigurationMixin
.
AFTER_CONFIGURATION_SEQUENCE
+
\
StandardConfigurationMixin
.
AFTER_CONFIGURATION_SEQUENCE
+
\
StandardConfigurationMixin
.
SECURITY_CONFIGURATION_SEQUENCE
StandardConfigurationMixin
.
SECURITY_CONFIGURATION_SEQUENCE
...
...
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