Merge branch 'version-13-pre-release' into version-13

This commit is contained in:
Rohit Waghchaure
2021-09-19 14:39:45 +05:30
5 changed files with 21 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ import frappe
from erpnext.hooks import regional_overrides
__version__ = '13.11.0'
__version__ = '13.11.1'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -20,14 +20,16 @@ def get_indexable_web_fields():
return [df.fieldname for df in valid_fields]
def is_search_module_loaded():
cache = frappe.cache()
out = cache.execute_command('MODULE LIST')
try:
cache = frappe.cache()
out = cache.execute_command('MODULE LIST')
parsed_output = " ".join(
(" ".join([s.decode() for s in o if not isinstance(s, int)]) for o in out)
)
return "search" in parsed_output
parsed_output = " ".join(
(" ".join([s.decode() for s in o if not isinstance(s, int)]) for o in out)
)
return "search" in parsed_output
except Exception:
return False
def if_redisearch_loaded(function):
"Decorator to check if Redisearch is loaded."

View File

@@ -864,7 +864,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if (r.message) {
me.frm.set_value("billing_address", r.message);
} else {
me.frm.set_value("company_address", "");
if (frappe.meta.get_docfield(me.frm.doctype, 'company_address')) {
me.frm.set_value("company_address", "");
}
}
}
});

View File

@@ -714,12 +714,15 @@ erpnext.utils.map_current_doc = function(opts) {
child_columns: opts.child_columns,
action: function(selections, args) {
let values = selections;
if(values.length === 0){
if (values.length === 0) {
frappe.msgprint(__("Please select {0}", [opts.source_doctype]))
return;
}
opts.source_name = values;
opts.args = args;
if (opts.allow_child_item_selection) {
// args contains filtered child docnames
opts.args = args;
}
d.dialog.hide();
_map();
},

View File

@@ -272,8 +272,9 @@ def update_status(name, status):
material_request.update_status(status)
@frappe.whitelist()
def make_purchase_order(source_name, target_doc=None, args={}):
def make_purchase_order(source_name, target_doc=None, args=None):
if args is None:
args = {}
if isinstance(args, string_types):
args = json.loads(args)