From f1c287bdda234209f5d3789c6c9ad0f5b298d21d Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 20 Jun 2012 13:46:26 +0530 Subject: [PATCH 1/3] fix in file_list issue due to import data --- public/js/all-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/all-app.js b/public/js/all-app.js index 8d28e84087a..8e26724e5c5 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -2202,7 +2202,7 @@ this.make();} wn.widgets.form.sidebar.Attachment=function(parent,filedet,frm){filedet=filedet.split(',') this.filename=filedet[0];this.fileid=filedet[1];this.frm=frm;var me=this;this.wrapper=$a(parent,'div','sidebar-comment-message');this.remove_fileid=function(){var doc=locals[me.frm.doctype][me.frm.docname];var fl=doc.file_list.split('\n');new_fl=[];for(var i=0;i Date: Fri, 22 Jun 2012 10:56:12 +0530 Subject: [PATCH 2/3] fix in price list: check if a row has content before checking its length; allow only 1 attachment --- .../setup/doctype/price_list/price_list.py | 2 +- .../setup/doctype/price_list/price_list.txt | 87 ++++++++++--------- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/erpnext/setup/doctype/price_list/price_list.py b/erpnext/setup/doctype/price_list/price_list.py index f2f32c2eef8..be59c658163 100644 --- a/erpnext/setup/doctype/price_list/price_list.py +++ b/erpnext/setup/doctype/price_list/price_list.py @@ -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]): diff --git a/erpnext/setup/doctype/price_list/price_list.txt b/erpnext/setup/doctype/price_list/price_list.txt index 5d7e57e9cf6..2881cd7122d 100644 --- a/erpnext/setup/doctype/price_list/price_list.txt +++ b/erpnext/setup/doctype/price_list/price_list.txt @@ -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', From ab65b54c43aec3a86795cbb745d2e67f9050990f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 22 Jun 2012 12:11:18 +0530 Subject: [PATCH 3/3] fix in dialog: if an in_dialog doctype is called using url, it will open in form with header and sidebar --- public/js/all-app.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/js/all-app.js b/public/js/all-app.js index 8e26724e5c5..31d8836b371 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -1026,7 +1026,7 @@ $.each(data._user_tags.split(','),function(i,t){if(t){$('