Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
9af919a4
Commit
9af919a4
authored
Dec 13, 2017
by
Kazuhiko Shiozaki
Committed by
Boxiang Sun
Dec 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amount_generator: getBaseAmountQuantity method can differ per amount generator line.
parent
b00724cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
product/ERP5/mixin/amount_generator.py
product/ERP5/mixin/amount_generator.py
+5
-4
No files found.
product/ERP5/mixin/amount_generator.py
View file @
9af919a4
...
...
@@ -149,16 +149,17 @@ class BaseAmountDict(Implicit):
return
value
def
_getGeneratedAmountQuantity
(
self
,
base_amount
,
variation_category_list
):
amount_generator_line
=
self
.
aq_base
.
_amount_generator_line
try
:
method
=
self
.
_cache
[
base_amount
]
method
=
self
.
_cache
[
(
amount_generator_line
,
base_amount
)
]
except
KeyError
:
method
=
self
.
aq_base
.
_
amount_generator_line
.
_getTypeBasedMethod
(
method
=
amount_generator_line
.
_getTypeBasedMethod
(
'getBaseAmountQuantityMethod'
)
if
method
is
not
None
:
method
=
method
(
base_amount
)
if
method
is
None
:
method
=
self
.
aq_base
.
_
amount_generator_line
.
getBaseAmountQuantity
self
.
_cache
[
base_amount
]
=
method
method
=
amount_generator_line
.
getBaseAmountQuantity
self
.
_cache
[
(
amount_generator_line
,
base_amount
)
]
=
method
if
variation_category_list
:
kw
=
dict
(
self
.
_method_kw
,
variation_category_list
=
variation_category_list
)
...
...
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