Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
This fixes the issue #3185 https://github.com/Dolibarr/dolibarr/issues/3185
This commit is contained in:
parent
fda5822d5a
commit
2aaf3a466d
@ -527,7 +527,13 @@ abstract class CommonDocGenerator
|
||||
$line->fetch_optionals($line->rowid,$extralabels);
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($line,$resarray,$extrafields,$array_key=$array_key,$outputlangs);
|
||||
|
||||
|
||||
// Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
|
||||
$product = new Product($this->db);
|
||||
$result = $product->fetch(null, $line->product_ref);
|
||||
foreach($product->array_options as $key=>$label)
|
||||
$resarray["line_".$key] = $label;
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user