From 645390c9904bcf668d8bfcfa01318a4f8ea3585e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Oct 2019 02:36:16 +0100 Subject: [PATCH] Work on BOM templates --- htdocs/admin/bom.php | 383 ++++++++---------- htdocs/bom/bom_card.php | 25 +- htdocs/core/class/html.formfile.class.php | 2 +- .../bom/doc/doc_generic_bom_odt.modules.php | 7 - htdocs/core/modules/bom/modules_bom.php | 2 +- htdocs/core/modules/modBom.class.php | 31 +- .../doctemplates/boms/template_bom.odt | Bin 0 -> 17591 bytes .../core/modules/modMyModule.class.php | 31 ++ .../modulebuilder/template/myobject_card.php | 20 +- 9 files changed, 257 insertions(+), 244 deletions(-) create mode 100644 htdocs/install/doctemplates/boms/template_bom.odt diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 26ea1b12a29..43f3fe0584a 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -183,16 +183,6 @@ elseif ($action == 'set_BOM_FREE_TEXT') { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action=="setshippableiconinlist") { - // Activate Set Shippable Icon In List - $setshippableiconinlist = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "SHIPPABLE_BOM_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity); - if (! $res > 0) $error++; - if (! $error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'errors'); - } } @@ -314,244 +304,217 @@ foreach ($dirmodels as $reldir) print "
\n"; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) +/* + * Document templates generators + */ + +print load_fiche_titre($langs->trans("BOMsModelModule"), '', ''); + +// Load array def with activated templates +$def = array(); +$sql = "SELECT nom"; +$sql.= " FROM ".MAIN_DB_PREFIX."document_model"; +$sql.= " WHERE type = '".$type."'"; +$sql.= " AND entity = ".$conf->entity; +$resql=$db->query($sql); +if ($resql) { - /* - * Document templates generators - */ + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } +} +else +{ + dol_print_error($db); +} - print load_fiche_titre($langs->trans("BOMsModelModule"), '', ''); - // Load array def with activated templates - $def = array(); - $sql = "SELECT nom"; - $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; - $sql.= " WHERE type = '".$type."'"; - $sql.= " AND entity = ".$conf->entity; - $resql=$db->query($sql); - if ($resql) +print "\n"; +print "\n"; +print ''; +print ''; +print '\n"; +print '\n"; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) +{ + foreach (array('','/doc') as $valdir) { - $i = 0; - $num_rows=$db->num_rows($resql); - while ($i < $num_rows) - { - $array = $db->fetch_array($resql); - array_push($def, $array[0]); - $i++; - } - } - else - { - dol_print_error($db); - } + $dir = dol_buildpath($reldir."core/modules/bom".$valdir); - - print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
\n"; - print "\n"; - print ''; - print ''; - print '\n"; - print '\n"; - print ''; - print ''; - print "\n"; - - clearstatcache(); - - foreach ($dirmodels as $reldir) - { - foreach (array('','/doc') as $valdir) + if (is_dir($dir)) { - $dir = dol_buildpath($reldir."core/modules/bom".$valdir); - - if (is_dir($dir)) + $handle=opendir($dir); + if (is_resource($handle)) { - $handle=opendir($dir); - if (is_resource($handle)) + while (($file = readdir($handle))!==false) { - while (($file = readdir($handle))!==false) + $filelist[]=$file; + } + closedir($handle); + arsort($filelist); + + foreach($filelist as $file) + { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - $filelist[]=$file; - } - closedir($handle); - arsort($filelist); + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); - foreach($filelist as $file) - { - if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) - { - if (file_exists($dir.'/'.$file)) - { - $name = substr($file, 4, dol_strlen($file) -16); - $classname = substr($file, 0, dol_strlen($file) -12); + require_once $dir.'/'.$file; + $module = new $classname($db); - require_once $dir.'/'.$file; - $module = new $classname($db); + $modulequalified=1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; - $modulequalified=1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + if ($modulequalified) + { + $var = !$var; + print ''; - if ($modulequalified) - { - $var = !$var; - print ''; + // Active + if (in_array($name, $def)) + { + print ''; + } + else + { + print '"; + } - // Active - if (in_array($name, $def)) - { - print ''; - } - else - { - print '"; - } + // Default + print ''; - // Default - print ''; - - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - if ($module->type == 'pdf') - { - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - } - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); - $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); - $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); - $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); - //$htmltooltip.='
'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1); - //$htmltooltip.='
'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); - $htmltooltip.='
'.$langs->trans("WatermarkOnDraftBOMs").': '.yn($module->option_draft_watermark, 1, 1); + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + $htmltooltip.='
'.$langs->trans("WatermarkOnDraftBOMs").': '.yn($module->option_draft_watermark, 1, 1); - print ''; + print ''; - // Preview - print ''; + // Preview + print ''; - print "\n"; - } - } - } + print "\n"; + } + } } } } } } - - print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name)?$name:$module->name); + print "\n"; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; + print '
'; - print (empty($module->name)?$name:$module->name); - print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; - print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "'."\n"; - print ''; - print img_picto($langs->trans("Enabled"), 'switch_on'); - print ''; - print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; - print "'; + if ($conf->global->BOM_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"), 'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; - if ($conf->global->BOM_ADDON_PDF == $name) - { - print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; - } - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; - if ($module->type == 'pdf') - { - print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); - } - print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"), 'bill').''; + } + else + { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
'; - print "
"; - - /* - * Other options - */ - - print load_fiche_titre($langs->trans("OtherOptions"), '', ''); - print ''; - print ''; - print ''; - print ''; - print "\n"; - print "\n"; - - $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); - $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); - $htmltext = ''.$langs->trans("AvailableVariables").':
'; - foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; - $htmltext.='
'; - - print ''; - print ''; - print ''; - print '\n"; - print ''; - - //Use draft Watermark - - print ""; - print ''; - print ""; - print '\n"; - print ''; - - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; - print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; - $variablename='BOM_FREE_TEXT'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) - { - print ''; - } - else - { - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); - } - print '
'; - print ''; - print "
'; - print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; - print '
'; - print ''; - print ''; - print ''; - print "
'; - print '
'; } +print ''; +print "
"; + /* - * Notifications + * Other options */ -/* -print load_fiche_titre($langs->trans("Notifications"), '', ''); + +print load_fiche_titre($langs->trans("OtherOptions"), '', ''); print ''; print ''; print ''; -print ''; -print ''; +print ''; +print "\n"; print "\n"; +$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); +$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); +$htmltext = ''.$langs->trans("AvailableVariables").':
'; +foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; +$htmltext.='
'; + +print ''; +print ''; +print ''; print '\n"; +print ''; + +//Use draft Watermark + +print ""; +print ''; +print ""; +print '\n"; +print ''; print '
'.$langs->trans("Parameter").' '.$langs->trans("Value").' 
'; -print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
'; +print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; +$variablename='BOM_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); +} print '
'; +print ''; print "
'; +print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; +print '
'; +print ''; +print ''; +print ''; +print "
'; -*/ +print '
'; + // End of page llxFooter(); diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 6186e809543..eea20d6721c 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -662,14 +662,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // ancre // Documents - /*$objref = dol_sanitizeFileName($object->ref); - $relativepath = $comref . '/' . $comref . '.pdf'; + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref . '/' . $objref . '.pdf'; $filedir = $conf->bom->dir_output . '/' . $objref; $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->bom->create; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); - */ + $delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('bom')); @@ -693,17 +692,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - /* - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) $action = 'presend'; - // Presend form - $modelmail='inventory'; - $defaulttopic='InformationMessage'; - $diroutput = $conf->product->dir_output.'/inventory'; - $trackid = 'stockinv'.$object->id; + // Presend form + $modelmail='bom'; + $defaulttopic='InformationMessage'; + $diroutput = $conf->bom->dir_output; + $trackid = 'bom'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - */ + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } // End of page diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d231dacab87..22acff7763d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -688,7 +688,7 @@ class FormFile } else { - dol_print_error($this->db, 'Bad value for modulepart'); + dol_print_error($this->db, "Bad value for modulepart '".$modulepart."' in showdocuments"); return -1; } } diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 8885348bb16..3c371c39491 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -85,14 +85,7 @@ class doc_generic_bom_odt extends ModelePDFBOMs $this->marge_haute=0; $this->marge_basse=0; - $this->option_logo = 1; // Affiche logo - $this->option_tva = 0; // Gere option tva COMMANDE_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 = 0; // Support add of a watermark on drafts diff --git a/htdocs/core/modules/bom/modules_bom.php b/htdocs/core/modules/bom/modules_bom.php index f8f29fec2e6..45bca8a38b3 100644 --- a/htdocs/core/modules/bom/modules_bom.php +++ b/htdocs/core/modules/bom/modules_bom.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir /** * Parent class for boms models */ -abstract class ModelePDFBoms extends CommonDocGenerator +abstract class ModelePDFBom extends CommonDocGenerator { // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index 720721ac156..1700f15afd7 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -121,7 +121,7 @@ class modBom extends DolibarrModules // 1=>array('BILLOFMATERIALS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) // ); $this->const = array( - 1=>array('BOM_ADDON_PDF', 'chaine', 'avalue', 'Name of PDF model of BOM', 0), + 1=>array('BOM_ADDON_PDF', 'chaine', 'alpha', '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) ); @@ -317,6 +317,8 @@ class modBom extends DolibarrModules */ public function init($options = '') { + global $conf, $langs; + $result=$this->_load_tables('/bom/sql/'); if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') @@ -330,8 +332,35 @@ class modBom extends DolibarrModules //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled'); + + // Permissions + $this->remove($options); + $sql = array(); + // ODT template + $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/boms/template_bom.odt'; + $dirodt=DOL_DATA_ROOT.'/doctemplates/boms'; + $dest=$dirodt.'/template_bom.odt'; + + if (file_exists($src) && ! file_exists($dest)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result=dol_copy($src, $dest, 0, 0); + if ($result < 0) + { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('alpha')."' AND type = 'bom' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('alpha')."', 'bom', ".$conf->entity.")" + ); + return $this->_init($sql, $options); } diff --git a/htdocs/install/doctemplates/boms/template_bom.odt b/htdocs/install/doctemplates/boms/template_bom.odt new file mode 100644 index 0000000000000000000000000000000000000000..344fcfa391aefbfef2b4ae85c5436e6c707adaa2 GIT binary patch literal 17591 zcmb7s1z07?vL-GKG|;$11C2KB?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zm5(6`sq&d9fx2ITqBE=4BrjVYz{_ckL`ddn$RL&Vrdf;~XB*9F=wk;eUSGnW?mya0-L6MhWS~85kzODd zytca-UG#>MvH&*{YNE-t!)srF?9u!PA=5 zGgSG@Li7P>!fsb1(LXLAeSTcL*edN%f4&)~@PA_J!02i&sPkF)xZ(Lefxy$d6Pu@{ zpf37fC(acKa3*^Nz1bYd;C_DJ>W}I0HWV2geRnvNQxh@o2`6m#FcjIm4>k>+>Up{^ z1v?5>hPZj_MVMgB2e13q#xf)OSdy(Z)|>Y3aVUo=qu#?P!z@bm&We)U%gMPJZE4zJ zp#-*ho5K|U>B%{Z>}#$5Th}YJA#tKL?QJ&7?q{%L*;0x;JewiqN;|F>f86HHBg}0M z9J%OQ3X{U5kU7lT@AQwa0^Fm{Tu<pMW&GV2{8mF;clurpOgNx^X$|28khVj4rn*4IA{^L>Ci@8R)7K(?|V5T zEs8{*#gR04s(PTxzQ3|_M39rigs^MPlhTTR@{BP@!OMHrDm#Neik_u^fx}U~?e22b z(__Kdq;)yN?YJZfUIQ$>`&^)2+{tqa;XXv!UZFIFmsS3z)chncw6u1obwbue67Loe z@p|U{FFui@`COgyqYD|t^}CM=41x^w?+gF`SiAq50QqdL6cjdz*_5bvx`6K&3YVcPM|2Gf#r>Ic;`!vAcHUCOq|GQ@4hvr`y|G#Vg zmE!zOWd14plz)=le`x*D%>GV){;Bm!^`Z6OWauASf7I`<y2_load_tables('/mymodule/sql/'); if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') @@ -394,7 +396,36 @@ class modMyModule extends DolibarrModules //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); + // Permissions + $this->remove($options); + $sql = array(); + + // ODT template + /* + $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/mymodule/template_myobjects.odt'; + $dirodt=DOL_DATA_ROOT.'/doctemplates/mymodule'; + $dest=$dirodt.'/template_myobjects.odt'; + + if (file_exists($src) && ! file_exists($dest)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result=dol_copy($src, $dest, 0, 0); + if ($result < 0) + { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type = 'mymodule' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','mymodule',".$conf->entity.")" + ); + */ + return $this->_init($sql, $options); } diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index fcf8b1f8a06..2a9d6388552 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -512,7 +512,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Documents /*$objref = dol_sanitizeFileName($object->ref); - $relativepath = $comref . '/' . $comref . '.pdf'; + $relativepath = $objref . '/' . $objref . '.pdf'; $filedir = $conf->mymodule->dir_output . '/' . $objref; $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->mymodule->read; // If you can read, you can build the PDF to read content @@ -536,23 +536,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'myobject', $socid, 1, '', $MAXEVENT, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, 'myobject', (is_object($object->thirdparty)?$object->thirdparty->id:0), 1, '', $MAXEVENT, '', $morehtmlright); print ''; } //Select mail models is same action as presend /* - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) $action = 'presend'; - // Presend form - $modelmail='inventory'; - $defaulttopic='InformationMessage'; - $diroutput = $conf->product->dir_output.'/inventory'; - $trackid = 'stockinv'.$object->id; + // Presend form + $modelmail='myobject'; + $defaulttopic='InformationMessage'; + $diroutput = $conf->mymodule->dir_output; + $trackid = 'myobject'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - */ + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; + */ } // End of page