Removed deprecated usage of expedition_pdf_create
This commit is contained in:
parent
c195c6fd10
commit
610dc8cd0c
@ -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);
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user