cleanup and fixes
This commit is contained in:
		
							parent
							
								
									44e954f509
								
							
						
					
					
						commit
						a73b2965aa
					
				| @ -69,10 +69,8 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { | ||||
| 		cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher); | ||||
| 	 | ||||
| 	if(doc.docstatus==1) {  | ||||
| 		unhide_field(['repair_outstanding_amt']);  | ||||
| 		cur_frm.add_custom_button('View Ledger', cur_frm.cscript.view_ledger_entry); | ||||
| 	} else hide_field(['repair_outstanding_amt']); | ||||
| 	 | ||||
| 	}	 | ||||
| 	cur_frm.cscript.is_opening(doc, dt, dn); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -3,9 +3,9 @@ | ||||
| 
 | ||||
| 	# These values are common in all dictionaries | ||||
| 	{ | ||||
| 		'creation': '2012-03-27 14:35:45', | ||||
| 		'creation': '2012-04-11 13:17:19', | ||||
| 		'docstatus': 0, | ||||
| 		'modified': '2012-03-27 14:45:49', | ||||
| 		'modified': '2012-04-12 18:09:05', | ||||
| 		'modified_by': u'Administrator', | ||||
| 		'owner': u'Administrator' | ||||
| 	}, | ||||
| @ -13,6 +13,7 @@ | ||||
| 	# These values are common for all DocType | ||||
| 	{ | ||||
| 		'_last_update': u'1330345793', | ||||
| 		'allow_attach': 1, | ||||
| 		'colour': u'White:FFF', | ||||
| 		'default_print_format': u'Standard', | ||||
| 		'doctype': 'DocType', | ||||
| @ -25,7 +26,7 @@ | ||||
| 		'server_code_error': u' ', | ||||
| 		'show_in_menu': 0, | ||||
| 		'subject': u'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding', | ||||
| 		'version': 521 | ||||
| 		'version': 522 | ||||
| 	}, | ||||
| 
 | ||||
| 	# These values are common for all DocField | ||||
| @ -53,6 +54,18 @@ | ||||
| 		'name': u'Purchase Invoice' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Accounts Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| @ -60,11 +73,23 @@ | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Accounts User', | ||||
| 		'role': u'Accounts Manager', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Accounts User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'doctype': u'DocPerm', | ||||
| @ -84,26 +109,6 @@ | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'match': u'supplier', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Supplier' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Accounts Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| @ -111,21 +116,17 @@ | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Accounts Manager', | ||||
| 		'role': u'Accounts User', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Accounts User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 		'match': u'supplier', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Supplier' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| @ -1101,32 +1102,6 @@ | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'colour': u'White:FFF', | ||||
| 		'depends_on': u'eval:!doc.__islocal', | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'actions', | ||||
| 		'fieldtype': u'Section Break', | ||||
| 		'label': u'Actions', | ||||
| 		'oldfieldtype': u'Section Break', | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'allow_on_submit': 1, | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'repair_outstanding_amt', | ||||
| 		'fieldtype': u'Button', | ||||
| 		'label': u'Repair Outstanding Amt', | ||||
| 		'oldfieldtype': u'Button', | ||||
| 		'options': u'repair_pv_outstanding', | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| @ -1140,5 +1115,17 @@ | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1, | ||||
| 		'report_hide': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'file_list', | ||||
| 		'fieldtype': u'Text', | ||||
| 		'hidden': 1, | ||||
| 		'label': u'File List', | ||||
| 		'no_copy': 1, | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	} | ||||
| ] | ||||
| ] | ||||
| @ -33,6 +33,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { | ||||
| 	if(!doc.currency) doc.currency = sys_defaults.currency; | ||||
| 	if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'}); | ||||
| 	if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()}); | ||||
| 	if(!doc.is_subcontracted) set_multiple(cdt, cdn, {is_subcontracted:'No'}); | ||||
| 	 | ||||
| 	if(doc.__islocal){ | ||||
| 		hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']); | ||||
| @ -79,9 +80,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { | ||||
| 		 | ||||
| 	if(doc.docstatus == 1 && doc.status == 'Stopped') | ||||
| 		cur_frm.add_custom_button('Unstop Purchase Order', cur_frm.cscript['Unstop Purchase Order']); | ||||
| 
 | ||||
| 	if(doc.docstatus == 1) unhide_field(['repair_purchase_order']); | ||||
| 	else hide_field(['repair_purchase_order']); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -3,9 +3,9 @@ | ||||
| 
 | ||||
| 	# These values are common in all dictionaries | ||||
| 	{ | ||||
| 		'creation': '2012-03-27 14:35:51', | ||||
| 		'creation': '2012-04-11 13:17:34', | ||||
| 		'docstatus': 0, | ||||
| 		'modified': '2012-03-27 18:46:29', | ||||
| 		'modified': '2012-04-12 18:11:33', | ||||
| 		'modified_by': u'Administrator', | ||||
| 		'owner': u'Administrator' | ||||
| 	}, | ||||
| @ -13,6 +13,7 @@ | ||||
| 	# These values are common for all DocType | ||||
| 	{ | ||||
| 		'_last_update': u'1330339817', | ||||
| 		'allow_attach': 1, | ||||
| 		'colour': u'White:FFF', | ||||
| 		'default_print_format': u'Standard', | ||||
| 		'doctype': 'DocType', | ||||
| @ -27,7 +28,7 @@ | ||||
| 		'server_code_error': u' ', | ||||
| 		'show_in_menu': 0, | ||||
| 		'subject': u'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered', | ||||
| 		'version': 502 | ||||
| 		'version': 503 | ||||
| 	}, | ||||
| 
 | ||||
| 	# These values are common for all DocField | ||||
| @ -55,6 +56,54 @@ | ||||
| 		'name': u'Purchase Order' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Purchase Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Purchase Manager', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| @ -90,54 +139,6 @@ | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Purchase Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Purchase Manager', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'colour': u'White:FFF', | ||||
| @ -1044,14 +1045,13 @@ | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'allow_on_submit': 1, | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'repair_purchase_order', | ||||
| 		'fieldtype': u'Button', | ||||
| 		'label': u'Repair Purchase Order', | ||||
| 		'oldfieldtype': u'Button', | ||||
| 		'options': u'repair_purchase_order', | ||||
| 		'fieldname': u'file_list', | ||||
| 		'fieldtype': u'Text', | ||||
| 		'hidden': 1, | ||||
| 		'label': u'File List', | ||||
| 		'no_copy': 1, | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	} | ||||
| ] | ||||
| ] | ||||
| @ -71,9 +71,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { | ||||
| 	 cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']); | ||||
| 	 cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); | ||||
| 	} | ||||
| 	else{ | ||||
| 		hide_field(['Repair Purchase Receipt']); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -3,9 +3,9 @@ | ||||
| 
 | ||||
| 	# These values are common in all dictionaries | ||||
| 	{ | ||||
| 		'creation': '2012-03-27 14:36:34', | ||||
| 		'creation': '2012-04-11 13:18:46', | ||||
| 		'docstatus': 0, | ||||
| 		'modified': '2012-03-27 18:51:48', | ||||
| 		'modified': '2012-04-12 17:50:10', | ||||
| 		'modified_by': u'Administrator', | ||||
| 		'owner': u'Administrator' | ||||
| 	}, | ||||
| @ -13,6 +13,7 @@ | ||||
| 	# These values are common for all DocType | ||||
| 	{ | ||||
| 		'_last_update': u'1330593645', | ||||
| 		'allow_attach': 1, | ||||
| 		'colour': u'White:FFF', | ||||
| 		'default_print_format': u'Standard', | ||||
| 		'doctype': 'DocType', | ||||
| @ -27,7 +28,7 @@ | ||||
| 		'server_code_error': u' ', | ||||
| 		'show_in_menu': 0, | ||||
| 		'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s', | ||||
| 		'version': 326 | ||||
| 		'version': 327 | ||||
| 	}, | ||||
| 
 | ||||
| 	# These values are common for all DocField | ||||
| @ -55,6 +56,54 @@ | ||||
| 		'name': u'Purchase Receipt' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material Manager', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| @ -90,54 +139,6 @@ | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material Manager', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material Manager', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 0, | ||||
| 		'cancel': 0, | ||||
| 		'create': 0, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 1, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 0, | ||||
| 		'write': 0 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocPerm | ||||
| 	{ | ||||
| 		'amend': 1, | ||||
| 		'cancel': 1, | ||||
| 		'create': 1, | ||||
| 		'doctype': u'DocPerm', | ||||
| 		'permlevel': 0, | ||||
| 		'role': u'Material User', | ||||
| 		'submit': 1, | ||||
| 		'write': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'colour': u'White:FFF', | ||||
| @ -591,6 +592,18 @@ | ||||
| 		'width': u'150px' | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'get_current_stock', | ||||
| 		'fieldtype': u'Button', | ||||
| 		'label': u'Get Current Stock', | ||||
| 		'oldfieldtype': u'Button', | ||||
| 		'options': u'get_current_stock', | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| @ -1130,18 +1143,6 @@ | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'get_current_stock', | ||||
| 		'fieldtype': u'Button', | ||||
| 		'label': u'Get Current Stock', | ||||
| 		'oldfieldtype': u'Button', | ||||
| 		'options': u'get_current_stock', | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	}, | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'doctype': u'DocField', | ||||
| @ -1158,15 +1159,13 @@ | ||||
| 
 | ||||
| 	# DocField | ||||
| 	{ | ||||
| 		'allow_on_submit': 1, | ||||
| 		'colour': u'White:FFF', | ||||
| 		'doctype': u'DocField', | ||||
| 		'fieldname': u'repair_purchase_receipt', | ||||
| 		'fieldtype': u'Button', | ||||
| 		'label': u'Repair Purchase Receipt', | ||||
| 		'oldfieldtype': u'Button', | ||||
| 		'options': u'repair_purchase_receipt', | ||||
| 		'fieldname': u'file_list', | ||||
| 		'fieldtype': u'Text', | ||||
| 		'hidden': 1, | ||||
| 		'label': u'File List', | ||||
| 		'no_copy': 1, | ||||
| 		'permlevel': 0, | ||||
| 		'print_hide': 1 | ||||
| 	} | ||||
| ] | ||||
| ] | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user