Work on generic odt generation
This commit is contained in:
parent
0f1d95d7fa
commit
f49d0eed46
@ -105,7 +105,19 @@ if ($modulepart)
|
|||||||
{
|
{
|
||||||
// On fait une verification des droits et on definit le repertoire concerne
|
// On fait une verification des droits et on definit le repertoire concerne
|
||||||
|
|
||||||
// Wrapping pour les factures
|
// Wrapping for third parties
|
||||||
|
if ($modulepart == 'company')
|
||||||
|
{
|
||||||
|
$user->getrights('companies');
|
||||||
|
if ($user->rights->societe->lire || preg_match('/^specimen/i',$original_file))
|
||||||
|
{
|
||||||
|
$accessallowed=1;
|
||||||
|
}
|
||||||
|
$original_file=$conf->societe->dir_output.'/'.$original_file;
|
||||||
|
$sqlprotectagainstexternals = "SELECT rowid as fk_soc FROM ".MAIN_DB_PREFIX."societe WHERE rowid='$refname'";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapping for invoices
|
||||||
if ($modulepart == 'facture')
|
if ($modulepart == 'facture')
|
||||||
{
|
{
|
||||||
$user->getrights('facture');
|
$user->getrights('facture');
|
||||||
|
|||||||
@ -123,7 +123,7 @@ class FormFile
|
|||||||
/**
|
/**
|
||||||
* \brief Show the box with list of available documents for object
|
* \brief Show the box with list of available documents for object
|
||||||
* \param modulepart propal=propal, facture=facture, ...
|
* \param modulepart propal=propal, facture=facture, ...
|
||||||
* \param filename Sub dir to scan (use '' if filedir already complete)
|
* \param filename Sub dir to scan (Example: '9/9', 'FA9999'). Use '' if filedir already complete)
|
||||||
* \param filedir Dir to scan
|
* \param filedir Dir to scan
|
||||||
* \param urlsource Url of origin page (for return)
|
* \param urlsource Url of origin page (for return)
|
||||||
* \param genallowed Generation is allowed (1/0 or array of formats)
|
* \param genallowed Generation is allowed (1/0 or array of formats)
|
||||||
|
|||||||
@ -1403,7 +1403,7 @@ else
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$somethingshown=$formfile->show_documents('company','',$filedir,$urlsource,$genallowed,$delallowed,'','',0,0,28,0,'',0,'',$soc->default_lang);
|
$somethingshown=$formfile->show_documents('company',$soc->id,$filedir,$urlsource,$genallowed,$delallowed,'','',0,0,28,0,'',0,'',$soc->default_lang);
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user