Merge pull request #11530 from atm-florianm/FIX_if_MAIN_USE_COMPANY_NAME_OF_CONTACT_set_socobject_is_a_contact

FIX: extrafield loading bug due to assumption that an object is a thi…
This commit is contained in:
Laurent Destailleur 2019-07-22 18:43:51 +02:00 committed by GitHub
commit 45ea80a336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -393,7 +393,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
}
}
// Make substitutions into odt of thirdparty
$tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
if ($socobject->element == 'contact') {
$tmparray = $this->get_substitutionarray_contact($socobject, $outputlangs);
} else {
$tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
}
foreach($tmparray as $key=>$value)
{
try {