diff --git a/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/exchanged_line_fast_input.xml b/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/exchanged_line_fast_input.xml index 5e54c475c8d84b1f9c6d95271414ecfafa92d614..627ce9202ac37ba4b9d1056767e07d22cfc1e1e9 100644 --- a/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/exchanged_line_fast_input.xml +++ b/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/exchanged_line_fast_input.xml @@ -104,7 +104,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python: here.getSimulationState() == "planned"</string> </value> + <value> <string>python: here.getSimulationState() in ("stopped", "planned")</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/returned_line_fast_input.xml b/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/returned_line_fast_input.xml index f5b99ffba7faf02c87bd5eca511c05ea483aea74..159e1501de101706d2407b217eb7aeb36d0420de 100644 --- a/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/returned_line_fast_input.xml +++ b/bt5/erp5_banking_cash/ActionTemplateItem/portal_types/Mutilated%20Banknote/returned_line_fast_input.xml @@ -104,7 +104,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python: here.getSimulationState() == "confirmed"</string> </value> + <value> <string>python: here.getSimulationState() == "finished"</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingMutilatedBanknoteLine_getBaobabDestination.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingMutilatedBanknoteLine_getBaobabDestination.xml index 2ab3a798fdfa61bcf1ca61eb94599330b8d0ae68..d417ba85728076eda260fdef7a2a280d23ad7ae6 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingMutilatedBanknoteLine_getBaobabDestination.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingMutilatedBanknoteLine_getBaobabDestination.xml @@ -68,14 +68,15 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string># if sent to headquarter, line must not exist\n -if not \'siege\' in context.getSource():\n - # if we sent to headquarter, we have order the document at one time\n - for workflow_item in context.getParentValue().Base_getWorkflowHistoryItemList(\'mutilated_banknote_workflow\',display=0):\n - if workflow_item.getProperty(\'action\')==\'order_action\':\n - return None\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 +# In reality, they are moved to "caisse_courante/billets_mutiles" with "canceled" status.\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 +# See ExchangedMutilatedBanknoteLine_getBaobabDestination (those lines are created at "planned" state).\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> </item> <item> @@ -128,8 +129,6 @@ return context.getDestination()\n <string>kw</string> <string>_getattr_</string> <string>context</string> - <string>_getiter_</string> - <string>workflow_item</string> <string>None</string> </tuple> </value> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MutilatedBanknote_viewOutgoingLineFastInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MutilatedBanknote_viewOutgoingLineFastInputDialog.xml index 857b30a506ea69d9067644bb7b7bcc9344088608..f58f8be8297bc1161b6a3e2fa76e46800d4c04d0 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MutilatedBanknote_viewOutgoingLineFastInputDialog.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MutilatedBanknote_viewOutgoingLineFastInputDialog.xml @@ -70,8 +70,8 @@ <key> <string>_body</string> </key> <value> <string>cash_detail_dict = {\'line_portal_type\' : \'Outgoing Mutilated Banknote Line\'\n , \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n - , \'cash_status_list\' : None\n - , \'emission_letter_list\' : None\n + , \'cash_status_list\' : [\'new_emitted\', \'valid\']\n + , \'emission_letter_list\' : context.Baobab_getUserEmissionLetterList()\n , \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1)\n , \'currency_cash_portal_type\': \'Banknote\'\n , \'read_only\' : False\n @@ -131,9 +131,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n <tuple> <string>_getattr_</string> <string>context</string> - <string>None</string> <string>False</string> <string>cash_detail_dict</string> + <string>None</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision index bea0d09c49935aac714f5439285e2706b15e1dd9..274ccca8ac98c5054b0d25975485dfad65ac8673 100644 --- a/bt5/erp5_banking_cash/bt/revision +++ b/bt5/erp5_banking_cash/bt/revision @@ -1 +1 @@ -207 \ No newline at end of file +209 \ No newline at end of file