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
Labels
Merge Requests
146
Merge Requests
146
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
80597721
Commit
80597721
authored
Jul 04, 2019
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testResource: updaet
parent
7cbe104e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
product/ERP5/tests/testResource.py
product/ERP5/tests/testResource.py
+16
-17
No files found.
product/ERP5/tests/testResource.py
View file @
80597721
...
...
@@ -1146,15 +1146,14 @@ class TestResource(ERP5TypeTestCase):
)
product
.
validate
()
sale_trade_condition_module
=
self
.
portal
.
getDefaultModule
(
'Sale Trade Condition'
)
sale_trade_condition
=
sale_trade_condition_module
.
newContent
(
portal_type
=
'Sale Trade Condition'
,
sale_supply
=
self
.
portal
.
getDefaultModule
(
self
.
sale_supply_portal_type
).
newContent
(
self
.
sale_supply_portal_type
,
base_price_per_slice
=
True
,
)
supply_line
=
sale_
trade_condition
.
newContent
(
supply_line
=
sale_
supply
.
newContent
(
portal_type
=
self
.
sale_supply_line_portal_type
,
resource_value
=
product
,
base_unit_price
=
0.00001
,
...
...
@@ -1165,40 +1164,40 @@ class TestResource(ERP5TypeTestCase):
cell0
=
supply_line
.
newContent
(
portal_type
=
self
.
sale_supply_cell_portal_type
,
id
=
'path_0'
,
slice
d
_base_price
=
10.
,
slice
d
_range
=
(
1
,
11
),
slice_base_price
=
10.
,
slice
_quantity
_range
=
(
1
,
11
),
)
cell0
.
setCriterionPropertyList
((
'quantity'
,
))
cell0
.
setCriterion
(
'quantity'
,
min
=
1
,
max
=
None
)
cell0
.
setMappedValuePropertyList
(
[
"slice
d_base_price"
,
"sliced_rang
e"
,
"base_unit_price"
]
[
"slice
_base_price"
,
"slice_quantity_range"
,
"base_pric
e"
,
"base_unit_price"
]
)
cell1
=
supply_line
.
newContent
(
portal_type
=
self
.
sale_supply_cell_portal_type
,
id
=
'path_1'
,
slice
d
_base_price
=
9.
,
slice
d
_range
=
(
11
,
21
),
slice_base_price
=
9.
,
slice
_quantity
_range
=
(
11
,
21
),
)
cell1
.
setCriterionPropertyList
((
'quantity'
,
))
cell1
.
setCriterion
(
'quantity'
,
min
=
11
,
max
=
None
)
cell1
.
setMappedValuePropertyList
(
[
"slice
d_base_price"
,
"sliced_rang
e"
,
"base_unit_price"
]
[
"slice
_base_price"
,
"slice_quantity_range"
,
"base_pric
e"
,
"base_unit_price"
]
)
cell2
=
supply_line
.
newContent
(
portal_type
=
self
.
sale_supply_cell_portal_type
,
id
=
'path_2'
,
slice
d
_base_price
=
8.
,
slice
d
_range
=
(
21
,
None
),
slice_base_price
=
8.
,
slice
_quantity
_range
=
(
21
,
None
),
)
cell2
.
setCriterionPropertyList
((
'quantity'
,
))
cell2
.
setCriterion
(
'quantity'
,
min
=
21
,
max
=
None
)
cell2
.
setMappedValuePropertyList
(
[
"slice
d_base_price"
,
"sliced_rang
e"
,
"base_unit_price"
]
[
"slice
_base_price"
,
"slice_quantity_range"
,
"base_pric
e"
,
"base_unit_price"
]
)
sale_
trade_condition
.
validate
()
sale_
supply
.
validate
()
self
.
tic
()
currency_module
=
self
.
portal
.
getDefaultModule
(
"Currency"
)
...
...
@@ -1210,7 +1209,7 @@ class TestResource(ERP5TypeTestCase):
sale_order
=
self
.
portal
.
getDefaultModule
(
"Sale Order"
).
newContent
(
portal_type
=
'Sale Order'
,
specialise_value
=
sale_
trade_condition
,
specialise_value
=
sale_
supply
,
resource_value
=
currency
,
)
...
...
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