Commit efef67ae authored by Vincent Pelletier's avatar Vincent Pelletier

Update action visibility conditions to match workflow states update.

Update getBaobabDestination accessor to "remove" exchanged mutilated banknotes from mutilated banknotes vault (they are added with a "canceled" state into the coins & banknotes vault).
Update available variations of banknotes available in the outgoing fast input.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7c38253
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: here.getSimulationState() == "planned"</string> </value> <value> <string>python: here.getSimulationState() in ("stopped", "planned")</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>python: here.getSimulationState() == "confirmed"</string> </value> <value> <string>python: here.getSimulationState() == "finished"</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,14 +68,15 @@ ...@@ -68,14 +68,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># if sent to headquarter, line must not exist\n <value> <string># When the parent document (Mutilated Banknote) is finished or delivered, the mutilated banknotes must not be put in the "caisse_coutante/billets_mutiles"\n
if not \'siege\' in context.getSource():\n # In reality, they are moved to "caisse_courante/billets_mutiles" with "canceled" status.\n
# if we sent to headquarter, we have order the document at one time\n # To do this, the "mutilated" from "caisse_courante/billets_mutiles" are destroyed from erp5 point of view and new ones with state "canceled" are added to "caisse_courante/encaisse_des_billets_et_monnaies".\n
for workflow_item in context.getParentValue().Base_getWorkflowHistoryItemList(\'mutilated_banknote_workflow\',display=0):\n # See ExchangedMutilatedBanknoteLine_getBaobabDestination (those lines are created at "planned" state).\n
if workflow_item.getProperty(\'action\')==\'order_action\':\n
return None\n
\n \n
return context.getDestination()\n if context.getParent().getSimulationState() in (\'finished\', \'delivered\'):\n
return None\n
else:\n
return \'%s/surface/caisse_courante/billets_mutiles\' % (context.getParent().getSource(), )\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -128,8 +129,6 @@ return context.getDestination()\n ...@@ -128,8 +129,6 @@ return context.getDestination()\n
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_getiter_</string>
<string>workflow_item</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
</value> </value>
......
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Outgoing Mutilated Banknote Line\'\n <value> <string>cash_detail_dict = {\'line_portal_type\' : \'Outgoing Mutilated Banknote Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n , \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : None\n , \'cash_status_list\' : [\'new_emitted\', \'valid\']\n
, \'emission_letter_list\' : None\n , \'emission_letter_list\' : context.Baobab_getUserEmissionLetterList()\n
, \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1)\n , \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1)\n
, \'currency_cash_portal_type\': \'Banknote\'\n , \'currency_cash_portal_type\': \'Banknote\'\n
, \'read_only\' : False\n , \'read_only\' : False\n
...@@ -131,9 +131,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n ...@@ -131,9 +131,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>None</string>
<string>False</string> <string>False</string>
<string>cash_detail_dict</string> <string>cash_detail_dict</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
207 209
\ 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