fix(minor): add debounce to calls
This commit is contained in:
parent
fec8dba16c
commit
39154e5296
@ -664,12 +664,12 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
// When multiple companies are set up. in case company name is changed set default company address
|
// When multiple companies are set up. in case company name is changed set default company address
|
||||||
company:function(frm){
|
company: function(frm){
|
||||||
if (frm.doc.company)
|
if (frm.doc.company) {
|
||||||
{
|
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method:"erpnext.setup.doctype.company.company.get_default_company_address",
|
method: "erpnext.setup.doctype.company.company.get_default_company_address",
|
||||||
args:{name:frm.doc.company, existing_address: frm.doc.company_address},
|
args: {name:frm.doc.company, existing_address: frm.doc.company_address || ""},
|
||||||
|
debounce: 2000,
|
||||||
callback: function(r){
|
callback: function(r){
|
||||||
if (r.message){
|
if (r.message){
|
||||||
frm.set_value("company_address",r.message)
|
frm.set_value("company_address",r.message)
|
||||||
|
@ -446,9 +446,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
method: "erpnext.controllers.accounts_controller.get_default_taxes_and_charges",
|
method: "erpnext.controllers.accounts_controller.get_default_taxes_and_charges",
|
||||||
args: {
|
args: {
|
||||||
"master_doctype": taxes_and_charges_field.options,
|
"master_doctype": taxes_and_charges_field.options,
|
||||||
"tax_template": me.frm.doc.taxes_and_charges,
|
"tax_template": me.frm.doc.taxes_and_charges || "",
|
||||||
"company": me.frm.doc.company
|
"company": me.frm.doc.company
|
||||||
},
|
},
|
||||||
|
debounce: 2000,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc && r.message) {
|
if(!r.exc && r.message) {
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
|
@ -75,7 +75,7 @@ class Company(NestedSet):
|
|||||||
|
|
||||||
def validate_default_accounts(self):
|
def validate_default_accounts(self):
|
||||||
accounts = [
|
accounts = [
|
||||||
["Default Bank Account", "default_bank_account"], ["Default Cash Account", "default_cash_account"],
|
["Default Bank Account", "default_bank_account"], ["Default Cash Account", "default_cash_account"],
|
||||||
["Default Receivable Account", "default_receivable_account"], ["Default Payable Account", "default_payable_account"],
|
["Default Receivable Account", "default_receivable_account"], ["Default Payable Account", "default_payable_account"],
|
||||||
["Default Expense Account", "default_expense_account"], ["Default Income Account", "default_income_account"],
|
["Default Expense Account", "default_expense_account"], ["Default Income Account", "default_income_account"],
|
||||||
["Stock Received But Not Billed Account", "stock_received_but_not_billed"], ["Stock Adjustment Account", "stock_adjustment_account"],
|
["Stock Received But Not Billed Account", "stock_received_but_not_billed"], ["Stock Adjustment Account", "stock_adjustment_account"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user