Skip to content
Snippets Groups Projects
Commit 959b104b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: the pdf template name for typhon as not correctly set when enabling

module.
parent c4291c22
No related branches found
No related tags found
No related merge requests found
......@@ -1286,6 +1286,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
$sql.= " WHERE type = '".$type."'";
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
dol_syslog(get_class($this).'::getListOfModels sql='.$sql, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
......
......@@ -97,13 +97,13 @@ class modExpedition extends DolibarrModules
$this->const[$r][4] = 0;
$r++;
$r++;
$this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipment";
$this->const[$r][3] = "";
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "LIVRAISON_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "typhon";
......@@ -118,7 +118,6 @@ class modExpedition extends DolibarrModules
$this->const[$r][4] = 0;
$r++;
$r++;
$this->const[$r][0] = "LIVRAISON_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/delivery";
......@@ -272,7 +271,7 @@ class modExpedition extends DolibarrModules
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','shipping',".$conf->entity.")",
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[2][2]."' AND entity = ".$conf->entity,
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[2][2]."','delivery',".$conf->entity.")",
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[3][2]."','delivery',".$conf->entity.")",
);
return $this->_init($sql,$options);
......
......@@ -5,6 +5,7 @@
-- Requests to clean corrupted database
-- delete foreign key that should never exists
ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency;
ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_currency;
......@@ -76,8 +77,9 @@ UPDATE llx_product SET canvas = NULL where canvas = 'service@product';
DELETE FROM llx_boxes where box_id NOT IN (SELECT rowid FROM llx_boxes_def);
update llx_document_model set nom = 'typhon' where (nom = '' OR nom is null) and type = 'delivery';
DELETE FROM llx_document_model WHERE nom ='elevement' AND type='delivery';
DELETE FROM llx_document_model WHERE nom ='' AND type='delivery';
-- Fix: It seems this is missing for some users
insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 1, 'AC_TEL', 'system', 'Phone call' ,NULL, 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment