diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e5dbb540b85..fa25c48366d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -164,8 +164,6 @@ class Expedition extends CommonObject $now=dol_now(); - if (empty($this->model_pdf)) $this->model_pdf=$conf->global->EXPEDITION_ADDON_PDF; - require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php'; $error = 0; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 4743ad5f25b..6200f2c3c5f 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -113,6 +113,7 @@ if ($action == 'add') $object->socid = $objectsrc->socid; $object->ref_customer = $objectsrc->ref_client; + $object->model_pdf = GETPOST('model'); $object->date_delivery = $date_delivery; // Date delivery planed $object->fk_delivery_address = $objectsrc->fk_delivery_address; $object->shipping_method_id = GETPOST('shipping_method_id','int'); @@ -662,6 +663,14 @@ if ($action == 'create') print '