diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index a70b71c7b5fce..5e6d3796cc441 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2010-2013 Philippe Grand + * Copyright (C) 2010-2014 Philippe Grand * Copyright (C) 2012 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador @@ -191,6 +191,13 @@ function fetch($id,$ref='') $this->extraparams = (array) json_decode($obj->extraparams, true); $this->db->free($resql); + + // Retreive all extrafield + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); if ($this->statut == 0) $this->brouillon = 1;