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 from erpnext.hooks import regional_overrides
__version__ = '13.11.0' __version__ = '13.11.1'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

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

View File

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

View File

@@ -719,7 +719,10 @@ erpnext.utils.map_current_doc = function(opts) {
return; return;
} }
opts.source_name = values; opts.source_name = values;
if (opts.allow_child_item_selection) {
// args contains filtered child docnames
opts.args = args; opts.args = args;
}
d.dialog.hide(); d.dialog.hide();
_map(); _map();
}, },

View File

@@ -272,8 +272,9 @@ def update_status(name, status):
material_request.update_status(status) material_request.update_status(status)
@frappe.whitelist() @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): if isinstance(args, string_types):
args = json.loads(args) args = json.loads(args)