[Erp5-report] r14745 - in /erp5/trunk/bt5/erp5_accounting: WorkflowTemplateItem/portal_work...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 8 11:31:39 CEST 2007
Author: jerome
Date: Fri Jun 8 11:31:39 2007
New Revision: 14745
URL: http://svn.erp5.org?rev=14745&view=rev
Log:
use getTranslatedMessage to display the constraint message in account workflow validation failures
Modified:
erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/account_workflow/scripts/Account_Validate.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/account_workflow/scripts/Account_Validate.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/account_workflow/scripts/Account_Validate.xml?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/account_workflow/scripts/Account_Validate.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/account_workflow/scripts/Account_Validate.xml Fri Jun 8 11:31:39 2007
@@ -74,10 +74,16 @@
account = sci[\'object\']\n
N_ = lambda msgid: Message(\'erp5_ui\', msgid)\n
\n
+# TODO: use constraint for this\n
if not account.getGap():\n
raise ValidationFailed(N_("GAP is unset."))\n
\n
for err in account.checkConsistency():\n
+ if hasattr(err, \'getTranslatedMessage\'):\n
+ raise ValidationFailed(err.getTranslatedMessage())\n
+ # Old constraints implementation doesn\'t have a translated message,\n
+ # in this case, simply translate the description of the constraint in\n
+ # the property sheet.\n
raise ValidationFailed(N_(err[4]))\n
</string> </value>
</item>
@@ -132,6 +138,7 @@
<string>_getattr_</string>
<string>_getiter_</string>
<string>err</string>
+ <string>hasattr</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Fri Jun 8 11:31:39 2007
@@ -1,1 +1,1 @@
-325
+327
More information about the Erp5-report
mailing list