mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
[fix] [client script] call cur_frm.cscript.custom_ type functions in the callback of standard functions
This commit is contained in:
@@ -54,7 +54,7 @@ $.extend(erpnext.complete_setup, {
|
||||
$('header').toggle(false); // hide toolbar
|
||||
}
|
||||
|
||||
wn.call({
|
||||
return wn.call({
|
||||
method:"webnotes.country_info.get_country_timezone_info",
|
||||
callback: function(data) {
|
||||
erpnext.country_info = data.message.country_info;
|
||||
@@ -74,7 +74,7 @@ $.extend(erpnext.complete_setup, {
|
||||
var data = d.get_values();
|
||||
if(!data) return;
|
||||
$(this).set_working();
|
||||
$c_obj('Setup Control','setup_account',data,function(r, rt){
|
||||
return $c_obj('Setup Control','setup_account',data,function(r, rt){
|
||||
$(this).done_working();
|
||||
if(!r.exc) {
|
||||
sys_defaults = r.message;
|
||||
|
||||
@@ -55,7 +55,7 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({
|
||||
onload_post_render: function() {
|
||||
if(this.frm.doc.__islocal && this.frm.doc.company) {
|
||||
var me = this;
|
||||
this.frm.call({
|
||||
return this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "onload_post_render",
|
||||
freeze: true,
|
||||
@@ -116,7 +116,7 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({
|
||||
price_list_name: function(buying_or_selling) {
|
||||
var me = this;
|
||||
if(this.frm.doc.price_list_name) {
|
||||
this.frm.call({
|
||||
return this.frm.call({
|
||||
method: "setup.utils.get_price_list_currency",
|
||||
args: {
|
||||
price_list_name: this.frm.doc.price_list_name,
|
||||
@@ -557,7 +557,7 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({
|
||||
get_terms: function() {
|
||||
var me = this;
|
||||
if(this.frm.doc.tc_name) {
|
||||
this.frm.call({
|
||||
return this.frm.call({
|
||||
method: "webnotes.client.get_value",
|
||||
args: {
|
||||
doctype: "Terms and Conditions",
|
||||
|
||||
@@ -5,7 +5,7 @@ var wn = {};
|
||||
// Add / update a new Lead / Communication
|
||||
// subject, sender, description
|
||||
erpnext.send_message = function(opts) {
|
||||
wn.call({
|
||||
return wn.call({
|
||||
type: "POST",
|
||||
method: "website.helpers.contact.send_message",
|
||||
args: opts,
|
||||
@@ -202,7 +202,7 @@ $.extend(wn.cart, {
|
||||
}
|
||||
window.location.href = "login";
|
||||
} else {
|
||||
wn.call({
|
||||
return wn.call({
|
||||
type: "POST",
|
||||
method: "website.helpers.cart.update_cart",
|
||||
args: {
|
||||
|
||||
Reference in New Issue
Block a user