Fix: [ bug #1367 ] "Show invoice" link after a POS sell throws an error
This commit is contained in:
parent
bcfc9f8aa1
commit
bafc53ad95
@ -1855,6 +1855,9 @@ else if ($action == 'builddoc') // En get ou en post
|
|||||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||||
if (GETPOST('fk_bank')) $object->fk_bank=GETPOST('fk_bank');
|
if (GETPOST('fk_bank')) $object->fk_bank=GETPOST('fk_bank');
|
||||||
|
|
||||||
|
// object->modelpdf can be empty when we are using odt template by default and builddoc is called by POS module (invoice was just created and no template ODT template was selected).
|
||||||
|
if (! empty($object->modelpdf))
|
||||||
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang='';
|
||||||
@ -1871,6 +1874,7 @@ else if ($action == 'builddoc') // En get ou en post
|
|||||||
dol_print_error($db,$result);
|
dol_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove file in doc form
|
// Remove file in doc form
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user