Commit 4c2075aa authored by Łukasz Nowak's avatar Łukasz Nowak

Setup specialise like causality.

parent 0690df1b
......@@ -88,19 +88,28 @@ invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
after_tag=plan_tag).updateCausalityState()\n
\n
# update casuality from movements\n
# update casuality and specialise from movements\n
causality_list = invoice.getCausalityList()\n
causality_list.sort()\n
specialise_list = invoice.getSpecialiseList()\n
specialise_list.sort()\n
\n
modified = 0\n
for movement in invoice.getMovementList(portal_type=\'Invoice Line\'):\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
movement_specialise = movement.getSpecialise()\n
if movement_specialise not in specialise_list:\n
modified = 1\n
specialise_list.append(movement_specialise)\n
\n
if modified:\n
causality_list.sort()\n
specialise_list.sort()\n
invoice.setCausalityList(causality_list)\n
invoice.setSpecialiseList(specialise_list)\n
</string> </value>
</item>
<item>
......
373
\ No newline at end of file
374
\ 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