From 300abfd5e20c312c683d42dc175b4b4dcf3ea599 Mon Sep 17 00:00:00 2001 From: Michael Jeanmotte Date: Wed, 29 Jan 2020 14:44:50 +0100 Subject: [PATCH] Fetch thirdparty to be sure thirdparty is accessible through an API call when we use ODT template --- .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 3 +++ 1 file changed, 3 insertions(+) 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)) {