mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX wrong ODT path for multicompany
This commit is contained in:
parent
4394fe635d
commit
8150cc6159
|
|
@ -182,7 +182,7 @@ class modAdherent extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "MEMBER_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/members";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/members";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -438,8 +438,8 @@ class modAdherent extends DolibarrModules
|
|||
|
||||
// ODT template
|
||||
/*
|
||||
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt';
|
||||
$dirodt=DOL_DATA_ROOT.'/doctemplates/orders';
|
||||
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/members/template_member.odt';
|
||||
$dirodt=DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/members';
|
||||
$dest=$dirodt.'/template_order.odt';
|
||||
|
||||
if (file_exists($src) && ! file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class modBom extends DolibarrModules
|
|||
$this->const = array(
|
||||
1 => array('BOM_ADDON_PDF', 'chaine', 'generic_bom_odt', 'Name of PDF model of BOM', 0),
|
||||
2 => array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
|
||||
3 => array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0)
|
||||
3 => array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/boms', '', 0)
|
||||
);
|
||||
|
||||
// Some keys to add into the overwriting translation tables
|
||||
|
|
@ -479,7 +479,7 @@ class modBom extends DolibarrModules
|
|||
|
||||
// ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/boms/template_bom.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/boms';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/boms';
|
||||
$dest = $dirodt.'/template_bom.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class modContrat extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "CONTRACT_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/contracts";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/contracts";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -230,7 +230,7 @@ class modContrat extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/contracts/template_contract.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/contracts';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/contracts';
|
||||
$dest = $dirodt.'/template_contract.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class modExpedition extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "EXPEDITION_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/shipments";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/shipments";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -120,7 +120,7 @@ class modExpedition extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "DELIVERY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/deliveries";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/deliveries";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -343,7 +343,7 @@ class modExpedition extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/shipments/template_shipment.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/shipments';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/shipments';
|
||||
$dest = $dirodt.'/template_shipment.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class modFournisseur extends DolibarrModules
|
|||
// Add ability ODT for Supplier orders
|
||||
$this->const[$r][0] = "SUPPLIER_ORDER_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/supplier_orders";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/supplier_orders";
|
||||
$this->const[$r][3] = '';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -125,7 +125,7 @@ class modFournisseur extends DolibarrModules
|
|||
// Add ability ODT for Supplier Invoices
|
||||
$this->const[$r][0] = "SUPPLIER_INVOICE_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/supplier_invoices";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -972,7 +972,7 @@ class modFournisseur extends DolibarrModules
|
|||
|
||||
//ODT template for Supplier Orders
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_orders/template_supplier_order.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_orders';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/supplier_orders';
|
||||
$dest = $dirodt.'/template_supplier_order.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
@ -993,7 +993,7 @@ class modFournisseur extends DolibarrModules
|
|||
|
||||
//ODT template for Supplier Invoice
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_invoices/template_supplier_invoices.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_invoices';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/supplier_invoices';
|
||||
$dest = $dirodt.'/template_supplier_invoices.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class modHoliday extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "HOLIDAY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/holiday";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/holiday";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -308,7 +308,7 @@ class modHoliday extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
/*$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/holiday/template_holiday.odt';
|
||||
$dirodt=DOL_DATA_ROOT.'/doctemplates/holiday';
|
||||
$dirodt=DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/holiday';
|
||||
$dest=$dirodt.'/template_order.odt';
|
||||
|
||||
if (file_exists($src) && ! file_exists($dest))
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class modMrp extends DolibarrModules
|
|||
$this->const = array(
|
||||
//1=>array('MRP_MO_ADDON_PDF', 'chaine', 'vinci', 'Name of default PDF model of MO', 0),
|
||||
2=>array('MRP_MO_ADDON', 'chaine', 'mod_mo_standard', 'Name of numbering rules of MO', 0),
|
||||
3=>array('MRP_MO_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/mrps', '', 0)
|
||||
3=>array('MRP_MO_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/mrps', '', 0)
|
||||
);
|
||||
|
||||
// Some keys to add into the overwriting translation tables
|
||||
|
|
@ -442,7 +442,7 @@ class modMrp extends DolibarrModules
|
|||
|
||||
// ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/mrps/template_mo.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/mrps';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/mrps';
|
||||
$dest = $dirodt.'/template_mo.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class modProjet extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/projects";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/projects";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -113,7 +113,7 @@ class modProjet extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "PROJECT_TASK_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/tasks";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/tasks";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -379,7 +379,7 @@ class modProjet extends DolibarrModules
|
|||
|
||||
//ODT template for project
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/projects/template_project.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/projects';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/projects';
|
||||
$dest = $dirodt.'/template_project.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
@ -395,7 +395,7 @@ class modProjet extends DolibarrModules
|
|||
|
||||
//ODT template for tasks
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/tasks/template_task_summary.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/tasks';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tasks';
|
||||
$dest = $dirodt.'/template_task_summary.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class modReception extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "RECEPTION_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/receptions";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/receptions";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -266,7 +266,7 @@ class modReception extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/reception/template_reception.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/reception';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/reception';
|
||||
$dest = $dirodt.'/template_reception.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class modSociete extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "COMPANY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/thirdparties";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/thirdparties";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
|
@ -947,7 +947,7 @@ class modSociete extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/thirdparties/template_thirdparty.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/thirdparties';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/thirdparties';
|
||||
$dest = $dirodt.'/template_thirdparty.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -96,14 +96,14 @@ class modStock extends DolibarrModules
|
|||
$r++;
|
||||
$this->const[$r][0] = "STOCK_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/stocks";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/stocks";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "MOUVEMENT_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/stocks/movements";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/stocks/movements";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
|
|
@ -538,7 +538,7 @@ class modStock extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/stocks/template_warehouse.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/stocks';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/stocks';
|
||||
$dest = $dirodt.'/template_warehouse.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
|
||||
$this->const[$r][0] = "SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/supplier_proposals";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/supplier_proposals";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_proposals/template_supplier_proposal.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_proposals';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/supplier_proposals';
|
||||
$dest = $dirodt.'/template_supplier_proposal.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class modTicket extends DolibarrModules
|
|||
$this->const = array(
|
||||
1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
|
||||
2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0),
|
||||
3 => array('TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0),
|
||||
3 => array('TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0),
|
||||
4 => array('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'chaine', 0, 'Automatically mark ticket as read when created from backend', 0),
|
||||
5 => array('TICKET_DELAY_BEFORE_FIRST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time before a first answer to a ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
6 => array('TICKET_DELAY_SINCE_LAST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time between two answers on the same ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
|
|
@ -414,7 +414,7 @@ class modTicket extends DolibarrModules
|
|||
|
||||
//ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/tickets/template_ticket.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/tickets';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tickets';
|
||||
$dest = $dirodt.'/template_ticket.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ class modMyModule extends DolibarrModules
|
|||
}
|
||||
if ($myTmpObjectArray['includerefgeneration']) {
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_myobjects.odt';
|
||||
$dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir;
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/'.$moduledir;
|
||||
$dest = $dirodt.'/template_myobjects.odt';
|
||||
|
||||
if (file_exists($src) && !file_exists($dest)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user