Commit 23fcfc0c authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_immobilisation: Fixup identation and unused vars

parent 4030ee73
...@@ -33,7 +33,6 @@ from erp5.component.module.DateUtils import centis, getClosestDate, addToDate ...@@ -33,7 +33,6 @@ from erp5.component.module.DateUtils import centis, getClosestDate, addToDate
from erp5.component.module.DateUtils import getDecimalNumberOfYearsBetween from erp5.component.module.DateUtils import getDecimalNumberOfYearsBetween
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from erp5.component.mixin.RuleMixin import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.CMFCore.utils import getToolByName
from erp5.component.document.ImmobilisationMovement import NO_CHANGE_METHOD from erp5.component.document.ImmobilisationMovement import NO_CHANGE_METHOD
class AmortisationRule(RuleMixin): class AmortisationRule(RuleMixin):
...@@ -293,7 +292,6 @@ class AmortisationRule(RuleMixin): ...@@ -293,7 +292,6 @@ class AmortisationRule(RuleMixin):
# of the applied rule, but which have not been aggregated. # of the applied rule, but which have not been aggregated.
to_delete_id_list = [] to_delete_id_list = []
aggregated_period_dict = {} aggregated_period_dict = {}
portal_workflow = getToolByName(self, 'portal_workflow')
for movement in applied_rule.contentValues(): for movement in applied_rule.contentValues():
movement_id = movement.getId() movement_id = movement.getId()
movement_id_name = '_'.join( movement_id.split('_')[:-2] ) movement_id_name = '_'.join( movement_id.split('_')[:-2] )
...@@ -743,10 +741,10 @@ class AmortisationRule(RuleMixin): ...@@ -743,10 +741,10 @@ class AmortisationRule(RuleMixin):
start_movement = immo_period.get('start_movement') start_movement = immo_period.get('start_movement')
start_date = immo_period.get('start_date') start_date = immo_period.get('start_date')
start_method = immo_period.get('start_method') start_method = immo_period.get('start_method')
initial_method = immo_period.get('initial_method') # initial_method = immo_period.get('initial_method')
initial_date = immo_period.get('initial_date') initial_date = immo_period.get('initial_date')
initial_duration = immo_period.get('initial_duration') initial_duration = immo_period.get('initial_duration')
disposal_price = immo_period.get('initial_disposal_price') # disposal_price = immo_period.get('initial_disposal_price')
initial_price = immo_period.get('initial_price') initial_price = immo_period.get('initial_price')
section = immo_period.get('owner') section = immo_period.get('owner')
continuous = immo_period.get('continuous') continuous = immo_period.get('continuous')
...@@ -823,9 +821,9 @@ class AmortisationRule(RuleMixin): ...@@ -823,9 +821,9 @@ class AmortisationRule(RuleMixin):
# Build previous period unimmobilisation # Build previous period unimmobilisation
if build_unimmo: if build_unimmo:
previous_initial_price = previous_period['initial_price'] previous_initial_price = previous_period['initial_price']
previous_start_date = previous_period['start_date'] # previous_start_date = previous_period['start_date']
previous_stop_date = previous_period['stop_date'] previous_stop_date = previous_period['stop_date']
previous_start_movement = previous_period['start_movement'] # previous_start_movement = previous_period['start_movement']
previous_section = previous_owner previous_section = previous_owner
previous_currency = previous_section.getPriceCurrency() previous_currency = previous_section.getPriceCurrency()
if previous_currency is not None: if previous_currency is not None:
......
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