2
0
forked from Wavyzz/dolibarr

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

module.
This commit is contained in:
Laurent Destailleur
2014-05-06 13:31:30 +02:00
parent c4291c228e
commit 959b104b78
3 changed files with 7 additions and 5 deletions

View File

@@ -1286,6 +1286,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
$sql.= " WHERE type = '".$type."'"; $sql.= " WHERE type = '".$type."'";
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")"; $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); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {

View File

@@ -97,12 +97,12 @@ class modExpedition extends DolibarrModules
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$r++; $r++;
$r++;
$this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH"; $this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine"; $this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipment"; $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipment";
$this->const[$r][3] = ""; $this->const[$r][3] = "";
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "LIVRAISON_ADDON_PDF"; $this->const[$r][0] = "LIVRAISON_ADDON_PDF";
$this->const[$r][1] = "chaine"; $this->const[$r][1] = "chaine";
@@ -118,7 +118,6 @@ class modExpedition extends DolibarrModules
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$r++; $r++;
$r++;
$this->const[$r][0] = "LIVRAISON_ADDON_PDF_ODT_PATH"; $this->const[$r][0] = "LIVRAISON_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine"; $this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/delivery"; $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, "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.")", "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, "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); return $this->_init($sql,$options);

View File

@@ -5,6 +5,7 @@
-- Requests to clean corrupted database -- Requests to clean corrupted database
-- delete foreign key that should never exists -- delete foreign key that should never exists
ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency; ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency;
ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_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); 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 ='elevement' AND type='delivery';
DELETE FROM llx_document_model WHERE nom ='' AND type='delivery';
-- Fix: It seems this is missing for some users -- 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); insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 1, 'AC_TEL', 'system', 'Phone call' ,NULL, 2);