From d4ade7b935b8d8ab07bfda9c68d6749d9e1ecc4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Oct 2017 17:57:16 +0200 Subject: [PATCH] FIX API to get object does not return data o flinked objects --- htdocs/compta/facture/class/api_invoices.class.php | 1 + htdocs/fourn/class/api_supplier_invoices.class.php | 1 + htdocs/fourn/class/api_supplier_orders.class.php | 1 + 3 files changed, 3 insertions(+) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index aac7330711f..6c55e24f788 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -75,6 +75,7 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); } diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 26ae936d5a0..a833546f83d 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -76,6 +76,7 @@ class SupplierInvoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); } diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index 2695727c3ee..91eab23e3a8 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -76,6 +76,7 @@ class SupplierOrders extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->order->fetchObjectLinked(); return $this->_cleanObjectDatas($this->order); }