fix in price list: check if a row has content before checking its length; allow only 1 attachment

This commit is contained in:
Anand Doshi 2012-06-22 10:56:12 +05:30
parent 9d25d2ab0c
commit b4aa0f8ce8
2 changed files with 45 additions and 44 deletions

View File

@ -57,7 +57,7 @@ class DocType:
updated = 0
for line in data:
if len(line)==3:
if line and len(line)==3:
# if item exists
if sql("select name from tabItem where name=%s", line[0]):
if self.is_currency_valid(line[2]):

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-27 14:36:22',
'creation': '2012-05-15 12:15:02',
'docstatus': 0,
'modified': '2012-03-27 14:36:22',
'modified': '2012-06-22 10:51:23',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -19,12 +19,13 @@
'colour': u'White:FFF',
'doctype': 'DocType',
'document_type': u'Master',
'max_attachments': 1,
'module': u'Setup',
'name': '__common__',
'section_style': u'Simple',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 6
'version': 1
},
# These values are common for all DocField
@ -54,6 +55,46 @@
'name': u'Price List'
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales Manager',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales Manager',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales User',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User',
'write': 0
},
# DocPerm
{
'cancel': 1,
@ -64,46 +105,6 @@
'write': 1
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales Manager',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales Manager',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales User',
'write': 0
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User',
'write': 0
},
# DocField
{
'doctype': u'DocField',