mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
[minor] moved the address_and_contact utils to frappe
This commit is contained in:
@@ -37,7 +37,7 @@ frappe.ui.form.on("Customer", {
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
if(!frm.doc.__islocal) {
|
||||
erpnext.utils.render_address_and_contact(frm);
|
||||
frappe.geo.render_address_and_contact(frm);
|
||||
|
||||
// custom buttons
|
||||
frm.add_custom_button(__('Accounting Ledger'), function() {
|
||||
@@ -53,7 +53,7 @@ frappe.ui.form.on("Customer", {
|
||||
erpnext.utils.set_party_dashboard_indicators(frm);
|
||||
|
||||
} else {
|
||||
erpnext.utils.clear_address_and_contact(frm);
|
||||
frappe.geo.clear_address_and_contact(frm);
|
||||
}
|
||||
|
||||
var grid = cur_frm.get_field("sales_team").grid;
|
||||
|
||||
@@ -9,7 +9,7 @@ import frappe.defaults
|
||||
from frappe.utils import flt, cint, cstr
|
||||
from frappe.desk.reportview import build_match_conditions
|
||||
from erpnext.utilities.transaction_base import TransactionBase
|
||||
from erpnext.utilities.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from frappe.geo.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
|
||||
from erpnext.accounts.party_status import get_party_status
|
||||
from erpnext import get_default_currency
|
||||
@@ -138,7 +138,7 @@ class Customer(TransactionBase):
|
||||
def on_trash(self):
|
||||
delete_contact_and_address('Customer', self.name)
|
||||
if self.lead_name:
|
||||
frappe.db.sql("update `tabLead` set status='Interested' where name=%s",self.lead_name)
|
||||
frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
|
||||
|
||||
def after_rename(self, olddn, newdn, merge=False):
|
||||
if frappe.defaults.get_global_default('cust_master_name') == 'Customer Name':
|
||||
|
||||
Reference in New Issue
Block a user