Uniformize name of standard PDF template

This commit is contained in:
Laurent Destailleur 2017-05-04 20:16:55 +02:00
parent 39d9a0f979
commit 768df56c07
12 changed files with 38 additions and 23 deletions

View File

@ -265,7 +265,7 @@ print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setu
$head=fichinter_admin_prepare_head();
dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), -1, 'intervention');
// Interventions numbering model

View File

@ -49,7 +49,7 @@ class pdf_rouget extends ModelePdfExpedition
$this->db = $db;
$this->name = "rouget";
$this->description = $langs->trans("DocumentModelSimple");
$this->description = $langs->trans("DocumentModelStandardPDF");
$this->type = 'pdf';
$formatarray=pdf_getFormat();

View File

@ -65,7 +65,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->db = $db;
$this->name = 'soleil';
$this->description = $langs->trans("DocumentModelStandard");
$this->description = $langs->trans("DocumentModelStandardPDF");
// Dimension page pour format A4
$this->type = 'pdf';

View File

@ -53,7 +53,7 @@ class modProduct extends DolibarrModules
$this->module_position = 20;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des produits";
$this->description = "Product management";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
@ -83,7 +83,14 @@ class modProduct extends DolibarrModules
$this->const[$r][3] = 'Module to control product codes';
$this->const[$r][4] = 0;
$r++;
/*$this->const[$r][0] = "PRODUCT_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "standard";
$this->const[$r][3] = 'Default module for document generation';
$this->const[$r][4] = 0;
$r++;*/
// Boxes
$this->boxes = array(
0=>array('file'=>'box_produits.php','enabledbydefaulton'=>'Home'),

View File

@ -51,7 +51,7 @@ class modService extends DolibarrModules
$this->module_position = 30;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des services";
$this->description = "Service management";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';

View File

@ -92,8 +92,8 @@ class pdf_standard extends ModelePDFProduct
$langs->load("companies");
$this->db = $db;
$this->name = "PDF template";
$this->description = $langs->trans("DocumentModelPdf");
$this->name = "standard";
$this->description = $langs->trans("DocumentModelStandardPDF");
// Dimension page pour format A4
$this->type = 'pdf';
@ -107,15 +107,9 @@ class pdf_standard extends ModelePDFProduct
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;
$this->option_logo = 1; // Affiche logo
$this->option_tva = 0; // Gere option tva PRODUCT_TVAOPTION
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
$this->option_freetext = 0; // Support add of a personalised text
// Recupere emetteur
$this->emetteur=$mysoc;
@ -262,7 +256,7 @@ class pdf_standard extends ModelePDFProduct
}
if ($object->weight)
{
$pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.$object->length.'x'.$object->width.'x'.$object->height, 0, 1);
$pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.($object->length != ''?$object->length:'?').' x '.($object->width != ''?$object->width:'?').' x '.($object->height != ''?$object->height:'?'), 0, 1);
$nexY = $pdf->GetY();
}
if ($object->surface)

View File

@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setu
$head=fichinter_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), -1, 'intervention');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -72,7 +72,7 @@ print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setu
$head=fichinter_admin_prepare_head();
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), -1, 'intervention');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@ -647,6 +647,7 @@ FreeLineOfType=Free entry of type
CloneMainAttributes=Clone object with its main attributes
PDFMerge=PDF Merge
Merge=Merge
DocumentModelStandardPDF=Standard PDF template
PrintContentArea=Show page to print main content area
MenuManager=Menu manager
WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login <b>%s</b> is allowed to use application at the moment.

View File

@ -37,7 +37,6 @@ SendingSheet=Shipment sheet
ConfirmDeleteSending=Are you sure you want to delete this shipment?
ConfirmValidateSending=Are you sure you want to validate this shipment with reference <b>%s</b>?
ConfirmCancelSending=Are you sure you want to cancel this shipment?
DocumentModelSimple=Simple document model
DocumentModelMerou=Merou A5 model
WarningNoQtyLeftToSend=Warning, no products waiting to be shipped.
StatsOnShipmentsOnlyValidated=Statistics conducted on shipments only validated. Date used is date of validation of shipment (planed delivery date is not always known).

View File

@ -512,10 +512,7 @@ foreach ($dirmodels as $reldir)
}
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
print '<td align="center">';

View File

@ -4367,14 +4367,31 @@ class Product extends CommonObject
$this->id=0;
$this->ref = 'PRODUCT_SPEC';
$this->label = 'PRODUCT SPECIMEN';
$this->description = 'PRODUCT SPECIMEN '.dol_print_date($now,'dayhourlog');
$this->description = 'This is description of this product specimen that was created the '.dol_print_date($now,'dayhourlog').'.';
$this->specimen=1;
$this->country_id=1;
$this->tosell=1;
$this->tobuy=1;
$this->tobatch=0;
$this->note='This is a comment (private)';
$this->date_creation = $now;
$this->date_modification = $now;
$this->weight = 4;
$this->weight_unit = 1;
$this->length = 5;
$this->length_unit = 1;
$this->width = 6;
$this->width_unit = 0;
$this->height = null;
$this->height_unit = null;
$this->surface = 30;
$this->surface_unit = 0;
$this->volume = 300;
$this->volume_unit = 0;
$this->barcode=-1; // Create barcode automatically
}