mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Merge branch 'version-13-pre-release' into version-13
This commit is contained in:
@@ -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'''
|
||||||
|
|||||||
@@ -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():
|
||||||
cache = frappe.cache()
|
try:
|
||||||
out = cache.execute_command('MODULE LIST')
|
cache = frappe.cache()
|
||||||
|
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."
|
||||||
|
|||||||
@@ -864,7 +864,9 @@ 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 {
|
||||||
me.frm.set_value("company_address", "");
|
if (frappe.meta.get_docfield(me.frm.doctype, 'company_address')) {
|
||||||
|
me.frm.set_value("company_address", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -714,12 +714,15 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
child_columns: opts.child_columns,
|
child_columns: opts.child_columns,
|
||||||
action: function(selections, args) {
|
action: function(selections, args) {
|
||||||
let values = selections;
|
let values = selections;
|
||||||
if(values.length === 0){
|
if (values.length === 0) {
|
||||||
frappe.msgprint(__("Please select {0}", [opts.source_doctype]))
|
frappe.msgprint(__("Please select {0}", [opts.source_doctype]))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
opts.source_name = values;
|
opts.source_name = values;
|
||||||
opts.args = args;
|
if (opts.allow_child_item_selection) {
|
||||||
|
// args contains filtered child docnames
|
||||||
|
opts.args = args;
|
||||||
|
}
|
||||||
d.dialog.hide();
|
d.dialog.hide();
|
||||||
_map();
|
_map();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user