diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml index c8d4a0e5f6918f7b7e27558685cd2b4424aad78b..2d5736d26c8b2d61d3f6adeaacce03d15da23096 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml @@ -69,6 +69,7 @@ \n \n container_portal_type_list = ["Monetary Reception",]\n +resource_translated_title_dict = {}\n base_price_dict = {}\n \n if listbox is None:\n @@ -101,7 +102,6 @@ if listbox is None:\n container_dict = {}\n container_lines = cash_container.searchFolder(portal_type=\'Container Line\')\n if len(container_lines) == 0:\n - context.log("CashMovementNewNotEmitted_generateCashContainerInputDialog", "No container line finf for cash container %s" %(cash_container.getRelativeUrl(),))\n continue\n container_line = container_lines[0].getObject()\n container_dict[\'reference\'] = cash_container.getReference()\n @@ -202,6 +202,7 @@ if listbox is None:\n <string>kw</string> <string>DateTime</string> <string>container_portal_type_list</string> + <string>resource_translated_title_dict</string> <string>base_price_dict</string> <string>None</string> <string>_getattr_</string> @@ -222,7 +223,6 @@ if listbox is None:\n <string>_write_</string> <string>resource</string> <string>base_price</string> - <string>resource_translated_title_dict</string> <string>resource_translated_title</string> <string>quantity</string> <string>total_price_dict</string> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MonetaryDestruction_viewLineFastInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MonetaryDestruction_viewLineFastInputDialog.xml index ca0d3fe60473d326be4f64d703c423cbb9139a8b..114a0d07ba0f308c62456d6f403951cd38d44fa4 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MonetaryDestruction_viewLineFastInputDialog.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/MonetaryDestruction_viewLineFastInputDialog.xml @@ -71,19 +71,15 @@ source = context.getSource()\n currency = context.Baobab_getPortalReferenceCurrencyID()\n source_section = context.getSourceSection()\n \n +if source is None:\n + redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n + , \'view\'\n + , \'portal_status_message=Please+select+a+source.\'\n + )\n + return request.RESPONSE.redirect( redirect_url )\n \n -# We must not force another site, it is optionnal\n -# So I (Seb) remove this\n -#if source_section is None :\n -# redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n -# , \'view\'\n -# , \'portal_status_message=Please+select+a+site.\'\n -# )\n -# return request.RESPONSE.redirect( redirect_url )\n \n -\n -\n -if \'serre\' in context.getSource():\n +if \'serre\' in source:\n cash_status = [\'retired\',\'error\']\n else:\n cash_status = [\'cancelled\',\'mutilated\', \'maculated\',\'error\']\n @@ -166,8 +162,9 @@ return context.CashDelivery_generateCashDetailInputDialog(listbox = None\n <string>source</string> <string>currency</string> <string>source_section</string> - <string>cash_status</string> <string>None</string> + <string>redirect_url</string> + <string>cash_status</string> <string>emission_letter</string> <string>list</string> <string>_getitem_</string> diff --git a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/vault_transfer_workflow/scripts/validateVaultBalance.xml b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/vault_transfer_workflow/scripts/validateVaultBalance.xml index d3fb744d0f5247b99116b33b685a2ead2960f8a2..ccac3fe6b6c5aceef430c68e55357fdbd815e9ec 100644 --- a/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/vault_transfer_workflow/scripts/validateVaultBalance.xml +++ b/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/vault_transfer_workflow/scripts/validateVaultBalance.xml @@ -75,6 +75,10 @@ date = transaction.getStartDate()\n vault = transaction.getSource()\n vaultDestination = transaction.getDestination()\n \n +if vault is None or vaultDestination is None:\n + msg = Message(domain="ui", message="You must define vaults.")\n + raise ValidationFailed, (msg,)\n +\n # use of the constraint : Test source and destination\n vliste = transaction.checkConsistency()\n transaction.log(\'vliste\', vliste)\n @@ -161,9 +165,10 @@ elif resource <> 0 :\n <string>date</string> <string>vault</string> <string>vaultDestination</string> + <string>None</string> + <string>msg</string> <string>vliste</string> <string>len</string> - <string>msg</string> <string>resource</string> <string>amount</string> <string>total_price</string> diff --git a/bt5/erp5_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision index a557316495daf87a9067fa9ba15f15b66963a12a..0905ea78aba8dbc76598cb3610907683a1cb4525 100644 --- a/bt5/erp5_banking_cash/bt/revision +++ b/bt5/erp5_banking_cash/bt/revision @@ -1 +1 @@ -641 \ No newline at end of file +642 \ No newline at end of file