Merge pull request #22250 from hregis/fix_broken_feature_wrong_fk_parent_line

FIX broken feature, wrong fk_parent_line after cloning object
This commit is contained in:
Laurent Destailleur 2022-09-19 16:41:34 +02:00 committed by GitHub
commit 021a2d2b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -1265,7 +1265,7 @@ class Propal extends CommonObject
break;
}
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $line->product_type == 9) {
$fk_parent_line = $result;
}
}

View File

@ -424,7 +424,7 @@ if (empty($reshook)) {
}
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $lines[$i]->product_type == 9) {
$fk_parent_line = $result;
}
}

View File

@ -1073,7 +1073,7 @@ class Commande extends CommonOrder
return -1;
}
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $line->product_type == 9) {
$fk_parent_line = $result;
}
}

View File

@ -1244,7 +1244,7 @@ if (empty($reshook)) {
$object->lines[] = $line; // insert new line in current object
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $line->product_type == 9) {
$fk_parent_line = $result;
}
}
@ -1765,7 +1765,7 @@ if (empty($reshook)) {
}
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $lines[$i]->product_type == 9) {
$fk_parent_line = $result;
}
}

View File

@ -872,7 +872,7 @@ class Facture extends CommonInvoice
);
// Defined the new fk_parent_line
if ($result > 0) {
if ($result > 0 && $newinvoiceline->product_type == 9) {
$fk_parent_line = $result;
}
}