diff --git a/htdocs/exports/export.class.php b/htdocs/exports/export.class.php
index a725f18236b..98ab6d419ab 100644
--- a/htdocs/exports/export.class.php
+++ b/htdocs/exports/export.class.php
@@ -59,8 +59,8 @@ class Export
/**
- * \brief Charge les lots de donn�es exportables
- * \param user Objet utilisateur qui exporte
+ * \brief Load an exportable dataset
+ * \param user Object user making export
* \param filter Code export pour charger un lot de donn�es particulier
*/
function load_arrays($user,$filter='')
@@ -120,17 +120,19 @@ class Export
}
}
- // Nom module
+ // Module
$this->array_export_module[$i]=$module;
+ // Icon
+ $this->array_export_icon[$i]=(isset($module->export_icon[$r])?$module->export_icon[$r]:$module->picto);
// Code du dataset export
$this->array_export_code[$i]=$module->export_code[$r];
- // Libell� du dataset export
+ // Libelle du dataset export
$this->array_export_label[$i]=$module->getDatasetLabel($r);
- // Tableau des champ � exporter (cl�=champ, valeur=libell�)
+ // Tableau des champ a exporter (cle=champ, valeur=libelle)
$this->array_export_fields[$i]=$module->export_fields_array[$r];
- // Tableau des entites � exporter (cl�=champ, valeur=entite)
+ // Tableau des entites a exporter (cle=champ, valeur=entite)
$this->array_export_entities[$i]=$module->export_entities_array[$r];
- // Tableau des alias � exporter (cl�=champ, valeur=alias)
+ // Tableau des alias a exporter (cle=champ, valeur=alias)
$this->array_export_alias[$i]=$module->export_alias_array[$r];
// Tableau des operations speciales sur champ
$this->array_export_special[$i]=$module->export_special_array[$r];
@@ -266,8 +268,8 @@ class Export
}
/**
- * \brief Cr�� un mod�le d'export
- * \param user Objet utilisateur qui cr�e
+ * \brief Create an export model in database
+ * \param user Objet utilisateur qui cree
*/
function create($user)
{
@@ -281,8 +283,7 @@ class Export
$sql.= 'label, type, field)';
$sql.= " VALUES ('".$this->model_name."', '".$this->datatoexport."', '".$this->hexa."')";
- dolibarr_syslog("Export.class.php::create sql=".$sql);
-
+ dolibarr_syslog("Export::create sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -291,15 +292,17 @@ class Export
}
else
{
- $this->error=$this->db->error()." sql=".$sql;
+ $this->error=$this->db->lasterror();
+ $this->errno=$this->db->lasterrno();
+ dolibarr_syslog("Export::create error ".$this->error, LOG_ERR);
$this->db->rollback();
return -1;
}
}
/**
- * \brief Recup�re de la base les caract�ristiques d'un modele d'export
- * \param rowid id du mod�le � r�cup�rer
+ * \brief Load an export profil from database
+ * \param rowid id of profil to load
*/
function fetch($id)
{
@@ -307,8 +310,7 @@ class Export
$sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em';
$sql.= ' WHERE em.rowid = '.$id;
- dolibarr_syslog("Export::fetch sql=$sql");
-
+ dolibarr_syslog("Export::fetch sql=".$sql, LOG_DEBUG);
$result = $this->db->query($sql) ;
if ($result)
{
@@ -335,6 +337,61 @@ class Export
}
}
+
+ /**
+ * \brief Delete object in database
+ * \param user User that delete
+ * \param notrigger 0=launch triggers after, 1=disable triggers
+ * \return int <0 if KO, >0 if OK
+ */
+ function delete($user, $notrigger=0)
+ {
+ global $conf, $langs;
+ $error=0;
+
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."export_model";
+ $sql.= " WHERE rowid=".$this->id;
+
+ $this->db->begin();
+
+ dolibarr_syslog(get_class($this)."::delete sql=".$sql);
+ $resql = $this->db->query($sql);
+ if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
+
+ if (! $error)
+ {
+ if (! $notrigger)
+ {
+ // Uncomment this and change MYOBJECT to your own tag if you
+ // want this action call a trigger.
+
+ //// Call triggers
+ //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
+ //$interface=new Interfaces($this->db);
+ //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
+ //if ($result < 0) { $error++; $this->errors=$interface->errors; }
+ //// End call triggers
+ }
+ }
+
+ // Commit or rollback
+ if ($error)
+ {
+ foreach($this->errors as $errmsg)
+ {
+ dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
+ $this->error.=($this->error?', '.$errmsg:$errmsg);
+ }
+ $this->db->rollback();
+ return -1*$error;
+ }
+ else
+ {
+ $this->db->commit();
+ return 1;
+ }
+ }
+
}
?>
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index 50be99dd805..ab5c64eff7d 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -170,6 +170,15 @@ if ($action == 'builddoc')
}
}
+if ($action == 'deleteprof')
+{
+ if ($_GET["id"])
+ {
+ $objexport->fetch($_GET["id"]);
+ $result=$objexport->delete($user);
+ }
+}
+
if ($action == 'add_export_model')
{
if ($export_name)
@@ -195,7 +204,12 @@ if ($action == 'add_export_model')
}
else
{
- $mesg='
'.$objexport->error.'
';
+ $langs->load("errors");
+ if ($objexport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
+ {
+ $mesg=''.$langs->trans("ErrorExportDuplicateProfil").'
';
+ }
+ else $mesg=''.$objexport->error.'
';
}
}
else
@@ -269,10 +283,10 @@ if ($step == 1 || ! $datatoexport)
{
$val=!$val;
print '| ';
- print img_object($objexport->array_export_module[$key]->getName(),$objexport->array_export_module[$key]->picto).' ';
print $objexport->array_export_module[$key]->getName();
print ' | ';
//print $value;
+ print img_object($objexport->array_export_module[$key]->getName(),$objexport->array_export_icon[$key]).' ';
print $objexport->array_export_label[$key];
print ' | ';
print ''.img_picto($langs->trans("NewExport"),'filenew').'';
@@ -319,13 +333,16 @@ if ($step == 2 && $datatoexport)
// Module
print ' |
| '.$langs->trans("Module").' | ';
print '';
- print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
+ //print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
print $objexport->array_export_module[0]->getName();
print ' |
';
// Lot de donnees a exporter
print '| '.$langs->trans("DatasetToExport").' | ';
- print ''.$objexport->array_export_label[0].' |
';
+ print '';
+ print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_icon[0]).' ';
+ print $objexport->array_export_label[0];
+ print ' | ';
print '';
print '
';
@@ -459,13 +476,16 @@ if ($step == 3 && $datatoexport)
// Module
print '| '.$langs->trans("Module").' | ';
print '';
- print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
+ //print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
print $objexport->array_export_module[0]->getName();
print ' |
';
// Lot de donn�es � exporter
print '| '.$langs->trans("DatasetToExport").' | ';
- print ''.$objexport->array_export_label[0].' |
';
+ print '';
+ print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_icon[0]).' ';
+ print $objexport->array_export_label[0];
+ print ' | ';
// Nbre champs export�s
print '| '.$langs->trans("ExportedFields").' | ';
@@ -521,32 +541,6 @@ if ($step == 3 && $datatoexport)
print '';
- // Bouton exports profils
- if (sizeof($array_selected))
- {
- print '
';
- print $langs->trans("SaveExportModel");
-
- print '';
- }
-
print '';
@@ -565,6 +559,63 @@ if ($step == 3 && $datatoexport)
print '';
+
+ // Area for profils export
+ if (sizeof($array_selected))
+ {
+ print '
';
+ print $langs->trans("SaveExportModel");
+
+ print '';
+ }
+
}
if ($step == 4 && $datatoexport)
@@ -602,13 +653,16 @@ if ($step == 4 && $datatoexport)
// Module
print '
| '.$langs->trans("Module").' | ';
print '';
- print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
+ //print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
print $objexport->array_export_module[0]->getName();
print ' |
';
// Lot de donnees a exporter
print '| '.$langs->trans("DatasetToExport").' | ';
- print ''.$objexport->array_export_label[0].' |
';
+ print '';
+ print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_icon[0]).' ';
+ print $objexport->array_export_label[0];
+ print ' | ';
// Nbre champs exportes
print '| '.$langs->trans("ExportedFields").' | ';
diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php
index 7ac226234bd..37db623b0fb 100644
--- a/htdocs/includes/modules/modFournisseur.class.php
+++ b/htdocs/includes/modules/modFournisseur.class.php
@@ -218,6 +218,7 @@ class modFournisseur extends DolibarrModules
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Factures fournisseurs et lignes de facture';
+ $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineHT",'fd.total_ttc'=>"LineTTC",'fd.tva'=>"LineVAT");
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_taux'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line");
@@ -229,6 +230,7 @@ class modFournisseur extends DolibarrModules
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Factures fournisseurs et reglements';
+ $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php
index 5f416805b2a..8d2629ece51 100644
--- a/htdocs/includes/modules/modSociete.class.php
+++ b/htdocs/includes/modules/modSociete.class.php
@@ -199,6 +199,7 @@ class modSociete extends DolibarrModules
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='ExportDataset_company_2';
+ $this->export_icon[$r]='contact';
$this->export_permission[$r]=array(array("societe","contact","export"));
$this->export_fields_array[$r]=array('c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode");
$this->export_entities_array[$r]=array('c.civilite'=>"contact",'c.name'=>'contact','c.firstname'=>'contact','c.datec'=>"contact",'c.tms'=>"contact",'c.priv'=>"contact",'c.address'=>"contact",'c.cp'=>"contact",'c.ville'=>"contact",'c.phone'=>"contact",'c.fax'=>"contact",'c.email'=>"contact",'p.libelle'=>"contact",'p.code'=>"contact",'s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company");
diff --git a/htdocs/includes/modules/modStock.class.php b/htdocs/includes/modules/modStock.class.php
index e5c2d4f93e9..52577382ba6 100644
--- a/htdocs/includes/modules/modStock.class.php
+++ b/htdocs/includes/modules/modStock.class.php
@@ -18,25 +18,24 @@
*/
/**
- \defgroup stock Module stock
- \brief Module pour gerer la tenue de stocks produits
- \version $Id$
+ * \defgroup stock Module stock
+ * \brief Module pour gerer la tenue de stocks produits
+ * \version $Id$
*/
/**
- \file htdocs/includes/modules/modStock.class.php
- \ingroup stock
- \brief Fichier de description et activation du module Stock
+ * \file htdocs/includes/modules/modStock.class.php
+ * \ingroup stock
+ * \brief Fichier de description et activation du module Stock
*/
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
/**
- \class modStock
- \brief Classe de description et activation du module Stock
+ * \class modStock
+ * \brief Classe de description et activation du module Stock
*/
-
class modStock extends DolibarrModules
{
@@ -122,11 +121,11 @@ class modStock extends DolibarrModules
$r++;
$this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]="Stocks"; // Translation key (used only if key ExportDataset_xxx_z not found)
+ $this->export_label[$r]="WarehousesAndProducts"; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("stock","lire"));
- $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'RealStock','e.rowid'=>'IdWarehouse','e.label'=>'LabelWareHouse','e.label'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town');
- $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock','e.rowid'=>'warehouse','e.label'=>'warehouse','e.label'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse');
- $this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification','ps.reel'=>'quantity','e.rowid'=>'idwarehouse','e.label'=>'labelwarehouse','e.label'=>'descwarehouse','e.lieu'=>'lieuwarehouse','e.address'=>'addresswarehouse','e.cp'=>'zipwarehouse','e.ville'=>'townwarehouse');
+ $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LabelWareHouse','e.label'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock');
+ $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.label'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock');
+ $this->export_alias_array[$r]=array('e.rowid'=>'idwarehouse','e.label'=>'labelwarehouse','e.label'=>'descwarehouse','e.lieu'=>'lieuwarehouse','e.address'=>'addresswarehouse','e.cp'=>'zipwarehouse','e.ville'=>'townwarehouse','p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification','ps.reel'=>'quantity');
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'entrepot as e';
$this->export_sql_end[$r] .=' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid';
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 162a6721727..e1533eb615f 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -35,4 +35,5 @@ WarningAllowUrlFopenMustBeOn=Parameter allow_url_fopen must be set to
WarningBuildScriptNotRunned=Script %s was not yet ran to build graphics, or there is no data to show.
WarningBookmarkAlreadyExists=A bookmark with this title or this target (URL) already exists.
WarningPassIsEmpty=Warning, database password is empty. This is a security hole. You should add a password to your database and change your conf.php file to reflect this.
-ErrorNoAccountancyModuleLoaded=No accountancy module activated
\ No newline at end of file
+ErrorNoAccountancyModuleLoaded=No accountancy module activated
+ErrorExportDuplicateProfil=This profil name already exists for this export set.
\ No newline at end of file
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 94cc7e08a7e..b1303c96169 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -58,4 +58,5 @@ MininumStockShort=Stock min
StockUpShort=Stock up
IdWarehouse=Id warehouse
DescWareHouse=Description warehouse
-LieuWareHouse=Localisation warehouse
\ No newline at end of file
+LieuWareHouse=Localisation warehouse
+WarehousesAndProducts=Warehouses and products
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang
index 4e16606c3d3..fcf58f2948f 100644
--- a/htdocs/langs/fr_FR/errors.lang
+++ b/htdocs/langs/fr_FR/errors.lang
@@ -35,4 +35,5 @@ WarningAllowUrlFopenMustBeOn=Attention, le param
WarningBuildScriptNotRunned=Le script %s n'a pas encore été lancé pour générer les graphiques ou il n'y a aucune donnée à afficher.
WarningBookmarkAlreadyExists=Un marque-page avec ce titre ou cette destination (URL) existe déjà.
WarningPassIsEmpty=Attention, le mot de passe de la base de donnée Dolibarr est vide. Cela représente une faille de sécurité. Il est recommandé d'ajouter manuellement un mot de passe à la base et de modifier le fichier conf.php pour refléter ce changement.
-ErrorNoAccountancyModuleLoaded=Aucun module de comptabilité activé
\ No newline at end of file
+ErrorNoAccountancyModuleLoaded=Aucun module de comptabilité activé
+ErrorExportDuplicateProfil=Ce nom de profil existe déjà pour ce lot d'export.
diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang
index ace92eb1986..1f99d60ae31 100644
--- a/htdocs/langs/fr_FR/stocks.lang
+++ b/htdocs/langs/fr_FR/stocks.lang
@@ -59,3 +59,4 @@ StockUpShort=Stock max
IdWarehouse=Id entrepôt
DescWareHouse=Description entrepôt
LieuWareHouse=Lieu entrepôt
+WarehousesAndProducts=Entrepôts et produits
\ No newline at end of file
diff --git a/mysql/migration/2.4.0-2.5.0.sql b/mysql/migration/2.4.0-2.5.0.sql
index 45e5587ebd9..c3ac4686d36 100644
--- a/mysql/migration/2.4.0-2.5.0.sql
+++ b/mysql/migration/2.4.0-2.5.0.sql
@@ -76,6 +76,9 @@ alter table llx_don add note_public text;
alter table llx_don add model_pdf varchar(50);
alter table llx_don add import_key varchar(14);
+ALTER TABLE llx_export_model DROP INDEX uk_export_model;
+ALTER TABLE llx_export_model ADD UNIQUE uk_export_model (label,type);
+
-- Reverse option
update llx_const set visible = 1, name = 'FACTURE_ENABLE_RECUR', value='1' where name = 'FACTURE_DISABLE_RECUR' and value = '0';
delete from llx_const where name = 'FACTURE_DISABLE_RECUR' and value = '1';
@@ -83,3 +86,4 @@ delete from llx_const where name = 'FACTURE_DISABLE_RECUR' and value = '1';
update llx_bank_account set ref = label where ref is null or ref = '';
+
diff --git a/mysql/tables/llx_export_model.key.sql b/mysql/tables/llx_export_model.key.sql
index 55a70d0ef23..0669065b7d3 100644
--- a/mysql/tables/llx_export_model.key.sql
+++ b/mysql/tables/llx_export_model.key.sql
@@ -1,5 +1,5 @@
-- ===================================================================
--- Copyright (C) 2007 Laurent Destailleur
+-- Copyright (C) 2007-2008 Laurent Destailleur
-- Copyright (C) 2007 Regis Houssin
--
-- This program is free software; you can redistribute it and/or modify
@@ -20,4 +20,4 @@
-- ===================================================================
-ALTER TABLE llx_export_model ADD UNIQUE uk_export_model (label);
\ No newline at end of file
+ALTER TABLE llx_export_model ADD UNIQUE uk_export_model (label,type);