mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
[cleanup] move contact, address to frappe 💥
This commit is contained in:
@@ -32,6 +32,8 @@ frappe.ui.form.on("Customer", {
|
||||
erpnext.toggle_naming_series();
|
||||
}
|
||||
|
||||
frappe.contact_link = {doc: frm.doc, fieldname: 'name', doctype: 'Customer'}
|
||||
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
if(!frm.doc.__islocal) {
|
||||
|
||||
@@ -32,11 +32,7 @@ erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
|
||||
}
|
||||
});
|
||||
|
||||
this.frm.set_query("contact_person", function() {
|
||||
return {
|
||||
filters: {'customer': me.frm.doc.customer }
|
||||
}
|
||||
});
|
||||
this.frm.set_query('contact_person', erpnext.queries.contact_query);
|
||||
|
||||
this.frm.set_query("customer", function() {
|
||||
return {
|
||||
|
||||
@@ -16,6 +16,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
},
|
||||
refresh: function(doc, dt, dn) {
|
||||
this._super(doc, dt, dn);
|
||||
|
||||
if(doc.docstatus == 1 && doc.status!=='Lost') {
|
||||
cur_frm.add_custom_button(__('Make Sales Order'),
|
||||
cur_frm.cscript['Make Sales Order']);
|
||||
|
||||
@@ -203,13 +203,6 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
// for backward compatibility: combine new and previous states
|
||||
$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
|
||||
|
||||
cur_frm.cscript.new_contact = function(){
|
||||
tn = frappe.model.make_new_doc_and_get_name('Contact');
|
||||
locals['Contact'][tn].is_customer = 1;
|
||||
if(doc.customer) locals['Contact'][tn].customer = doc.customer;
|
||||
frappe.set_route('Form', 'Contact', tn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
|
||||
Reference in New Issue
Block a user