From 24e6042378146a43f778448c28c3e5a4f28d1993 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 26 Aug 2013 15:32:56 +0200 Subject: [PATCH] some fix for contract model --- htdocs/core/modules/contract/modules_contract.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 1df45d7e009d1..341aa4daefcd0 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -154,10 +154,10 @@ function getVersion() * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK */ -function contract_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function contract_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$langs,$user; - $langs->load("contract"); + global $conf,$langs,$user,$hookmanager; + $langs->load("contracts"); $error=0; @@ -223,6 +223,9 @@ function contract_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h // We delete old preview require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_delete_preview($object); + + // Success in building document. We build meta file. + dol_meta_create($object); // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';