Commit 5583c15a authored by Aurel's avatar Aurel

add missing property sheet for mutilated banknote

fix check in wf transition for mutilated banknote

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15896 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26805051
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
<item>Amount</item> <item>Amount</item>
</portal_type> </portal_type>
<portal_type id="Mutilated Banknote"> <portal_type id="Mutilated Banknote">
<item>Mutilated Banknote</item>
<item>Amount</item> <item>Amount</item>
<item>Price</item> <item>Price</item>
</portal_type> </portal_type>
......
##############################################################################
#
# Copyright (c) 2002-2007 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 MutilatedBanknote:
"""
PropertySheetTemplate properties for all ERP5 objects
"""
_properties = (
{ 'id' : 'deponent',
'description' : 'The person who said that there is a mutilated banknote',
'type' : 'string',
'mode' : 'w' },
)
...@@ -85,9 +85,14 @@ if ob.getSourceTotalAssetPrice() != ob.getTotalPrice(portal_type=\'Incoming Muti ...@@ -85,9 +85,14 @@ if ob.getSourceTotalAssetPrice() != ob.getTotalPrice(portal_type=\'Incoming Muti
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
# check reporter defined\n # check reporter defined\n
if ob.getSourceDecision() == 0:\n if ob.getDeponent() in (None, ""):\n
msg = Message(domain = "ui", message="You must define a reporter.")\n msg = Message(domain = "ui", message="You must define a reporter.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n
# check original site defined is hq\n
if "siege" in ob.getSource() and ob.getSourceTrade() is None:\n
msg = Message(domain = "ui", message="You must define the original site.")\n
raise ValidationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -140,6 +145,7 @@ if ob.getSourceDecision() == 0:\n ...@@ -140,6 +145,7 @@ if ob.getSourceDecision() == 0:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
487 490
\ No newline at end of file \ No newline at end of file
...@@ -63,6 +63,7 @@ Money Deposit | ItemAggregation ...@@ -63,6 +63,7 @@ Money Deposit | ItemAggregation
Money Deposit | Price Money Deposit | Price
Money Deposit | Task Money Deposit | Task
Mutilated Banknote | Amount Mutilated Banknote | Amount
Mutilated Banknote | Mutilated Banknote
Mutilated Banknote | Price Mutilated Banknote | Price
Outgoing Cash Balance Regulation Line | CashDeliveryLine Outgoing Cash Balance Regulation Line | CashDeliveryLine
Outgoing Cash Exchange Line | CashDeliveryLine Outgoing Cash Exchange Line | CashDeliveryLine
......
MonetaryDestruction MonetaryDestruction
CashMovement CashMovement
\ No newline at end of file MutilatedBanknote
\ 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