diff --git a/bt5/erp5_banking_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_banking_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml index 9503095292963f760264538e994b29886dfca4ea..31d07f437c73c56f0fea115a013927a27a74fd04 100644 --- a/bt5/erp5_banking_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml +++ b/bt5/erp5_banking_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml @@ -31,4 +31,7 @@ <item>Banknote</item> <item>Coin</item> </portal_type> + <portal_type id="Currency Exchange Line"> + <item>BaobabStopDate</item> + </portal_type> </allowed_content_type_list> \ No newline at end of file diff --git a/bt5/erp5_banking_core/PropertySheetTemplateItem/BaobabStopDate.py b/bt5/erp5_banking_core/PropertySheetTemplateItem/BaobabStopDate.py new file mode 100644 index 0000000000000000000000000000000000000000..fa5d33e3b707101a5687de709299e0fb9d94ec1b --- /dev/null +++ b/bt5/erp5_banking_core/PropertySheetTemplateItem/BaobabStopDate.py @@ -0,0 +1,40 @@ +############################################################################## +# +# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. +# Aurélien Calonne <aurel@nexedi.com> +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +class BaobabStopDate: + """ + Properties for all Objects that define a stop_date + """ + + _properties = ( + {'id' : 'stop_date', + 'description' : 'a date', + 'type' : 'date', + 'mode' : 'w' + }, + ) diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkStockBeforeClosingDate.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkStockBeforeClosingDate.xml index 8ee6e5382173711250ba9762472cfc6e1229e1df..d1f53a1a2d6fdd890a29d7d78b4a34e006cde189 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkStockBeforeClosingDate.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkStockBeforeClosingDate.xml @@ -96,6 +96,8 @@ for counter_vault in counter_vault_list:\n inventory_list = context.portal_simulation.getCurrentInventoryList(\n node=counter_vault_url,\n resource_uid=resource_uid_list,\n + group_by_resource=1,\n + group_by_variation=1,\n ignore_variation=0)\n if len(inventory_list)>0:\n message = Message(domain=\'ui\',\n diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getUserAssignmentList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getUserAssignmentList.xml index 48274b47408e86e3919de29bd4a927e47f408176..e9e3c5322bfd4c102b74b4e272f389d94ab33671 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getUserAssignmentList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_getUserAssignmentList.xml @@ -90,7 +90,7 @@ if len(assignment_list) == 0:\n return []\n \n valid_assignment_list = []\n -\n +context.log("Baobab_getUserAssignmentList", "assignment_list = %s" %(assignment_list,))\n for a in assignment_list:\n if a.getValidationState() == \'open\':\n stop = a.getStopDate()\n diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml index c8779dd97eb189c413adaf910db62f4c370b9073..1b41d5f8dbb43ead9ada00d8fd5a35a19d739fff 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml @@ -176,6 +176,8 @@ for line in listbox:\n # create the movement\n variation_not_defined = 0\n for resource_id in per_resource_dict.keys():\n + if variation_not_defined == 1:\n + break\n variation_list_dict = per_resource_dict[resource_id].values()\n # get the resource\n #resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\'), id = resource_id)\n diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index 0fa6a7b088051e48b8dc94d598b7e324e6f691c9..69226f7293aa543649b73a6ed3264cddabfcd8c1 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -90 \ No newline at end of file +92 \ No newline at end of file diff --git a/bt5/erp5_banking_core/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_banking_core/bt/template_portal_type_allowed_content_type_list index 3bf7480f4af174a3f0c5c707e30bf645f14970e7..af577fc096c149d5bb46403d79b2c753950be0f3 100644 --- a/bt5/erp5_banking_core/bt/template_portal_type_allowed_content_type_list +++ b/bt5/erp5_banking_core/bt/template_portal_type_allowed_content_type_list @@ -9,4 +9,5 @@ Counter Date Module | Counter Date Counter Module | Counter Counter | Telephone Currency Cash Module | Banknote -Currency Cash Module | Coin \ No newline at end of file +Currency Cash Module | Coin +Currency Exchange Line | BaobabStopDate \ No newline at end of file diff --git a/bt5/erp5_banking_core/bt/template_property_sheet_id_list b/bt5/erp5_banking_core/bt/template_property_sheet_id_list index 43c4b11a624f35c656f42d4c239a903c981ac308..706558704b42f0c1648c0db233267158ea747412 100644 --- a/bt5/erp5_banking_core/bt/template_property_sheet_id_list +++ b/bt5/erp5_banking_core/bt/template_property_sheet_id_list @@ -1,2 +1,3 @@ CheckModel -RenderingPreference \ No newline at end of file +RenderingPreference +BaobabStopDate \ No newline at end of file