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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
4c00ed34
Commit
4c00ed34
authored
Apr 21, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplified_invoicing: pylint py3
parent
bef0d5dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.py
...ateItem/portal_components/test.erp5.testTradeModelLine.py
+18
-20
No files found.
bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.py
View file @
4c00ed34
...
@@ -401,12 +401,11 @@ class TestTradeModelLine(TestTradeModelLineMixin):
...
@@ -401,12 +401,11 @@ class TestTradeModelLine(TestTradeModelLineMixin):
kw
=
{}
kw
=
{}
for
reference
,
result
in
six
.
iteritems
(
expected_result_dict
):
for
reference
,
result
in
six
.
iteritems
(
expected_result_dict
):
total_price
=
result
.
get
(
movement_id
)
or
0.0
total_price
=
result
.
get
(
movement_id
)
or
0.0
if
True
:
model_line
=
self
[
'trade_model_line/'
+
reference
]
model_line
=
self
[
'trade_model_line/'
+
reference
]
kw
[
reference
]
=
dict
(
total_price
=
total_price
,
kw
[
reference
]
=
dict
(
total_price
=
total_price
,
causality_value_list
=
[
model_line
],
causality_value_list
=
[
model_line
],
base_application_list
=
model_line
.
getBaseApplicationList
(),
base_application_list
=
model_line
.
getBaseApplicationList
(),
base_contribution_list
=
model_line
.
getBaseContributionList
())
base_contribution_list
=
model_line
.
getBaseContributionList
())
self
.
getAggregatedAmountDict
(
movement
,
**
kw
)
self
.
getAggregatedAmountDict
(
movement
,
**
kw
)
check
(
order
,
None
)
check
(
order
,
None
)
...
@@ -427,20 +426,19 @@ class TestTradeModelLine(TestTradeModelLineMixin):
...
@@ -427,20 +426,19 @@ class TestTradeModelLine(TestTradeModelLineMixin):
len
(
result_dict
))
len
(
result_dict
))
for
use
in
'discount'
,
'tax'
:
for
use
in
'discount'
,
'tax'
:
total_price
=
expected_result_dict
[
use
].
get
(
line
.
getId
())
or
0.0
total_price
=
expected_result_dict
[
use
].
get
(
line
.
getId
())
or
0.0
if
True
:
sm
=
result_dict
.
pop
(
use
)
sm
=
result_dict
.
pop
(
use
)
self
.
assertEqual
(
round
(
sm
.
getTotalPrice
()
or
0.0
,
currency_precision
),
round
(
total_price
,
currency_precision
))
self
.
assertEqual
(
round
(
sm
.
getTotalPrice
()
or
0.0
,
currency_precision
),
round
(
total_price
,
currency_precision
))
self
.
assertEqual
(
3
,
len
(
sm
.
getCausalityValueList
()))
self
.
assertEqual
(
3
,
len
(
sm
.
getCausalityValueList
()))
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
portal_type
=
self
.
business_link_portal_type
)))
portal_type
=
self
.
business_link_portal_type
)))
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
portal_type
=
self
.
trade_model_path_portal_type
)))
portal_type
=
self
.
trade_model_path_portal_type
)))
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
self
.
assertEqual
(
1
,
len
(
sm
.
getCausalityValueList
(
portal_type
=
'Trade Model Line'
)))
portal_type
=
'Trade Model Line'
)))
self
.
assertEqual
(
sm
.
getBaseApplicationList
(),
self
.
assertEqual
(
sm
.
getBaseApplicationList
(),
[
'base_amount/'
+
use
])
[
'base_amount/'
+
use
])
self
.
assertEqual
(
sm
.
getBaseContributionList
(),
self
.
assertEqual
(
sm
.
getBaseContributionList
(),
dict
(
discount
=
[
'base_amount/tax'
],
tax
=
[])[
use
])
dict
(
discount
=
[
'base_amount/tax'
],
tax
=
[])[
use
])
self
.
assertEqual
({},
result_dict
)
self
.
assertEqual
({},
result_dict
)
def
checkCausalityState
(
self
,
delivery
,
state
):
def
checkCausalityState
(
self
,
delivery
,
state
):
...
...
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