Laurent Destailleur 1 ano atrás
pai
commit
6cdb7c929a

+ 4 - 1
htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php

@@ -395,10 +395,13 @@ class doc_generic_asset_odt extends ModelePDFAsset
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 2
htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php

@@ -400,12 +400,14 @@ class doc_generic_bom_odt extends ModelePDFBom
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
-
 					if ($foundtagforlines) {
 						$linenumber = 0;
 						foreach ($object->lines as $line) {

+ 4 - 1
htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php

@@ -411,10 +411,13 @@ class doc_generic_order_odt extends ModelePDFCommandes
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php

@@ -407,10 +407,13 @@ class doc_generic_contract_odt extends ModelePDFContract
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php

@@ -478,10 +478,13 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						foreach ($object->lines as $line) {

+ 4 - 1
htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php

@@ -470,10 +470,13 @@ class doc_generic_invoice_odt extends ModelePDFFactures
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 2
htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php

@@ -395,12 +395,14 @@ class doc_generic_mo_odt extends ModelePDFMo
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
-
 					if ($foundtagforlines) {
 						$linenumber = 0;
 						foreach ($object->lines as $line) {

+ 4 - 1
htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php

@@ -450,10 +450,13 @@ class doc_generic_proposal_odt extends ModelePDFPropales
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php

@@ -402,10 +402,13 @@ class doc_generic_reception_odt extends ModelePdfReception
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php

@@ -407,10 +407,13 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php

@@ -401,10 +401,13 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php

@@ -429,10 +429,13 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;

+ 4 - 1
htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php

@@ -427,10 +427,13 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						foreach ($object->members as $u) {

+ 5 - 1
htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php

@@ -420,11 +420,15 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
+
 					if ($foundtagforlines) {
 						$linenumber = 0;
 						foreach ($object->lines as $line) {

+ 4 - 1
htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php

@@ -418,10 +418,13 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
 					$foundtagforlines = 1;
 					try {
 						$listlines = $odfHandler->setSegment('lines');
-					} catch (OdfException $e) {
+					} catch (OdfExceptionSegmentNotFound $e) {
 						// We may arrive here if tags for lines not present into template
 						$foundtagforlines = 0;
 						dol_syslog($e->getMessage(), LOG_INFO);
+					} catch (OdfException $e) {
+						$foundtagforlines = 0;
+						dol_syslog($e->getMessage(), LOG_INFO);
 					}
 					if ($foundtagforlines) {
 						$linenumber = 0;