Merge pull request #100 from simnandez/develop
[ task #176 ] Allow to use ODT templates. Works with Orders
This commit is contained in:
commit
89abdb1874
@ -200,6 +200,12 @@ class modCommande extends DolibarrModules
|
|||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove();
|
||||||
|
|
||||||
|
//ODT template
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
|
$dirodt=DOL_DATA_ROOT.'/doctemplates/orders';
|
||||||
|
create_exdir($dirodt);
|
||||||
|
dol_copy(DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt',$dirodt.'/template_order.odt',0,0);
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."'",
|
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."'",
|
||||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type) VALUES('".$this->const[0][2]."','order')"
|
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type) VALUES('".$this->const[0][2]."','order')"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user