diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 1bb1c934aa4..1c7cd3a375d 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -2311,7 +2311,7 @@ elseif (!empty($module))
print ''.$langs->trans("EnterNameOfObjectDesc").'
';
- print '
';
+ print '
';
print ' '.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'
';
print ' '.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'
';
print '';
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index 12400ecb087..7dc98dbf1e7 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -1027,7 +1027,7 @@ class MyObject extends CommonObject
$langs->load("mymodule@mymodule");
if (!dol_strlen($modele)) {
- $modele = 'standard';
+ $modele = 'standard_myobject';
if ($this->modelpdf) {
$modele = $this->modelpdf;
diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
index 1d08e857e96..e7bd7540835 100644
--- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
@@ -295,10 +295,6 @@ class pdf_standard_myobject extends ModelePDFMyObject
{
$object->fetch_thirdparty();
- $deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
- $amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
- $amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
-
// Definition of $dir and $file
if ($object->specimen)
{
@@ -1076,68 +1072,16 @@ class pdf_standard_myobject extends ModelePDFMyObject
}
}
- $objectidnext = $object->getIdReplacingInvoice('validated');
- if ($object->type == 0 && $objectidnext)
- {
- $objectreplacing = new Facture($this->db);
- $objectreplacing->fetch($objectidnext);
-
- $posy += 3;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R');
- }
- if ($object->type == 1)
- {
- $objectreplaced = new Facture($this->db);
- $objectreplaced->fetch($object->fk_facture_source);
-
- $posy += 4;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
- }
- if ($object->type == 2 && !empty($object->fk_facture_source))
- {
- $objectreplaced = new Facture($this->db);
- $objectreplaced->fetch($object->fk_facture_source);
-
- $posy += 3;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->MultiCell($w, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
- }
-
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
- $title = $outputlangs->transnoentities("DateInvoice");
+ $title = $outputlangs->transnoentities("Date");
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
- $title .= ' - '.$outputlangsbis->transnoentities("DateInvoice");
+ $title .= ' - '.$outputlangsbis->transnoentities("Date");
}
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R');
- if (!empty($conf->global->INVOICE_POINTOFTAX_DATE))
- {
- $posy += 4;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : ".dol_print_date($object->date_pointoftax, "day", false, $outputlangs), '', 'R');
- }
-
- if ($object->type != 2)
- {
- $posy += 3;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0, 0, 60);
- $title = $outputlangs->transnoentities("DateDue");
- if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
- $title .= ' - '.$outputlangsbis->transnoentities("DateDue");
- }
- $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
- }
-
if ($object->thirdparty->code_client)
{
$posy += 3;