Merge branch 'master' into edge
This commit is contained in:
commit
5bbe063222
20
patches/april_2013/p02_add_country_and_currency.py
Normal file
20
patches/april_2013/p02_add_country_and_currency.py
Normal file
@ -0,0 +1,20 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
if not webnotes.conn.exists("Country", "Aruba"):
|
||||
webnotes.bean({
|
||||
"doctype": "Country",
|
||||
"country_name": "Aruba",
|
||||
"time_zones": "America/Aruba",
|
||||
"date_format": "mm-dd-yyyy"
|
||||
}).insert()
|
||||
|
||||
if not webnotes.conn.exists("Currency", "AWG"):
|
||||
webnotes.bean({
|
||||
"doctype": "Currency",
|
||||
"currency_name": "AWG",
|
||||
"fraction": "Cent",
|
||||
"fraction_units": 100,
|
||||
"symbol": "Afl",
|
||||
"number_format": "#,###.##"
|
||||
}).insert()
|
||||
|
18
patches/april_2013/p03_fixes_for_lead_in_quotation.py
Normal file
18
patches/april_2013/p03_fixes_for_lead_in_quotation.py
Normal file
@ -0,0 +1,18 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
webnotes.conn.sql("""update `tabQuotation` set customer_name = organization
|
||||
where quotation_to = 'Lead' and ifnull(lead, '') != ''
|
||||
and ifnull(organization, '') != ''""")
|
||||
|
||||
webnotes.conn.sql("""update `tabQuotation` set customer_name = lead_name
|
||||
where quotation_to = 'Lead' and ifnull(lead, '') != ''
|
||||
and ifnull(organization, '') = '' and ifnull(lead_name, '') != ''""")
|
||||
|
||||
webnotes.conn.sql("""update `tabQuotation` set contact_display = lead_name
|
||||
where quotation_to = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")
|
||||
|
||||
webnotes.conn.sql("""update `tabOpportunity` set contact_display = lead_name
|
||||
where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")
|
||||
|
||||
webnotes.conn.sql("""update `tabOpportunity` opp, `tabLead` lead
|
||||
set opp.customer_name = lead.company_name where opp.lead = lead.name""")
|
@ -158,6 +158,7 @@ patch_list = [
|
||||
"patches.january_2013.enable_currencies",
|
||||
"patches.january_2013.remove_unwanted_permission",
|
||||
"patches.january_2013.remove_landed_cost_master",
|
||||
"execute:webnotes.reload_doc('core', 'doctype', 'print_format')",
|
||||
"patches.january_2013.reload_print_format",
|
||||
"patches.january_2013.rebuild_tree",
|
||||
"execute:webnotes.reload_doc('core','doctype','docfield') #2013-01-28",
|
||||
@ -231,4 +232,10 @@ patch_list = [
|
||||
"patches.march_2013.p08_create_aii_accounts",
|
||||
"patches.march_2013.p03_update_buying_amount",
|
||||
"patches.april_2013.p01_update_serial_no_valuation_rate",
|
||||
"patches.april_2013.p02_add_country_and_currency",
|
||||
"patches.april_2013.p03_fixes_for_lead_in_quotation",
|
||||
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02',
|
||||
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02',
|
||||
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',
|
||||
|
||||
]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
|
||||
// ===============================================================
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||
if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||
if(!doc.date) doc.transaction_date = date.obj_to_str(new Date());
|
||||
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
|
||||
@ -42,10 +42,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
if(doc.enquiry_from) {
|
||||
if(doc.enquiry_from == 'Customer') {
|
||||
hide_field(['lead', 'lead_name']);
|
||||
hide_field('lead');
|
||||
}
|
||||
else if (doc.enquiry_from == 'Lead') {
|
||||
hide_field(['customer', 'customer_address', 'contact_person', 'customer_name', 'contact_display', 'customer_group']);
|
||||
hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,13 +85,14 @@ cur_frm.cscript.enquiry_from = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
||||
if(doc.enquiry_from == 'Lead'){
|
||||
unhide_field(['lead']);
|
||||
hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||
hide_field(['customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||
doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||
}
|
||||
else if(doc.enquiry_from == 'Customer'){
|
||||
unhide_field(['customer']);
|
||||
hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory', 'customer_group']);
|
||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||
hide_field(['lead', 'address_display', 'contact_display', 'contact_mobile',
|
||||
'contact_email', 'territory', 'customer_group']);
|
||||
doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,8 +155,11 @@ cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
|
||||
|
||||
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
||||
if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
|
||||
if(doc.lead) {
|
||||
get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
||||
unhide_field(['customer_name', 'address_display','contact_mobile', 'contact_email',
|
||||
'territory']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,8 +98,8 @@ class DocType(TransactionBase):
|
||||
else:
|
||||
desc = 'Contact customer '+cstr(self.doc.customer)
|
||||
elif self.doc.lead:
|
||||
if self.doc.lead_name:
|
||||
desc = 'Contact '+cstr(self.doc.lead_name)
|
||||
if self.doc.contact_display:
|
||||
desc = 'Contact '+cstr(self.doc.contact_display)
|
||||
else:
|
||||
desc = 'Contact lead '+cstr(self.doc.lead)
|
||||
desc = desc+ '. By : ' + cstr(self.doc.contact_by)
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-23 19:57:18",
|
||||
"creation": "2013-03-07 18:50:30",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 14:23:07",
|
||||
"modified": "2013-04-02 16:28:08",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -53,6 +53,7 @@
|
||||
"oldfieldname": "naming_series",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "OPPT",
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@ -64,6 +65,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nLead\nCustomer",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
@ -79,6 +81,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Customer",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -93,13 +96,15 @@
|
||||
"oldfieldname": "lead",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Lead",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -124,6 +129,7 @@
|
||||
"oldfieldname": "enquiry_type",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nSales\nMaintenance",
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@ -131,7 +137,8 @@
|
||||
"fieldname": "items",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Items",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Items which do not exist in Item master can also be entered on customer's request",
|
||||
@ -141,14 +148,16 @@
|
||||
"label": "Opportunity Items",
|
||||
"oldfieldname": "enquiry_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Opportunity Item"
|
||||
"options": "Opportunity Item",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Keep a track of communication related to this enquiry which will help for future reference.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "communication_history",
|
||||
"fieldtype": "Section Break",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@ -157,13 +166,15 @@
|
||||
"fieldtype": "HTML",
|
||||
"label": "Communication HTML",
|
||||
"oldfieldname": "follow_up",
|
||||
"oldfieldtype": "Table"
|
||||
"oldfieldtype": "Table",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_info",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Contact Info"
|
||||
"label": "Contact Info",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -172,7 +183,8 @@
|
||||
"in_filter": 1,
|
||||
"label": "Contact Person",
|
||||
"options": "Contact",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -181,7 +193,8 @@
|
||||
"in_filter": 1,
|
||||
"label": "Customer Address",
|
||||
"options": "Address",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -204,7 +217,8 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break3",
|
||||
"fieldtype": "Column Break"
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -227,16 +241,6 @@
|
||||
"label": "Contact Mobile No",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lead_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Name",
|
||||
"oldfieldname": "lead_name",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.enquiry_from==\"Customer\"",
|
||||
"description": "<a href=\"#Sales Browser/Customer Group\">To manage Territory, click here</a>",
|
||||
@ -250,6 +254,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Customer Group",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
@ -262,6 +267,7 @@
|
||||
"label": "Territory",
|
||||
"options": "Territory",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
@ -271,13 +277,15 @@
|
||||
"fieldname": "more_info",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "More Info",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break1",
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -289,6 +297,7 @@
|
||||
"label": "Opportunity Date",
|
||||
"oldfieldname": "transaction_date",
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "50px"
|
||||
},
|
||||
@ -302,6 +311,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Fiscal Year",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@ -312,7 +322,8 @@
|
||||
"label": "Source",
|
||||
"oldfieldname": "source",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In"
|
||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Enter name of campaign if source of enquiry is campaign",
|
||||
@ -322,7 +333,8 @@
|
||||
"label": "Campaign",
|
||||
"oldfieldname": "campaign",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Campaign"
|
||||
"options": "Campaign",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.__islocal",
|
||||
@ -346,6 +358,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@ -354,6 +367,7 @@
|
||||
"fieldname": "column_break2",
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -366,6 +380,7 @@
|
||||
"oldfieldname": "contact_by",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile",
|
||||
"read_only": 0,
|
||||
"width": "75px"
|
||||
},
|
||||
{
|
||||
@ -375,7 +390,8 @@
|
||||
"fieldtype": "Date",
|
||||
"label": "Next Contact Date",
|
||||
"oldfieldname": "contact_date",
|
||||
"oldfieldtype": "Date"
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -398,7 +414,8 @@
|
||||
"label": "To Discuss",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "to_discuss",
|
||||
"oldfieldtype": "Small Text"
|
||||
"oldfieldtype": "Small Text",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
@ -29,7 +29,10 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
// ===================================================================================
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.manage_rounded_total();
|
||||
if(!doc.quotation_to) hide_field(['customer','customer_address','contact_person','customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||
if(!doc.quotation_to)
|
||||
hide_field(['customer','customer_address','contact_person','customer_name','lead',
|
||||
'address_display', 'contact_display', 'contact_mobile', 'contact_email',
|
||||
'territory', 'customer_group']);
|
||||
if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
|
||||
@ -42,10 +45,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
if(doc.quotation_to) {
|
||||
if(doc.quotation_to == 'Customer') {
|
||||
hide_field(['lead', 'lead_name', 'organization']);
|
||||
hide_field('lead');
|
||||
}
|
||||
else if (doc.quotation_to == 'Lead') {
|
||||
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
|
||||
hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,13 +64,13 @@ 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',
|
||||
hide_field(['lead', 'customer','customer_address','contact_person',
|
||||
'customer_name','address_display','contact_display','contact_mobile','contact_email',
|
||||
'territory','customer_group', 'organization']);
|
||||
'territory','customer_group']);
|
||||
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.organization = "";
|
||||
doc.lead = 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 = "";
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +188,9 @@ cur_frm.cscript.pull_enquiry_detail = function(doc,cdt,cdn){
|
||||
else if(doc.quotation_to == 'Customer') {
|
||||
unhide_field(['customer','customer_address','contact_person','territory','customer_group']);
|
||||
}
|
||||
refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']);
|
||||
refresh_many(['quotation_details','quotation_to','customer','customer_address',
|
||||
'contact_person', 'lead', 'address_display', 'contact_display', 'contact_mobile',
|
||||
'contact_email', 'territory', 'customer_group', 'order_type']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-10 16:34:19",
|
||||
"creation": "2013-04-03 09:50:56",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 16:27:53",
|
||||
"modified": "2013-04-03 09:53:04",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -34,9 +34,7 @@
|
||||
"parent": "Quotation",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
"read": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocType",
|
||||
@ -46,6 +44,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -59,6 +58,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "QTN",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@ -71,6 +71,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nLead\nCustomer",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
@ -85,6 +86,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Customer",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
@ -97,17 +99,8 @@
|
||||
"oldfieldname": "lead",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Lead",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "lead_name",
|
||||
"fieldtype": "Text",
|
||||
"hidden": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Lead Name",
|
||||
"read_only": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -118,14 +111,6 @@
|
||||
"label": "Customer Name",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "organization",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Organization",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "address_display",
|
||||
@ -173,6 +158,7 @@
|
||||
"fieldname": "column_break1",
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -186,6 +172,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "transaction_date",
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"width": "100px"
|
||||
@ -201,6 +188,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nSales\nMaintenance",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -211,6 +199,7 @@
|
||||
"label": "Items",
|
||||
"oldfieldtype": "Section Break",
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
@ -222,18 +211,21 @@
|
||||
"oldfieldname": "quotation_details",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Quotation Item",
|
||||
"read_only": 0,
|
||||
"width": "40px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "sec_break23",
|
||||
"fieldtype": "Section Break",
|
||||
"options": "Simple"
|
||||
"options": "Simple",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break34",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -256,12 +248,14 @@
|
||||
"fieldtype": "Button",
|
||||
"label": "Re-Calculate Values",
|
||||
"oldfieldtype": "Button",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break35",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -277,6 +271,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Opportunity",
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -289,13 +284,15 @@
|
||||
"no_copy": 0,
|
||||
"oldfieldtype": "Button",
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break0",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Price List and Currency"
|
||||
"label": "Price List and Currency",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
||||
@ -308,6 +305,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Price List",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"width": "100px"
|
||||
@ -320,6 +318,7 @@
|
||||
"label": "Price List Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@ -329,12 +328,14 @@
|
||||
"fieldtype": "Float",
|
||||
"label": "Price List Currency Conversion Rate",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break2",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -348,6 +349,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"width": "100px"
|
||||
@ -362,6 +364,7 @@
|
||||
"oldfieldname": "conversion_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
},
|
||||
@ -370,7 +373,8 @@
|
||||
"fieldname": "taxes",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Taxes",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -381,7 +385,8 @@
|
||||
"oldfieldname": "charge",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Sales Taxes and Charges Master",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -390,7 +395,8 @@
|
||||
"hidden": 0,
|
||||
"label": "Get Taxes and Charges",
|
||||
"oldfieldtype": "Button",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -399,7 +405,8 @@
|
||||
"label": "Sales Taxes and Charges",
|
||||
"oldfieldname": "other_charges",
|
||||
"oldfieldtype": "Table",
|
||||
"options": "Sales Taxes and Charges"
|
||||
"options": "Sales Taxes and Charges",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -407,7 +414,8 @@
|
||||
"fieldtype": "Button",
|
||||
"label": "Calculate Taxes and Charges",
|
||||
"oldfieldtype": "Button",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -426,7 +434,8 @@
|
||||
"fieldtype": "HTML",
|
||||
"label": "Taxes and Charges Calculation",
|
||||
"oldfieldtype": "HTML",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -434,7 +443,8 @@
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Totals",
|
||||
"oldfieldtype": "Section Break",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -482,6 +492,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -532,7 +543,8 @@
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Terms and Conditions",
|
||||
"oldfieldtype": "Section Break",
|
||||
"print_hide": 0
|
||||
"print_hide": 0,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -543,6 +555,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Terms and Conditions",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 1
|
||||
},
|
||||
{
|
||||
@ -551,7 +564,8 @@
|
||||
"fieldtype": "Button",
|
||||
"label": "Get Terms and Conditions",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "get_tc_details"
|
||||
"options": "get_tc_details",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -560,7 +574,8 @@
|
||||
"label": "Terms and Conditions HTML",
|
||||
"oldfieldtype": "HTML",
|
||||
"options": "You can add Terms and Notes that will be printed in the Transaction",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -568,18 +583,21 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"label": "Term Details",
|
||||
"oldfieldname": "terms",
|
||||
"oldfieldtype": "Text Editor"
|
||||
"oldfieldtype": "Text Editor",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Contact Info"
|
||||
"label": "Contact Info",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break98",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -590,7 +608,8 @@
|
||||
"in_filter": 1,
|
||||
"label": "Customer Address",
|
||||
"options": "Address",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@ -603,12 +622,14 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Contact",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "col_break99",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -621,6 +642,7 @@
|
||||
"label": "Territory",
|
||||
"options": "Territory",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -634,6 +656,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Customer Group",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -644,7 +667,8 @@
|
||||
"fieldtype": "Section Break",
|
||||
"label": "More Info",
|
||||
"oldfieldtype": "Section Break",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@ -654,8 +678,9 @@
|
||||
"label": "Letter Head",
|
||||
"oldfieldname": "letter_head",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Letter Head",
|
||||
"print_hide": 1
|
||||
"options": "\nDefault\nERP Grey Large\nERP LOGO\nERPNext Logo Black\nERPNext WT Logo",
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Select the relevant company name if you have multiple companies.",
|
||||
@ -668,6 +693,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"width": "150px"
|
||||
@ -683,6 +709,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
@ -695,6 +722,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Fiscal Year",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -717,6 +745,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@ -747,6 +776,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Campaign",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 0
|
||||
},
|
||||
{
|
||||
@ -758,7 +788,8 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "order_lost_reason",
|
||||
"oldfieldtype": "Small Text",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@ -771,6 +802,7 @@
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Print Heading",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"report_hide": 1
|
||||
},
|
||||
{
|
||||
@ -795,6 +827,7 @@
|
||||
"oldfieldname": "amendment_date",
|
||||
"oldfieldtype": "Date",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
@ -804,7 +837,8 @@
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Communication History",
|
||||
"oldfieldtype": "Section Break",
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@ -815,6 +849,7 @@
|
||||
"oldfieldname": "follow_up",
|
||||
"oldfieldtype": "Table",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"width": "40px"
|
||||
},
|
||||
{
|
||||
@ -824,13 +859,27 @@
|
||||
"hidden": 1,
|
||||
"label": "File List",
|
||||
"no_copy": 1,
|
||||
"print_hide": 1
|
||||
"print_hide": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Sales Manager",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Sales Manager",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
@ -840,6 +889,8 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Sales User",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
@ -849,6 +900,19 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Sales User",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Customer",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
@ -858,17 +922,43 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Maintenance Manager",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Maintenance Manager",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Maintenance User",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Maintenance User",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
]
|
@ -146,11 +146,12 @@ class DocType(StockController):
|
||||
"posting_date": self.doc.posting_date,
|
||||
"posting_time": self.doc.posting_time
|
||||
})
|
||||
|
||||
|
||||
# check valuation rate mandatory
|
||||
if row.qty != "" and not row.valuation_rate and \
|
||||
flt(previous_sle.get("qty_after_transaction")) <= 0:
|
||||
webnotes.msgprint(_("As existing qty for item: ") + row.item_code +
|
||||
_(" at warehouse: ") + row.warehouse +
|
||||
_(" is less than equals to zero in the system, \
|
||||
valuation rate is mandatory for this item"), raise_exception=1)
|
||||
|
||||
|
@ -161,12 +161,12 @@ class TransactionBase(DocListController):
|
||||
if address_display.startswith('\n'): address_display = address_display[1:]
|
||||
|
||||
ret = {
|
||||
'lead_name' : extract('lead_name'),
|
||||
'contact_display' : extract('lead_name'),
|
||||
'address_display' : address_display,
|
||||
'territory' : extract('territory'),
|
||||
'contact_mobile' : extract('mobile_no'),
|
||||
'contact_email' : extract('email_id'),
|
||||
'organization' : extract('company_name')
|
||||
'customer_name' : extract('company_name') or extract('lead_name')
|
||||
}
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user