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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
e45a9201
Commit
e45a9201
authored
Dec 18, 2024
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_immobilisation: Fixup identation and unused vars
parent
98ef8037
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
980 additions
and
982 deletions
+980
-982
bt5/erp5_immobilisation/DocumentTemplateItem/portal_components/document.erp5.AmortisationRule.py
...eItem/portal_components/document.erp5.AmortisationRule.py
+980
-982
No files found.
bt5/erp5_immobilisation/DocumentTemplateItem/portal_components/document.erp5.AmortisationRule.py
View file @
e45a9201
...
...
@@ -33,7 +33,6 @@ from erp5.component.module.DateUtils import centis, getClosestDate, addToDate
from
erp5.component.module.DateUtils
import
getDecimalNumberOfYearsBetween
from
Products.ERP5Type
import
Permissions
from
erp5.component.mixin.RuleMixin
import
RuleMixin
from
Products.CMFCore.utils
import
getToolByName
from
erp5.component.document.ImmobilisationMovement
import
NO_CHANGE_METHOD
class
AmortisationRule
(
RuleMixin
):
...
...
@@ -293,7 +292,6 @@ class AmortisationRule(RuleMixin):
# of the applied rule, but which have not been aggregated.
to_delete_id_list
=
[]
aggregated_period_dict
=
{}
portal_workflow
=
getToolByName
(
self
,
'portal_workflow'
)
for
movement
in
applied_rule
.
contentValues
():
movement_id
=
movement
.
getId
()
movement_id_name
=
'_'
.
join
(
movement_id
.
split
(
'_'
)[:
-
2
]
)
...
...
@@ -743,10 +741,10 @@ class AmortisationRule(RuleMixin):
start_movement
=
immo_period
.
get
(
'start_movement'
)
start_date
=
immo_period
.
get
(
'start_date'
)
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_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'
)
section
=
immo_period
.
get
(
'owner'
)
continuous
=
immo_period
.
get
(
'continuous'
)
...
...
@@ -823,9 +821,9 @@ class AmortisationRule(RuleMixin):
# Build previous period unimmobilisation
if
build_unimmo
:
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_start_movement
=
previous_period
[
'start_movement'
]
#
previous_start_movement = previous_period['start_movement']
previous_section
=
previous_owner
previous_currency
=
previous_section
.
getPriceCurrency
()
if
previous_currency
is
not
None
:
...
...
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