Works on Milestone module

This commit is contained in:
Regis Houssin 2010-05-04 06:37:57 +00:00
parent 21178ef2f3
commit 0afc007cdd
13 changed files with 24 additions and 31 deletions

View File

@ -55,7 +55,7 @@ class modMilestone extends DolibarrModules
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 2;
$this->picto = 'milestone';
$this->picto = 'milestone@milestone';
// Data directories to create when module is enabled
$this->dirs = array();
@ -65,7 +65,7 @@ class modMilestone extends DolibarrModules
// Config pages
$this->config_page_url = array();
$this->langfiles = array("milestone");
$this->langfiles = array("@milestone");
// Constantes
$this->const = array();
@ -112,6 +112,8 @@ class modMilestone extends DolibarrModules
function init()
{
$sql = array();
$result=$this->load_tables();
return $this->_init($sql);
}
@ -128,6 +130,16 @@ class modMilestone extends DolibarrModules
return $this->_remove($sql);
}
/**
* \brief Create tables and keys required by module
* This function is called by this->init.
* \return int <=0 if KO, >0 if OK
*/
function load_tables()
{
return $this->_load_tables('/milestone/sql/');
}
}
?>

View File

@ -164,37 +164,9 @@ INSERT INTO llx_c_field_list (rowid, element, entity, name, alias, title, align,
UPDATE llx_adherent SET pays = null where pays <= '0' and pays != '0';
ALTER table llx_adherent MODIFY pays integer;
-- add milestone module
-- drop old table
DROP TABLE llx_projet_milestone;
ALTER TABLE llx_projet drop column fk_milestone;
create table llx_milestone
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(255) NOT NULL,
description text,
datec datetime,
tms timestamp,
dateo datetime,
datee datetime,
priority integer DEFAULT 0,
fk_user_creat integer,
rang integer DEFAULT 0
)type=innodb;
ALTER TABLE llx_milestone ADD INDEX idx_milestone_fk_user_creat (fk_user_creat);
ALTER TABLE llx_milestone ADD CONSTRAINT fk_milestone_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid);
create table llx_element_milestone
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_element integer NOT NULL,
elementtype varchar(16) NOT NULL,
fk_milestone integer NOT NULL
) type=innodb;
ALTER TABLE llx_element_milestone ADD UNIQUE INDEX idx_element_milestone_idx1 (fk_element, elementtype, fk_milestone);
ALTER TABLE llx_element_milestone ADD INDEX idx_element_milestone_fk_milestone (fk_milestone);
ALTER TABLE llx_element_milestone ADD CONSTRAINT fk_element_milestone_fk_milestone FOREIGN KEY (fk_milestone) REFERENCES llx_milestone(rowid);
ALTER TABLE llx_deplacement ADD COLUMN fk_statut INTEGER DEFAULT 1 NOT NULL after type;

View File

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View File

@ -0,0 +1,9 @@
# Dolibarr language file - fr_FR - milestone
CHARSET=UTF-8
Module1790Name= Jalons
Module1790Desc= Gestion des jalons (projets, contrats, propales, ...)
Milestone=Jalon
Milestones=Jalons
NewMilestone=Nouveau jalon

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B