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
6430ccc3
Commit
6430ccc3
authored
Dec 13, 2017
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amount_generator: getBaseAmountQuantity method can differ per amount generator line.
parent
d013710a
Changes
1
Hide 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 @
6430ccc3
...
@@ -149,16 +149,17 @@ class BaseAmountDict(Implicit):
...
@@ -149,16 +149,17 @@ class BaseAmountDict(Implicit):
return
value
return
value
def
_getGeneratedAmountQuantity
(
self
,
base_amount
,
variation_category_list
):
def
_getGeneratedAmountQuantity
(
self
,
base_amount
,
variation_category_list
):
amount_generator_line
=
self
.
aq_base
.
_amount_generator_line
try
:
try
:
method
=
self
.
_cache
[
base_amount
]
method
=
self
.
_cache
[
(
amount_generator_line
,
base_amount
)
]
except
KeyError
:
except
KeyError
:
method
=
self
.
aq_base
.
_
amount_generator_line
.
_getTypeBasedMethod
(
method
=
amount_generator_line
.
_getTypeBasedMethod
(
'getBaseAmountQuantityMethod'
)
'getBaseAmountQuantityMethod'
)
if
method
is
not
None
:
if
method
is
not
None
:
method
=
method
(
base_amount
)
method
=
method
(
base_amount
)
if
method
is
None
:
if
method
is
None
:
method
=
self
.
aq_base
.
_
amount_generator_line
.
getBaseAmountQuantity
method
=
amount_generator_line
.
getBaseAmountQuantity
self
.
_cache
[
base_amount
]
=
method
self
.
_cache
[
(
amount_generator_line
,
base_amount
)
]
=
method
if
variation_category_list
:
if
variation_category_list
:
kw
=
dict
(
self
.
_method_kw
,
kw
=
dict
(
self
.
_method_kw
,
variation_category_list
=
variation_category_list
)
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