Removed deprecated usage of expedition_pdf_create

This commit is contained in:
Marcos García de La Fuente 2014-09-16 20:38:28 +02:00
parent c195c6fd10
commit 610dc8cd0c
2 changed files with 5 additions and 5 deletions

View File

@ -261,7 +261,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{ {
$ret=$object->fetch($id); // Reload to get new records $ret=$object->fetch($id); // Reload to get new records
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs); $result = $object->generateDocument($object->modelpdf, $outputlangs);
} }
if ($result < 0) if ($result < 0)
{ {
@ -362,7 +362,7 @@ else if ($action == 'builddoc') // En get ou en post
$outputlangs = new Translate("",$conf); $outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
} }
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs); $result = $object->generateDocument($object->modelpdf, $outputlangs);
if ($result <= 0) if ($result <= 0)
{ {
dol_print_error($db,$result); dol_print_error($db,$result);
@ -1598,7 +1598,7 @@ else if ($id || $ref)
// Build document if it not exists // Build document if it not exists
if (! $file || ! is_readable($file)) if (! $file || ! is_readable($file))
{ {
$result=expedition_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); $result = $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref));
if ($result <= 0) if ($result <= 0)
{ {
dol_print_error($db,$result); dol_print_error($db,$result);

View File

@ -409,14 +409,14 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
// Merou // Merou
$localobject->modelpdf='merou'; $localobject->modelpdf='merou';
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs); $result= $localobject->generateDocument($localobject->modelpdf, $langs);
$this->assertLessThan($result, 0); $this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";
// Rouget // Rouget
$localobject->modelpdf='rouget'; $localobject->modelpdf='rouget';
$result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs); $result= $localobject->generateDocument($localobject->modelpdf, $langs);
$this->assertLessThan($result, 0); $this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n"; print __METHOD__." result=".$result."\n";