diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
index a503ab94344..c6e43d8ce60 100644
--- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
+++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
@@ -18,6 +18,18 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
+
+create table llx_c_email_templates
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer DEFAULT 1 NOT NULL, -- multi company id
+ type_template varchar(32), -- template for wich type of email (send invoice by email, send order, ...)
+ datec datetime,
+ label varchar(255),
+ content text
+)ENGINE=innodb;
+
+
-- 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;
diff --git a/htdocs/install/mysql/tables/llx_domain.sql b/htdocs/install/mysql/tables/llx_c_email_template.sql
similarity index 79%
rename from htdocs/install/mysql/tables/llx_domain.sql
rename to htdocs/install/mysql/tables/llx_c_email_template.sql
index 95b21b29497..b3f8ca1e1e0 100644
--- a/htdocs/install/mysql/tables/llx_domain.sql
+++ b/htdocs/install/mysql/tables/llx_c_email_template.sql
@@ -14,13 +14,15 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see .
--
+-- Table with templates of emails
-- ===================================================================
-create table llx_domain
+create table llx_c_email_templates
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer DEFAULT 1 NOT NULL, -- multi company id
+ type_template varchar(32), -- template for wich type of email (send invoice by email, send order, ...)
datec datetime,
label varchar(255),
- note text
+ content text
)ENGINE=innodb;
-
diff --git a/htdocs/install/mysql/tables/llx_document_model.sql b/htdocs/install/mysql/tables/llx_document_model.sql
index 8a37f142f42..0b93936837e 100644
--- a/htdocs/install/mysql/tables/llx_document_model.sql
+++ b/htdocs/install/mysql/tables/llx_document_model.sql
@@ -17,7 +17,7 @@
-- along with this program. If not, see .
--
--
--- Liste des modeles de document disponibles
+-- Table with list of document templates for document generation (odt/pdf/...)
-- ===================================================================
create table llx_document_model