Commit 7d17baa2 authored by Aurel's avatar Aurel

code improvement : check reference when needed

parent 48124c43
...@@ -62,12 +62,14 @@ total_price = 0\n ...@@ -62,12 +62,14 @@ total_price = 0\n
movement_list = context.getMovementList(portal_type=(\'Pay Sheet Line\', \'Pay Sheet Cell\'))\n movement_list = context.getMovementList(portal_type=(\'Pay Sheet Line\', \'Pay Sheet Cell\'))\n
for movement in movement_list:\n for movement in movement_list:\n
# Reference must be checked on line\n # Reference must be checked on line\n
if "Cell" in movement.getPortalType():\n if excluded_reference_list:\n
line = movement.getParentValue()\n if "Cell" in movement.getPortalType():\n
else:\n line = movement.getParentValue()\n
line = movement\n else:\n
if line.getReference() in excluded_reference_list:\n line = movement\n
continue\n if line.getReference() in excluded_reference_list:\n
continue\n
\n
if base_contribution is not None and movement.isMemberOf(base_contribution) or no_base_contribution:\n if base_contribution is not None and movement.isMemberOf(base_contribution) or no_base_contribution:\n
\n \n
# base_contribution is mandatory, but not contribution_share. If contribution_share is\n # base_contribution is mandatory, but not contribution_share. If contribution_share is\n
......
587 588
\ No newline at end of file \ No newline at end of file
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