do not allow import of more than 100 supplier/customer at a time
This commit is contained in:
parent
5c0dd674e9
commit
fd402d03de
1 changed files with 5 additions and 1 deletions
|
|
@ -153,7 +153,11 @@ def upload():
|
|||
# doctype
|
||||
doctype = rows[0][0].split(':')[1].strip()
|
||||
doctype_dl = webnotes.model.doctype.get(doctype, form=0)
|
||||
|
||||
|
||||
if doctype in ['Customer', 'Supplier'] and len(rows[8:]) > 100:
|
||||
webnotes.msgprint("Please upload only upto 100 %ss at a time" % doctype)
|
||||
raise Exception
|
||||
|
||||
parenttype, parentfield = None, None
|
||||
if len(rows[1]) > 0 and ':' in rows[1][0]:
|
||||
parenttype = rows[1][0].split(':')[1].strip()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue