Commit ab177524 authored by Sebastien Robin's avatar Sebastien Robin

modifications on cash movement in order to take into account currencies wich...

modifications on cash movement in order to take into account currencies wich are sent outside the bank

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15452 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad37f277
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<item>Amount</item> <item>Amount</item>
</portal_type> </portal_type>
<portal_type id="Cash Movement"> <portal_type id="Cash Movement">
<item>CashMovement</item>
<item>Price</item> <item>Price</item>
</portal_type> </portal_type>
<portal_type id="Cash Sorting"> <portal_type id="Cash Sorting">
......
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
#
# 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 CashMovement:
"""
PropertySheetTemplate properties for all ERP5 objects
"""
_properties = (
{ 'id' : 'currency_handover',
'description' : 'If we send currency ressources outside',
'type' : 'boolean',
'mode' : 'w' },
)
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<string>my_source</string> <string>my_source</string>
<string>my_resource</string> <string>my_resource</string>
<string>my_source_total_asset_price</string> <string>my_source_total_asset_price</string>
<string>my_currency_handover</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_currency_handover</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Currency Handover</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -72,8 +72,9 @@ transaction = state_change[\'object\']\n ...@@ -72,8 +72,9 @@ transaction = state_change[\'object\']\n
\n \n
vaultDestination = transaction.getDestination()\n vaultDestination = transaction.getDestination()\n
\n \n
# check again that we are in the good accounting date in site destination\n if not transaction.isCurrencyHandover():\n
transaction.Baobab_checkCounterDateOpen(site=vaultDestination, date=transaction.getStopDate())\n # check again that we are in the good accounting date in site destination\n
transaction.Baobab_checkCounterDateOpen(site=vaultDestination, date=transaction.getStopDate())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -75,6 +75,19 @@ transaction = state_change[\'object\']\n ...@@ -75,6 +75,19 @@ transaction = state_change[\'object\']\n
vault = transaction.getSource()\n vault = transaction.getSource()\n
vaultDestination = transaction.getDestination()\n vaultDestination = transaction.getDestination()\n
\n \n
if transaction.isCurrencyHandover() and vaultDestination is not None:\n
msg = Message(domain="ui", \n
message="Sorry, you must not set a destination in case of currency handover.")\n
raise ValidationFailed, (msg,)\n
\n
if vault is None:\n
msg = Message(domain="ui", \n
message="Sorry, you must define a source.")\n
raise ValidationFailed, (msg,)\n
\n
if not transaction.isCurrencyHandover() and vaultDestination is not None:\n
msg = Message(domain="ui", \n
message="Sorry, you must define a destination.")\n
\n \n
# use of the constraint : Test source and destination\n # use of the constraint : Test source and destination\n
vliste = transaction.checkConsistency()\n vliste = transaction.checkConsistency()\n
...@@ -164,17 +177,17 @@ elif resource <> 0 :\n ...@@ -164,17 +177,17 @@ elif resource <> 0 :\n
<string>_getattr_</string> <string>_getattr_</string>
<string>vault</string> <string>vault</string>
<string>vaultDestination</string> <string>vaultDestination</string>
<string>None</string>
<string>msg</string>
<string>vliste</string> <string>vliste</string>
<string>len</string> <string>len</string>
<string>portal_type_with_no_space</string> <string>portal_type_with_no_space</string>
<string>getattr</string> <string>getattr</string>
<string>None</string>
<string>check_path_script</string> <string>check_path_script</string>
<string>message</string> <string>message</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
<string>msg</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
455 457
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,7 @@ Cash Exchange | Amount ...@@ -6,6 +6,7 @@ Cash Exchange | Amount
Cash Exchange | Price Cash Exchange | Price
Cash Exchange | Resource Cash Exchange | Resource
Cash Exchange | Simulation Cash Exchange | Simulation
Cash Movement | CashMovement
Cash Movement | Price Cash Movement | Price
Cash Sorting | Price Cash Sorting | Price
Cash To Currency Purchase | Amount Cash To Currency Purchase | Amount
......
MonetaryDestruction MonetaryDestruction
\ No newline at end of file CashMovement
\ 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