From 15cc45b8ae9273972b3824906ff708267104a5a3 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 4 Jan 2019 10:52:10 +0100 Subject: [PATCH 1/3] FIX: Can't generate invoice pdf --- htdocs/core/actions_massactions.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 4fad63ca840..0c66d51d589 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -680,6 +681,7 @@ if ($massaction == 'confirm_createbills') } $id = $objecttmp->id; // For builddoc action + $object = $objecttmp; // Builddoc $donotredirect = 1; From 4694af048837c94c9b3e738f1724618b0a574a21 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 4 Jan 2019 11:45:02 +0100 Subject: [PATCH 2/3] FIX: Can't generate invoice pdf --- htdocs/commande/list.php | 1 + htdocs/core/actions_massactions.inc.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 04ef69b2638..27fa4bd48e3 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -102,6 +102,7 @@ if (! $sortorder) $sortorder='DESC'; $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new Commande($db); $hookmanager->initHooks(array($contextpage)); $extrafields = new ExtraFields($db); diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 0c66d51d589..a89b6dcdb2c 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -681,7 +681,6 @@ if ($massaction == 'confirm_createbills') } $id = $objecttmp->id; // For builddoc action - $object = $objecttmp; // Builddoc $donotredirect = 1; From f3dd875fc799a059225221629323e8d007458b33 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 4 Jan 2019 12:00:39 +0100 Subject: [PATCH 3/3] FIX: Can't generate invoice pdf --- htdocs/commande/list.php | 1 - htdocs/core/actions_massactions.inc.php | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 27fa4bd48e3..04ef69b2638 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -102,7 +102,6 @@ if (! $sortorder) $sortorder='DESC'; $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$object = new Commande($db); $hookmanager->initHooks(array($contextpage)); $extrafields = new ExtraFields($db); diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index a89b6dcdb2c..0c66d51d589 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -681,6 +681,7 @@ if ($massaction == 'confirm_createbills') } $id = $objecttmp->id; // For builddoc action + $object = $objecttmp; // Builddoc $donotredirect = 1;