From 1ead851e169da8d7ff6002cec02b432d19674984 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 1 Mar 2013 13:21:29 +0530 Subject: [PATCH] datatype validation in voucher import tool --- accounts/page/voucher_import_tool/voucher_import_tool.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.py b/accounts/page/voucher_import_tool/voucher_import_tool.py index b94864c211..1819e07705 100644 --- a/accounts/page/voucher_import_tool/voucher_import_tool.py +++ b/accounts/page/voucher_import_tool/voucher_import_tool.py @@ -160,6 +160,12 @@ def import_vouchers(common_values, data, start_idx, import_type): raise Exception doclist = Bean([jv]+details) + + # validate datatype + from core.page.data_import_tool.data_import_tool import check_record + for d in doclist: + check_record(d.fields, d.parenttype) + doclist.submit() messages.append("""

[row #%s]