From 8e8fdccec752e6edb4fe85f75d5198f54db8af5b Mon Sep 17 00:00:00 2001 From: Kusco Date: Tue, 4 Jun 2024 14:49:25 +0200 Subject: [PATCH] #29103 Fix error in export part of the builder module (#29835) In the builder module, suggestions are offered by default. Just remove the comments for this to work. Except for this line: //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'competence_line as tl ON tl.fk_competence = t.rowid'; A "point" is missing before the "equal": //$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'competence_line as tl ON tl.fk_competence = t.rowid'; The problem is the overwriting of part of the query, if we want to couple other tables. --- .../modulebuilder/template/core/modules/modMyModule.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index a0d45565f47..c79c226fc6f 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -409,7 +409,7 @@ class modMyModule extends DolibarrModules //$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp'); $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mymodule_myobject as t'; - //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'mymodule_myobject_line as tl ON tl.fk_myobject = t.rowid'; + //$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'mymodule_myobject_line as tl ON tl.fk_myobject = t.rowid'; $this->export_sql_end[$r] .=' WHERE 1 = 1'; $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('myobject').')'; $r++; */