Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
a4b19f1d58
@ -0,0 +1,3 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.sql("update `tabQuotation` t1, `tabLead` t2 set t1.organization = t2.company_name where ifnull(t1.lead, '') != '' and t1.quotation_to = 'Lead' and ifnull(t1.organization, '') = '' and t1.lead = t2.name")
|
@ -422,4 +422,9 @@ patch_list = [
|
||||
'patch_file': 'copy_uom_for_pur_inv_item',
|
||||
'description': 'Copy uom for pur inv item from PO and PR item table'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.june_2012',
|
||||
'patch_file': 'fetch_organization_from_lead',
|
||||
'description': 'Fetch organization from lead in quote'
|
||||
},
|
||||
]
|
@ -43,7 +43,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
if(doc.quotation_to) {
|
||||
if(doc.quotation_to == 'Customer') {
|
||||
hide_field(['lead', 'lead_name']);
|
||||
hide_field(['lead', 'lead_name', 'organization']);
|
||||
}
|
||||
else if (doc.quotation_to == 'Lead') {
|
||||
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
|
||||
@ -64,11 +64,11 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
// hide - unhide fields based on lead or customer..
|
||||
// =======================================================================================================================
|
||||
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
||||
hide_field(['lead', 'lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||
hide_field(['lead', 'lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group', 'organization']);
|
||||
if(doc.quotation_to == 'Lead') unhide_field(['lead']);
|
||||
else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
|
||||
|
||||
doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||
doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = "";
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-05-21 11:43:59',
|
||||
'creation': '2012-06-08 15:33:49',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-05-31 11:43:18',
|
||||
'modified': '2012-06-08 16:10:44',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -51,7 +51,8 @@
|
||||
'name': '__common__',
|
||||
'parent': u'Quotation',
|
||||
'parentfield': u'permissions',
|
||||
'parenttype': u'DocType'
|
||||
'parenttype': u'DocType',
|
||||
'read': 1
|
||||
},
|
||||
|
||||
# DocType, Quotation
|
||||
@ -60,13 +61,6 @@
|
||||
'name': u'Quotation'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'user print'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 0,
|
||||
@ -74,7 +68,6 @@
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
'role': u'Sales Manager',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
@ -87,7 +80,6 @@
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'Sales Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
@ -100,7 +92,6 @@
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'Sales User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
@ -113,7 +104,6 @@
|
||||
'create': 0,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
'role': u'Sales User',
|
||||
'submit': 0,
|
||||
'write': 0
|
||||
@ -124,7 +114,6 @@
|
||||
'doctype': u'DocPerm',
|
||||
'match': u'customer_name',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'Customer'
|
||||
},
|
||||
|
||||
@ -135,7 +124,6 @@
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'Maintenance Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
@ -145,7 +133,6 @@
|
||||
{
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
'role': u'Maintenance Manager'
|
||||
},
|
||||
|
||||
@ -156,7 +143,6 @@
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'read': 1,
|
||||
'role': u'Maintenance User',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
@ -166,7 +152,6 @@
|
||||
{
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'read': 1,
|
||||
'role': u'Maintenance User'
|
||||
},
|
||||
|
||||
@ -284,6 +269,16 @@
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'organization',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'Organization',
|
||||
'permlevel': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
|
Loading…
x
Reference in New Issue
Block a user