Fix ODT tags in BOM template
This commit is contained in:
parent
9df4e4dcb2
commit
69a7b01f20
@ -612,6 +612,7 @@ abstract class CommonDocGenerator
|
||||
'line_product_label'=>(empty($line->product_label) ? '' : $line->product_label),
|
||||
'line_product_type'=>(empty($line->product_type) ? '' : $line->product_type),
|
||||
'line_product_barcode'=>(empty($line->product_barcode) ? '' : $line->product_barcode),
|
||||
'line_product_desc'=>(empty($line->product_desc) ? '' : $line->product_desc),
|
||||
|
||||
'line_desc'=>$line->desc,
|
||||
'line_vatrate'=>vatrate($line->tva_tx, true, $line->info_bits),
|
||||
|
||||
@ -82,6 +82,7 @@ abstract class CommonObjectLine extends CommonObject
|
||||
public $product; // To store full product object after a fetch_product() on a line
|
||||
public $product_ref; // ref in product table
|
||||
public $product_label; // label in product table
|
||||
public $product_barcode; // barcode in product table
|
||||
public $product_desc; // desc in product table
|
||||
public $fk_product_type; // type in product table
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 0; // Support add of a watermark on drafts
|
||||
|
||||
// Recupere emetteur
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
if (!$this->emetteur->country_code) {
|
||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
|
||||
@ -113,7 +113,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $this->description.".<br>\n";
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">';
|
||||
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$texte .= '<input type="hidden" name="page_y" value="">';
|
||||
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
|
||||
@ -173,6 +173,11 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
}
|
||||
$texte .= '</div>';
|
||||
}
|
||||
// Add input to upload a new template file.
|
||||
$texte .= '<div>'.$langs->trans("UploadNewTemplate").' <input type="file" name="uploadfile">';
|
||||
$texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
|
||||
$texte .= '<input type="submit" class="button small reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';
|
||||
$texte .= '</div>';
|
||||
|
||||
$texte .= '</td>';
|
||||
|
||||
@ -225,6 +230,7 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
$sav_charset_output = $outputlangs->charset_output;
|
||||
$outputlangs->charset_output = 'UTF-8';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->bom->dir_output) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user