diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 826a406bcf0..1590379cc8f 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -288,8 +288,7 @@ if ($_GET["action"] == 'create')
print '
';
if (!empty($object->fk_delivery_address))
{
- $object->fetch_adresse_livraison($object->fk_delivery_address);
- print 'deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'';
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$_GET['socid'],'none','commande',$object->id);
}
print ' | '."\n";
@@ -653,8 +652,7 @@ else
print '';
if (!empty($expedition->fk_delivery_address))
{
- $expedition->fetch_adresse_livraison($expedition->fk_delivery_address);
- print 'deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin=shipment&originid='.$expedition->id.'>'.$expedition->deliveryaddress->label.'';
+ $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$expedition->id,$expedition->fk_delivery_address,$expedition->deliveryaddress->socid,'none','shipment',$expedition->id);
}
print ' | '."\n";
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index dc9446e4b0a..0cd50fa8c18 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -1986,7 +1986,7 @@ class Form
{
require_once(DOL_DOCUMENT_ROOT ."/comm/adresse_livraison.class.php");
$livraison=new AdresseLivraison($this->db);
- $livraison->fetch_adresse($selected);
+ $result=$livraison->fetch_adresse($selected);
print 'socid.'&id='.$livraison->id.'&action=edit&origin='.$origin.'&originid='.$originid.'>'.$livraison->label.'';
}
else