From 54b995ab028306bbe0069f7d95d5898af2e6ae70 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 11 Jul 2025 09:22:02 +0200 Subject: [PATCH 1/2] Fix(Export): fix bad where clause --- front/export.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/front/export.php b/front/export.php index d30f67f446..f8e1dc86eb 100644 --- a/front/export.php +++ b/front/export.php @@ -35,20 +35,14 @@ $PluginOrderOrder = new PluginOrderOrder(); if ($config->canGenerateOrderPDF() && ($PluginOrderOrder->canGenerateWithoutValidation() || $PluginOrderOrder->canGenerate())) { - $PluginOrderOrder = new PluginOrderOrder(); + $criteria = ['id' => $_GET['id']] + getEntitiesRestrictCriteria( + getTableForItemType(PluginOrderOrder::class), + '', + '', + true + ); - // load related order with entity restrict criteria - if ( - $PluginOrderOrder->getFromDBByCrit([ - 'id' => $_GET['id'], - 'entities_id' => getEntitiesRestrictCriteria( - getTableForItemType(PluginOrderOrder::class), - '', - '', - true - ), - ]) - ) { + if ($PluginOrderOrder->getFromDBByCrit($criteria)) { $PluginOrderOrder->generateOrder($_GET); } else { Html::displayRightError("You don't have permission to perform this action."); From e703e3d333a32c2a5d94452f80277c1adcdb4595 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 11 Jul 2025 09:56:39 +0200 Subject: [PATCH 2/2] adapt changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8956bed6d4..67faa9f5c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed + +- Fix ODT export generation + ## [2.11.0] - 2025-07-10 ### Fixed