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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
ff4cfa91
Commit
ff4cfa91
authored
Aug 24, 2012
by
Jean-Paul Smets
Committed by
Xiaowu Zhang
Feb 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a comment to explain why there is a mixup of kw arguments in getPrice API
parent
c803a430
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ERP5/Document/Movement.py
product/ERP5/Document/Movement.py
+2
-2
No files found.
product/ERP5/Document/Movement.py
View file @
ff4cfa91
...
@@ -264,12 +264,12 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
...
@@ -264,12 +264,12 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
# the good-old-days way (which only returns a final result).
# the good-old-days way (which only returns a final result).
if
context
is
None
:
if
context
is
None
:
context
=
self
context
=
self
method
=
context
.
_getTypeBasedMethod
(
'getPriceCalculationOperandDict'
)
method
=
context
.
_getTypeBasedMethod
(
'getPriceCalculationOperandDict'
)
# Why on the context ???? nonsense ZAWEE
if
method
is
None
:
if
method
is
None
:
# Try this, because when the context is an instance of a derived
# Try this, because when the context is an instance of a derived
# class of Movement, Movement_getPriceCalculationOperandDict is
# class of Movement, Movement_getPriceCalculationOperandDict is
# not searched.
# not searched.
method
=
getattr
(
context
,
'Movement_getPriceCalculationOperandDict'
,
None
)
method
=
getattr
(
context
,
'Movement_getPriceCalculationOperandDict'
,
None
)
# XXX-JPS should be getTypedBased on self ZAWEE
if
method
is
not
None
:
if
method
is
not
None
:
operand_dict
=
method
(
**
kw
)
operand_dict
=
method
(
**
kw
)
if
operand_dict
is
None
:
if
operand_dict
is
None
:
...
...
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