Merge branch 'master' into sync

This commit is contained in:
Anand Doshi
2012-03-12 13:28:15 +05:30
5 changed files with 634 additions and 629 deletions

View File

@@ -106,8 +106,8 @@ class DocType(TransactionBase):
def get_debit_to(self): def get_debit_to(self):
acc_head = self.get_customer_account() acc_head = self.get_customer_account()
if acc_head: return acc_head and {'debit_to' : acc_head} or {}
return { 'debit_to' : acc_head }
# Set Due Date = Posting Date + Credit Days # Set Due Date = Posting Date + Credit Days
@@ -146,8 +146,7 @@ class DocType(TransactionBase):
self.get_income_account('entries') self.get_income_account('entries')
ret = self.get_debit_to() ret = self.get_debit_to()
if ret.has_key('debit_to'): self.doc.debit_to = ret.get('debit_to')
self.doc.debit_to = ret['debit_to']
# onload pull income account # onload pull income account
# -------------------------- # --------------------------

View File

@@ -162,7 +162,7 @@ cur_frm.cscript.conversion_rate = function(doc,cdt,cdn) {
//==================== Item Code Get Query ======================================================= //==================== Item Code Get Query =======================================================
// Only Is Purchase Item = 'Yes' and Items not moved to trash are allowed. // Only Is Purchase Item = 'Yes' and Items not moved to trash are allowed.
cur_frm.fields_dict[fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) { cur_frm.fields_dict[fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
return 'SELECT tabItem.name, tabItem.description FROM tabItem WHERE tabItem.is_purchase_item="Yes" AND (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND tabItem.%(key)s LIKE "%s" LIMIT 50' return 'SELECT tabItem.name, tabItem.description FROM tabItem WHERE (ifnull(tabItem.is_purchase_item, "No")="Yes" or ifnull(tabItem.is_sub_contracted_item, "No")="Yes") AND (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND tabItem.%(key)s LIKE "%s" LIMIT 50'
} }
//==================== Get Item Code Details ===================================================== //==================== Get Item Code Details =====================================================
@@ -364,11 +364,11 @@ cur_frm.cscript.calc_amount = function(doc, n) {
tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) ) tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
set_multiple(tname, cl[i].name, tmp, fname); set_multiple(tname, cl[i].name, tmp, fname);
msgprint(cl[i][rate_fld])
set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname); set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname); set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname); set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
msgprint(cl[i]['amount'])
}else if( n==5){ }else if( n==5){
tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate); tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname); set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);

View File

@@ -91,14 +91,12 @@ class DocType:
arg = eval(arg) arg = eval(arg)
item = self.get_item_det(arg['item_code']) item = self.get_item_det(arg['item_code'])
self.validate_rm_item(item) self.validate_rm_item(item)
arg['bom_no'] = arg['bom_no'] or item and cstr(item[0]['default_bom']) or '' arg['bom_no'] = arg['bom_no'] or item and cstr(item[0]['default_bom']) or ''
arg.update(item[0]) arg.update(item[0])
rate = self.get_rm_rate(arg) rate = self.get_rm_rate(arg)
ret_item = { ret_item = {
'description' : item and arg['description'] or '', 'description' : item and arg['description'] or '',
'stock_uom' : item and arg['stock_uom'] or '', 'stock_uom' : item and arg['stock_uom'] or '',
@@ -209,7 +207,7 @@ class DocType:
"""Fetch RM rate as per today's valuation rate and calculate totals""" """Fetch RM rate as per today's valuation rate and calculate totals"""
total_rm_cost = 0 total_rm_cost = 0
for d in getlist(self.doclist, 'bom_materials'): for d in getlist(self.doclist, 'bom_materials'):
if self.doc.rm_cost_as_per == 'Valuation Rate': #if self.doc.rm_cost_as_per == 'Valuation Rate':
arg = {'item_code': d.item_code, 'qty': d.qty, 'bom_no': d.bom_no} arg = {'item_code': d.item_code, 'qty': d.qty, 'bom_no': d.bom_no}
ret = self.get_bom_material_detail(cstr(arg)) ret = self.get_bom_material_detail(cstr(arg))
for k in ret: for k in ret:

View File

@@ -159,10 +159,18 @@ class DocType(TransactionBase):
msgprint("Enquiry Date is not within the Fiscal Year selected") msgprint("Enquiry Date is not within the Fiscal Year selected")
raise Exception raise Exception
def validate_lead_cust(self):
if self.doc.enquiry_from == 'Lead' and not self.doc.lead:
msgprint("Lead Id is mandatory if 'Enquiry From' is selected as Lead", raise_exception=1)
elif self.doc.enquiry_from == 'Customer' and not self.doc.customer:
msgprint("Customer is mandatory if 'Enquiry From' is selected as Customer", raise_exception=1)
def validate(self): def validate(self):
self.validate_fiscal_year() self.validate_fiscal_year()
self.set_last_contact_date() self.set_last_contact_date()
self.validate_item_details() self.validate_item_details()
self.validate_lead_cust()
# On Submit Functions # On Submit Functions
# ==================================================================================================================== # ====================================================================================================================

View File

@@ -5,51 +5,51 @@
{ {
'creation': '2010-08-08 17:09:00', 'creation': '2010-08-08 17:09:00',
'docstatus': 0, 'docstatus': 0,
'modified': '2011-12-19 14:11:27', 'modified': '2012-03-07 13:10:00',
'modified_by': 'Administrator', 'modified_by': u'Administrator',
'owner': 'Administrator' 'owner': u'Administrator'
}, },
# These values are common for all DocType # These values are common for all DocType
{ {
'_last_update': '1316075905', '_last_update': u'1324284087',
'colour': 'White:FFF', 'colour': u'White:FFF',
'default_print_format': 'Standard', 'default_print_format': u'Standard',
'doctype': 'DocType', 'doctype': 'DocType',
'document_type': 'Transaction', 'document_type': u'Transaction',
'module': 'Selling', 'module': u'Selling',
'name': '__common__', 'name': '__common__',
'search_fields': 'status,transaction_date,customer,lead,enquiry_type,territory,company', 'search_fields': u'status,transaction_date,customer,lead,enquiry_type,territory,company',
'section_style': 'Tabbed', 'section_style': u'Tabbed',
'server_code_error': ' ', 'server_code_error': u' ',
'show_in_menu': 0, 'show_in_menu': 0,
'subject': 'To %(customer_name)s%(lead_name)s on %(transaction_date)s', 'subject': u'To %(customer_name)s%(lead_name)s on %(transaction_date)s',
'version': 587 'version': 588
}, },
# These values are common for all DocField # These values are common for all DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'name': '__common__', 'name': '__common__',
'parent': 'Enquiry', 'parent': u'Enquiry',
'parentfield': 'fields', 'parentfield': u'fields',
'parenttype': 'DocType' 'parenttype': u'DocType'
}, },
# These values are common for all DocPerm # These values are common for all DocPerm
{ {
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'name': '__common__', 'name': '__common__',
'parent': 'Enquiry', 'parent': u'Enquiry',
'parentfield': 'permissions', 'parentfield': u'permissions',
'parenttype': 'DocType', 'parenttype': u'DocType',
'read': 1 'read': 1
}, },
# DocType, Enquiry # DocType, Enquiry
{ {
'doctype': 'DocType', 'doctype': 'DocType',
'name': 'Enquiry' 'name': u'Enquiry'
}, },
# DocPerm # DocPerm
@@ -57,9 +57,9 @@
'amend': 0, 'amend': 0,
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'role': 'Sales Manager', 'role': u'Sales Manager',
'submit': 0, 'submit': 0,
'write': 0 'write': 0
}, },
@@ -69,18 +69,18 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'role': 'System Manager', 'role': u'System Manager',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
}, },
# DocPerm # DocPerm
{ {
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'role': 'System Manager' 'role': u'System Manager'
}, },
# DocPerm # DocPerm
@@ -88,9 +88,9 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'role': 'Sales User', 'role': u'Sales User',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
}, },
@@ -100,9 +100,9 @@
'amend': 0, 'amend': 0,
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 1, 'permlevel': 1,
'role': 'Sales User', 'role': u'Sales User',
'submit': 0, 'submit': 0,
'write': 0 'write': 0
}, },
@@ -112,353 +112,353 @@
'amend': 1, 'amend': 1,
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': u'DocPerm',
'permlevel': 0, 'permlevel': 0,
'role': 'Sales Manager', 'role': u'Sales Manager',
'submit': 1, 'submit': 1,
'write': 1 'write': 1
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'Enter customer enquiry for which you might raise a quotation in future', 'description': u'Enter customer enquiry for which you might raise a quotation in future',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldtype': 'Section Break', 'fieldtype': u'Section Break',
'label': 'Basic Info', 'label': u'Basic Info',
'oldfieldtype': 'Section Break', 'oldfieldtype': u'Section Break',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'To manage multiple series please go to Setup > Manage Series', 'description': u'To manage multiple series please go to Setup > Manage Series',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'naming_series', 'fieldname': u'naming_series',
'fieldtype': 'Select', 'fieldtype': u'Select',
'label': 'Series', 'label': u'Series',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'naming_series', 'oldfieldname': u'naming_series',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': 'ENQUIRY\nENQ', 'options': u'ENQUIRY\nENQ',
'permlevel': 0, 'permlevel': 0,
'reqd': 1 'reqd': 1
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'enquiry_from', 'fieldname': u'enquiry_from',
'fieldtype': 'Select', 'fieldtype': u'Select',
'label': 'Enquiry From', 'label': u'Enquiry From',
'oldfieldname': 'enquiry_from', 'oldfieldname': u'enquiry_from',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': '\nLead\nCustomer', 'options': u'\nLead\nCustomer',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'report_hide': 0, 'report_hide': 0,
'reqd': 1, 'reqd': 1,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'customer', 'fieldname': u'customer',
'fieldtype': 'Link', 'fieldtype': u'Link',
'hidden': 0, 'hidden': 0,
'in_filter': 1, 'in_filter': 1,
'label': 'Customer', 'label': u'Customer',
'oldfieldname': 'customer', 'oldfieldname': u'customer',
'oldfieldtype': 'Link', 'oldfieldtype': u'Link',
'options': 'Customer', 'options': u'Customer',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 0, 'reqd': 0,
'search_index': 0, 'search_index': 0,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'customer_address', 'fieldname': u'customer_address',
'fieldtype': 'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
'label': 'Customer Address', 'label': u'Customer Address',
'options': 'Address', 'options': u'Address',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_person', 'fieldname': u'contact_person',
'fieldtype': 'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
'label': 'Contact Person', 'label': u'Contact Person',
'options': 'Contact', 'options': u'Contact',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'customer_name', 'fieldname': u'customer_name',
'fieldtype': 'Data', 'fieldtype': u'Data',
'label': 'Customer Name', 'label': u'Customer Name',
'permlevel': 1, 'permlevel': 1,
'print_hide': 0 'print_hide': 0
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'lead', 'fieldname': u'lead',
'fieldtype': 'Link', 'fieldtype': u'Link',
'hidden': 0, 'hidden': 0,
'in_filter': 1, 'in_filter': 1,
'label': 'Lead', 'label': u'Lead',
'oldfieldname': 'lead', 'oldfieldname': u'lead',
'oldfieldtype': 'Link', 'oldfieldtype': u'Link',
'options': 'Lead', 'options': u'Lead',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'lead_name', 'fieldname': u'lead_name',
'fieldtype': 'Data', 'fieldtype': u'Data',
'hidden': 0, 'hidden': 0,
'label': 'Name', 'label': u'Name',
'oldfieldname': 'lead_name', 'oldfieldname': u'lead_name',
'oldfieldtype': 'Data', 'oldfieldtype': u'Data',
'permlevel': 1 'permlevel': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'address_display', 'fieldname': u'address_display',
'fieldtype': 'Small Text', 'fieldtype': u'Small Text',
'hidden': 0, 'hidden': 0,
'label': 'Address', 'label': u'Address',
'oldfieldname': 'address', 'oldfieldname': u'address',
'oldfieldtype': 'Small Text', 'oldfieldtype': u'Small Text',
'permlevel': 1 'permlevel': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_display', 'fieldname': u'contact_display',
'fieldtype': 'Small Text', 'fieldtype': u'Small Text',
'label': 'Contact', 'label': u'Contact',
'permlevel': 1 'permlevel': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_mobile', 'fieldname': u'contact_mobile',
'fieldtype': 'Text', 'fieldtype': u'Text',
'label': 'Contact Mobile No', 'label': u'Contact Mobile No',
'permlevel': 1 'permlevel': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_email', 'fieldname': u'contact_email',
'fieldtype': 'Text', 'fieldtype': u'Text',
'label': 'Contact Email', 'label': u'Contact Email',
'permlevel': 1 'permlevel': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldtype': 'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': 'Column Break', 'oldfieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
'width': '50%' 'width': u'50%'
}, },
# DocField # DocField
{ {
'default': 'Today', 'default': u'Today',
'description': 'The date at which current entry is made in system.', 'description': u'The date at which current entry is made in system.',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'transaction_date', 'fieldname': u'transaction_date',
'fieldtype': 'Date', 'fieldtype': u'Date',
'label': 'Enquiry Date', 'label': u'Enquiry Date',
'oldfieldname': 'transaction_date', 'oldfieldname': u'transaction_date',
'oldfieldtype': 'Date', 'oldfieldtype': u'Date',
'permlevel': 0, 'permlevel': 0,
'reqd': 1, 'reqd': 1,
'width': '50px' 'width': u'50px'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'enquiry_type', 'fieldname': u'enquiry_type',
'fieldtype': 'Select', 'fieldtype': u'Select',
'label': 'Enquiry Type', 'label': u'Enquiry Type',
'oldfieldname': 'enquiry_type', 'oldfieldname': u'enquiry_type',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': '\nSales\nMaintenance', 'options': u'\nSales\nMaintenance',
'permlevel': 0, 'permlevel': 0,
'reqd': 1 'reqd': 1
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'default': 'Draft', 'default': u'Draft',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'status', 'fieldname': u'status',
'fieldtype': 'Select', 'fieldtype': u'Select',
'label': 'Status', 'label': u'Status',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'status', 'oldfieldname': u'status',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': '\nDraft\nSubmitted\nQuotation Sent\nOrder Confirmed\nEnquiry Lost\nCancelled', 'options': u'\nDraft\nSubmitted\nQuotation Sent\nOrder Confirmed\nEnquiry Lost\nCancelled',
'permlevel': 1, 'permlevel': 1,
'reqd': 1 'reqd': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'amended_from', 'fieldname': u'amended_from',
'fieldtype': 'Data', 'fieldtype': u'Data',
'label': 'Amended From', 'label': u'Amended From',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'amended_from', 'oldfieldname': u'amended_from',
'oldfieldtype': 'Data', 'oldfieldtype': u'Data',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1, 'print_hide': 1,
'width': '150px' 'width': u'150px'
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'amendment_date', 'fieldname': u'amendment_date',
'fieldtype': 'Date', 'fieldtype': u'Date',
'label': 'Amendment Date', 'label': u'Amendment Date',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'amendment_date', 'oldfieldname': u'amendment_date',
'oldfieldtype': 'Date', 'oldfieldtype': u'Date',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1, 'print_hide': 1,
'width': '150px' 'width': u'150px'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': '<a href="javascript:cur_frm.cscript.TerritoryHelp();">To Manage Territory, click here</a>', 'description': u'<a href="javascript:cur_frm.cscript.TerritoryHelp();">To Manage Territory, click here</a>',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'territory', 'fieldname': u'territory',
'fieldtype': 'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
'label': 'Territory', 'label': u'Territory',
'options': 'Territory', 'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
'trigger': 'Client'
},
# DocField
{
'colour': 'White:FFF',
'depends_on': 'eval:doc.enquiry_from=="Customer"',
'description': '<a href="javascript:cur_frm.cscript.CGHelp();">To Manage Customer Groups, click here</a>',
'doctype': 'DocField',
'fieldname': 'customer_group',
'fieldtype': 'Link',
'hidden': 0,
'in_filter': 1,
'label': 'Customer Group',
'oldfieldname': 'customer_group',
'oldfieldtype': 'Link',
'options': 'Customer Group',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 0, 'reqd': 0,
'search_index': 1, 'search_index': 1,
'trigger': 'Client' 'trigger': u'Client'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'doctype': 'DocField', 'depends_on': u'eval:doc.enquiry_from=="Customer"',
'fieldtype': 'Section Break', 'description': u'<a href="javascript:cur_frm.cscript.CGHelp();">To Manage Customer Groups, click here</a>',
'label': 'Items', 'doctype': u'DocField',
'oldfieldtype': 'Section Break', 'fieldname': u'customer_group',
'permlevel': 0 'fieldtype': u'Link',
}, 'hidden': 0,
# DocField
{
'colour': 'White:FFF',
'description': "Items which do not exist in Item master can also be entered on customer's request",
'doctype': 'DocField',
'fieldname': 'enquiry_details',
'fieldtype': 'Table',
'label': 'Enquiry Details',
'oldfieldname': 'enquiry_details',
'oldfieldtype': 'Table',
'options': 'Enquiry Detail',
'permlevel': 0
},
# DocField
{
'colour': 'White:FFF',
'description': 'Filing in Additional Information about the Enquiry will help you analyze your data better.',
'doctype': 'DocField',
'fieldtype': 'Section Break',
'label': 'More Info',
'oldfieldtype': 'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Column Break',
'oldfieldtype': 'Column Break',
'permlevel': 0,
'width': '50%'
},
# DocField
{
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Link',
'in_filter': 1, 'in_filter': 1,
'label': 'Company', 'label': u'Customer Group',
'oldfieldname': 'company', 'oldfieldname': u'customer_group',
'oldfieldtype': 'Link', 'oldfieldtype': u'Link',
'options': 'Company', 'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'Items',
'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u"Items which do not exist in Item master can also be entered on customer's request",
'doctype': u'DocField',
'fieldname': u'enquiry_details',
'fieldtype': u'Table',
'label': u'Enquiry Details',
'oldfieldname': u'enquiry_details',
'oldfieldtype': u'Table',
'options': u'Enquiry Detail',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'Filing in Additional Information about the Enquiry will help you analyze your data better.',
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'More Info',
'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Link',
'options': u'Company',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 1, 'reqd': 1,
@@ -467,14 +467,14 @@
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'fiscal_year', 'fieldname': u'fiscal_year',
'fieldtype': 'Select', 'fieldtype': u'Select',
'in_filter': 1, 'in_filter': 1,
'label': 'Fiscal Year', 'label': u'Fiscal Year',
'oldfieldname': 'fiscal_year', 'oldfieldname': u'fiscal_year',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': 'link:Fiscal Year', 'options': u'link:Fiscal Year',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 1, 'reqd': 1,
@@ -483,134 +483,134 @@
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'source', 'fieldname': u'source',
'fieldtype': 'Select', 'fieldtype': u'Select',
'label': 'Source', 'label': u'Source',
'oldfieldname': 'source', 'oldfieldname': u'source',
'oldfieldtype': 'Select', 'oldfieldtype': u'Select',
'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In", 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'Enter name of campaign if source of enquiry is campaign', 'description': u'Enter name of campaign if source of enquiry is campaign',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'campaign', 'fieldname': u'campaign',
'fieldtype': 'Link', 'fieldtype': u'Link',
'label': 'Campaign', 'label': u'Campaign',
'oldfieldname': 'campaign', 'oldfieldname': u'campaign',
'oldfieldtype': 'Link', 'oldfieldtype': u'Link',
'options': 'Campaign', 'options': u'Campaign',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'depends_on': 'eval:!doc.__islocal', 'depends_on': u'eval:!doc.__islocal',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'order_lost_reason', 'fieldname': u'order_lost_reason',
'fieldtype': 'Small Text', 'fieldtype': u'Small Text',
'label': 'Order Lost Reason', 'label': u'Order Lost Reason',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'order_lost_reason', 'oldfieldname': u'order_lost_reason',
'oldfieldtype': 'Small Text', 'oldfieldtype': u'Small Text',
'permlevel': 1, 'permlevel': 1,
'report_hide': 0 'report_hide': 0
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldtype': 'Column Break', 'fieldtype': u'Column Break',
'oldfieldtype': 'Column Break', 'oldfieldtype': u'Column Break',
'permlevel': 0, 'permlevel': 0,
'width': '50%' 'width': u'50%'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'Your sales person who will contact the customer in future', 'description': u'Your sales person who will contact the customer in future',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_by', 'fieldname': u'contact_by',
'fieldtype': 'Link', 'fieldtype': u'Link',
'in_filter': 1, 'in_filter': 1,
'label': 'Next Contact By', 'label': u'Next Contact By',
'oldfieldname': 'contact_by', 'oldfieldname': u'contact_by',
'oldfieldtype': 'Link', 'oldfieldtype': u'Link',
'options': 'Profile', 'options': u'Profile',
'permlevel': 0, 'permlevel': 0,
'width': '75px' 'width': u'75px'
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'Your sales person will get a reminder on this date to contact the customer', 'description': u'Your sales person will get a reminder on this date to contact the customer',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'contact_date', 'fieldname': u'contact_date',
'fieldtype': 'Date', 'fieldtype': u'Date',
'label': 'Next Contact Date', 'label': u'Next Contact Date',
'oldfieldname': 'contact_date', 'oldfieldname': u'contact_date',
'oldfieldtype': 'Date', 'oldfieldtype': u'Date',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'allow_on_submit': 0, 'allow_on_submit': 0,
'colour': 'White:FFF', 'colour': u'White:FFF',
'depends_on': 'eval:!doc.__islocal', 'depends_on': u'eval:!doc.__islocal',
'description': 'Date on which the lead was last contacted', 'description': u'Date on which the lead was last contacted',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'last_contact_date', 'fieldname': u'last_contact_date',
'fieldtype': 'Date', 'fieldtype': u'Date',
'label': 'Last Contact Date', 'label': u'Last Contact Date',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'last_contact_date', 'oldfieldname': u'last_contact_date',
'oldfieldtype': 'Date', 'oldfieldtype': u'Date',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1 'print_hide': 1
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'to_discuss', 'fieldname': u'to_discuss',
'fieldtype': 'Small Text', 'fieldtype': u'Small Text',
'label': 'To Discuss', 'label': u'To Discuss',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'to_discuss', 'oldfieldname': u'to_discuss',
'oldfieldtype': 'Small Text', 'oldfieldtype': u'Small Text',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': u'White:FFF',
'description': 'Keep a track of communication related to this enquiry which will help for future reference.', 'description': u'Keep a track of communication related to this enquiry which will help for future reference.',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldtype': 'Section Break', 'fieldtype': u'Section Break',
'label': 'Communication History', 'label': u'Communication History',
'oldfieldtype': 'Section Break', 'oldfieldtype': u'Section Break',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'allow_on_submit': 1, 'allow_on_submit': 1,
'colour': 'White:FFF', 'colour': u'White:FFF',
'doctype': 'DocField', 'doctype': u'DocField',
'fieldname': 'follow_up', 'fieldname': u'follow_up',
'fieldtype': 'Table', 'fieldtype': u'Table',
'label': 'Follow Up', 'label': u'Follow Up',
'oldfieldname': 'follow_up', 'oldfieldname': u'follow_up',
'oldfieldtype': 'Table', 'oldfieldtype': u'Table',
'options': 'Follow up', 'options': u'Follow up',
'permlevel': 0 'permlevel': 0
} }
] ]