Commit 7f28d7a6 authored by Fabien Morin's avatar Fabien Morin

- now interfaces.IVariated is zope3

- typo (remove unused spaces)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27544 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c08f5508
......@@ -60,7 +60,7 @@ class EmploymentContract(SubscriptionItem):
def assertMovementExists(self, applied_rule, start_date):
"""
a movment exist if there is already a movement with the same
a movment exist if there is already a movement with the same
start_date and stop_date
"""
movement_id = 'movement_%s_%s' % (start_date.year(), start_date.month())
......@@ -69,7 +69,7 @@ class EmploymentContract(SubscriptionItem):
def expandOpenOrderRule(self, applied_rule, force=0, **kw):
"""
Expand tries to find all applicable supply path and all
applicable transformations.
applicable transformations.
"""
number_of_months_in_year = 12
......
......@@ -40,10 +40,10 @@ import zope.interface
class TradeModelLine(Predicate, XMLMatrix, Amount):
"""Trade Model Line is a way to represent trade transformation for movements
TODO:
- make this code readable
- use comments
- use docstrings
TODO:
- make this code readable
- use comments
- use docstrings
"""
meta_type = 'ERP5 Trade Model Line'
portal_type = 'Trade Model Line'
......@@ -53,9 +53,9 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
# interfaces.IVariated - as soon as interfaces.IVariated will be zope3
zope.interface.implements(
interfaces.ITransformation
interfaces.ITransformation,
interfaces.IVariated
)
# Declarative properties
......@@ -182,13 +182,13 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
self.getQuantity(None) is None or \
len(self.getVariationCategoryList()) and \
tmp_movement.getQuantity(None) is None:
# if the quantity is not defined, that mean we should search on
# if the quantity is not defined, that mean we should search on
# all movements with correponding base_amount (if we use cells, we
# have to look on cells, if we don't, look on self)
for movement in movement_list:
if set(base_application_list)\
.intersection(set(movement.getBaseContributionList())):
# if the movement have no variation category, it's the same as
# if the movement have no variation category, it's the same as
# if he have all variation categories
if len(movement.getVariationCategoryList()) == 0 or \
set(movement.getVariationCategoryList()).intersection(\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment