Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2021-01-27 21:09:13 +01:00
commit 8c97b55548

View File

@ -7111,7 +7111,17 @@ abstract class CommonObject
{
var val = $("select[name=\""+parent_list+"\"]").val();
var parentVal = parent_list + ":" + val;
if(val > 0) {
if(typeof val == "string"){
if(val != "") {
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
$("select[name=\""+child_list+"\"] option[parent]").remove();
$("select[name=\""+child_list+"\"]").append(options);
} else {
var options = orig_select.find("option[parent]").clone();
$("select[name=\""+child_list+"\"] option[parent]").remove();
$("select[name=\""+child_list+"\"]").append(options);
}
} else if(val > 0) {
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
$("select[name=\""+child_list+"\"] option[parent]").remove();
$("select[name=\""+child_list+"\"]").append(options);