diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index ef05b9b2df9..aac525ffb55 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -303,6 +303,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures $result = $object->fetch_contact($arrayidcontact[0]); } + // Fetch thirdparty to be sure thirdparty is accessible through an API call when we use ODT template + $object->fetch_thirdparty(); + // Recipient name $contactobject = null; if (!empty($usecontact)) {