diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml index 7f713b24a7e5de7eedb13020d750e952d09b1e3a..351a420d9b2994f3021084ff11cacca935e5f87c 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml @@ -87,6 +87,7 @@ line_list = []\n resource_dict = {}\n node_dict = {}\n variation_text_dict = {}\n +start_date = context.getStartDate()\n for l in tmp_list :\n # The source can be different for every line (due to getBaobabSource approach)\n if source is None:\n @@ -122,6 +123,7 @@ def checkActivities(source_counter):\n raise ValidationFailed, (msg,)\n \n inventory_list = context.portal_simulation.getCurrentInventoryList(\n + at_date=start_date,\n group_by_variation=1,\n group_by_node=1,\n group_by_resource=1,\n @@ -169,10 +171,12 @@ for line in line_list :\n #context.log(\'cell quantity\', cell.getQuantity())\n #context.log(\'inventory value\', inventory_value)\n if inventory_value - cell.getQuantity() < 0:\n - msg = Message(domain=\'ui\', message=\'Insufficient balance for $resource, letter $letter, status $status and variation $variation\', mapping={\'resource\':cell.getResourceTranslatedTitle(),\n - \'letter\': cell.getEmissionLetterTitle(),\n - \'status\': cell.getCashStatusTranslatedTitle(),\n - \'variation\':cell.getVariationTitle()})\n + msg = Message(domain=\'ui\',\n + message=\'Insufficient balance for $resource, letter $letter, status $status and variation $variation\',\n + mapping={\'resource\':cell.getResourceTranslatedTitle(),\n + \'letter\': cell.getEmissionLetterTitle(),\n + \'status\': cell.getCashStatusTranslatedTitle(),\n + \'variation\':cell.getVariationTitle()})\n raise ValidationFailed, (msg,)\n else :\n raise ValueError, \'This script must not be used on movements without cells. It is deprecated and dangerous, therefor it raises.\'\n @@ -254,6 +258,7 @@ return 0\n <string>resource_dict</string> <string>node_dict</string> <string>variation_text_dict</string> + <string>start_date</string> <string>_getiter_</string> <string>l</string> <string>None</string> diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index cadbe928f85634ae380371c3266c8dad6eefd5e7..eb8f2fa1aeb162439e4756fc55642cad6c193cff 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -378 \ No newline at end of file +379 \ No newline at end of file