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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
erp5
Commits
0c9d9206
Commit
0c9d9206
authored
Apr 25, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Amount Generator: typos
parent
420d14f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
product/ERP5/mixin/amount_generator.py
product/ERP5/mixin/amount_generator.py
+8
-8
No files found.
product/ERP5/mixin/amount_generator.py
View file @
0c9d9206
...
@@ -38,7 +38,7 @@ from Products.ERP5.Document.MappedValue import MappedValue
...
@@ -38,7 +38,7 @@ from Products.ERP5.Document.MappedValue import MappedValue
# XXX What should be done when there is no base_application ?
# XXX What should be done when there is no base_application ?
# There are 2 options:
# There are 2 options:
# 1. Make the amount generator line always apply, once, which provides an
# 1. Make the amount generator line always apply, once, which provides an
# easy way to generat
or
a fixed quantity.
# easy way to generat
e
a fixed quantity.
# 2. Use this criterion to know if a movement was created manually.
# 2. Use this criterion to know if a movement was created manually.
# This is required to not generate amounts from movements that
# This is required to not generate amounts from movements that
# are already the result of generated amounts.
# are already the result of generated amounts.
...
@@ -106,12 +106,12 @@ class BaseAmountDict(Implicit):
...
@@ -106,12 +106,12 @@ class BaseAmountDict(Implicit):
getGeneratedAmountQuantity__roles__
=
None
# public
getGeneratedAmountQuantity__roles__
=
None
# public
def
getGeneratedAmountQuantity
(
self
,
base_amount
,
variation_category_list
=
()):
def
getGeneratedAmountQuantity
(
self
,
base_amount
,
variation_category_list
=
()):
"""Get final computed quantity for given base_amount
"""Get final computed quantity for
the
given base_amount
Note: During a call to getQuantity, this method may be called again by
If not yet finalized, this method actually calls the (custom) method that
getGeneratedAmountQuantity for the same amount and key.
actually computes the final quantity, which in turn usually calls this
In this case, the returned value is the last intermediate value just
method again, for the same amount and key: in this case, the returned value
before finalization.
of this inner call is the last intermediate value just
before finalization.
"""
"""
variated_base_amount
=
base_amount
,
variation_category_list
variated_base_amount
=
base_amount
,
variation_category_list
if
variated_base_amount
in
self
.
_frozen
:
if
variated_base_amount
in
self
.
_frozen
:
...
@@ -170,7 +170,7 @@ class AmountGeneratorMixin:
...
@@ -170,7 +170,7 @@ class AmountGeneratorMixin:
- is rounding really well supported (ie. before and after aggregation)
- is rounding really well supported (ie. before and after aggregation)
very likely not - proxying before or after must be decided
very likely not - proxying before or after must be decided
"""
"""
# It is the only place we can import this
# It is the only place w
here w
e can import this
from
Products.ERP5Type.Document
import
newTempAmount
from
Products.ERP5Type.Document
import
newTempAmount
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
getRoundingProxy
=
portal
.
portal_roundings
.
getRoundingProxy
getRoundingProxy
=
portal
.
portal_roundings
.
getRoundingProxy
...
@@ -289,7 +289,7 @@ class AmountGeneratorMixin:
...
@@ -289,7 +289,7 @@ class AmountGeneratorMixin:
# Ignore line (i.e. self) if cells produce unrelated amounts.
# Ignore line (i.e. self) if cells produce unrelated amounts.
# With Transformed Resource (Transformation), line is considered in
# With Transformed Resource (Transformation), line is considered in
# order to gather common properties and cells are used to describe
# order to gather common properties and cells are used to describe
# varia
n
ted properties: only 1 amount is produced.
# variated properties: only 1 amount is produced.
# In cases like trade, payroll or assorted resources,
# In cases like trade, payroll or assorted resources,
# we want to ignore the line if they are cells.
# we want to ignore the line if they are cells.
# See also implementations of 'getCellAggregateKey'
# See also implementations of 'getCellAggregateKey'
...
...
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