[hotfix] fixed Permissions Error while fetching allow_stale field value from Accounts Settings (#11182)

* [hotfix] fixed Permissions Error while fetching allow_stale field value from Accounts Settings

* [minor] renamed the allow_stale_rate method to stale_rate_allowed
This commit is contained in:
Makarand Bauskar
2017-10-25 12:17:40 +05:30
committed by Nabin Hait
parent 464289b726
commit e6712c129c
4 changed files with 9 additions and 15 deletions

View File

@@ -542,11 +542,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}
// Make read only if Accounts Settings doesn't allow stale rates
frappe.model.get_value("Accounts Settings", null, "allow_stale",
function(d){
me.set_df_property("conversion_rate", "read_only", cint(d.allow_stale) ? 0 : 1);
}
);
this.frm.set_df_property("conversion_rate", "read_only", erpnext.stale_rate_allowed());
},
set_actual_charges_based_on_currency: function() {