Removed deprecated usage of project_pdf_create
This commit is contained in:
parent
4b3191b64e
commit
9dbf054026
@ -129,7 +129,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=delivery_order_pdf_create($db, $object,$_REQUEST['model'],$outputlangs);
|
$result= $object->generateDocument($_REQUEST['model'],$outputlangs);
|
||||||
}
|
}
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -202,7 +202,7 @@ if ($action == 'builddoc') // En get ou en post
|
|||||||
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=delivery_order_pdf_create($db, $object, $object->modelpdf, $outputlangs);
|
$result= $object->generateDocument($object->modelpdf, $outputlangs);
|
||||||
}
|
}
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -276,7 +276,7 @@ if (empty($reshook))
|
|||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
||||||
}
|
}
|
||||||
$result=project_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);
|
||||||
|
|||||||
@ -159,7 +159,7 @@ if ($action == 'builddoc' && $user->rights->projet->creer)
|
|||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
||||||
}
|
}
|
||||||
$result=task_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);
|
||||||
|
|||||||
@ -355,7 +355,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
// Baleine
|
// Baleine
|
||||||
$localobject->modelpdf='baleine';
|
$localobject->modelpdf='baleine';
|
||||||
$result=project_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