mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
[cleanup] move contact, address to frappe 💥
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
frappe.provide("erpnext.support");
|
||||
|
||||
frappe.ui.form.on("Warranty Claim", {
|
||||
setup: function(frm) {
|
||||
frm.set_query('contact_person', erpnext.queries.contact_query);
|
||||
frm.set_query('customer_address', erpnext.queries.address_query);
|
||||
},
|
||||
customer: function(frm) {
|
||||
erpnext.utils.get_party_details(frm);
|
||||
},
|
||||
@@ -17,6 +21,8 @@ frappe.ui.form.on("Warranty Claim", {
|
||||
|
||||
erpnext.support.WarrantyClaim = frappe.ui.form.Controller.extend({
|
||||
refresh: function() {
|
||||
frappe.contact_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
|
||||
|
||||
if(!cur_frm.doc.__islocal &&
|
||||
(cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
|
||||
cur_frm.add_custom_button(__('Maintenance Visit'),
|
||||
@@ -40,18 +46,6 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||
set_multiple(cdt,cdn,{status:'Open'});
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:{ 'customer': doc.customer}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:{ 'customer': doc.customer}
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
|
||||
var cond = [];
|
||||
var filter = [
|
||||
|
||||
Reference in New Issue
Block a user