diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php
index e613c479ee0..da1cb9658a0 100644
--- a/htdocs/core/tpl/document_actions_post_headers.tpl.php
+++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php
@@ -79,7 +79,7 @@ $formfile->form_attach_new_file(
);
$disablemove=1;
-if ($modulepart == 'produit') $disablemove=0;
+if ($modulepart == 'product' || $modulepart == 'produit') $disablemove=0; // Drag and drop for up and down allowed on product
// List of document
$formfile->list_of_documents(
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index c30ac858ec8..335823cc88b 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -478,13 +478,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '"';
print '>'.$langs->trans($val['label']).'';
print '
';
- print $object->$key;
+ print dol_escape_htmltag($object->$key, 1, 1);
print ' | ';
print '';
- }
- // Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
+ //if ($key == 'targetsrcfile3') break; // key used for break on second column
+ }
print '';
print '';
@@ -493,7 +492,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print '';
- // ...
+ $alreadyoutput = 1;
+ foreach($object->fields as $key => $val)
+ {
+ if ($alreadyoutput)
+ {
+ //if ($key == 'targetsrcfile3') $alreadyoutput = 0; // key used for break on second column
+ continue;
+ }
+
+ if (in_array($key, array('rowid', 'ref', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key', 'status'))) continue;
+
+ print '| '.$langs->trans($val['label']).' | ';
+ print '';
+ print dol_escape_htmltag($object->$key, 1, 1);
+ print ' | ';
+ print '
';
+ }
+
+ // Other attributes
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '
';
print '';
diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index 0f8ce367bb5..05b76b3d588 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -79,7 +79,9 @@ $extralabels = $extrafields->fetch_name_optionals_label('myobject');
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
-if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity] . "/" . $object->id;
+
+//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->id);
+if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->ref);
@@ -167,10 +169,16 @@ if ($object->id)
dol_fiche_end();
- $modulepart = 'societe';
- $permission = $user->rights->societe->creer;
- $permtoedit = $user->rights->societe->creer;
+ $modulepart = 'mymodule';
+ //$permission = $user->rights->mymodule->create;
+ $permission = 1;
+ //$permtoedit = $user->rights->mymodule->create;
+ $permtoedit = 1;
$param = '&id=' . $object->id;
+
+ //$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/';
+ $relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->ref).'/';
+
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else