diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 10ada40f820..3a2424f55e3 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1892,10 +1892,8 @@ if ($action == 'create') {
/*
* Show object in view mode
*/
-
- $soc = new Societe($db);
- $soc->fetch($object->socid);
$object->fetch_thirdparty();
+ $soc = $object->thirdparty;
$head = propal_prepare_head($object);
print dol_get_fiche_head($head, 'comm', $langs->trans('Proposal'), -1, 'propal');
@@ -1994,9 +1992,9 @@ if ($action == 'create') {
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
- if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
- $morehtmlref .= ' ('.$langs->trans("OtherProposals").')';
+ $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1, 'customer');
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $soc->id > 0) {
+ $morehtmlref .= ' ('.$langs->trans("OtherProposals").')';
}
// Project
if (!empty($conf->projet->enabled)) {