diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index d0bcd17acd1..b7dc8b1f64d 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -54,7 +54,7 @@ CREATE TABLE llx_stocktransfer_stocktransfer( description text, note_public text, note_private text, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime NOT NULL, date_prevue_depart date DEFAULT NULL, date_reelle_depart date DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_stocktransfer_stocktransfer.sql b/htdocs/install/mysql/tables/llx_stocktransfer_stocktransfer.sql index 6b0607d66c2..a891fdc2f5d 100644 --- a/htdocs/install/mysql/tables/llx_stocktransfer_stocktransfer.sql +++ b/htdocs/install/mysql/tables/llx_stocktransfer_stocktransfer.sql @@ -27,7 +27,7 @@ CREATE TABLE llx_stocktransfer_stocktransfer( description text, note_public text, note_private text, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime NOT NULL, date_prevue_depart date DEFAULT NULL, date_reelle_depart date DEFAULT NULL, diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index 54fcbfc32e5..d34666b7cb2 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -466,6 +466,7 @@ class StockTransfer extends CommonObject */ public function update(User $user, $notrigger = false) { + $this->tms = ''; // Will be done automatically because tms field is on update cascade $res = $this->updateCommon($user, $notrigger); if ($this->socid > 0 || $this->fk_soc > 0 && empty($this->thirdparty)) $this->fetch_thirdparty(); if (empty($this->socid) && empty($this->fk_soc)) unset($this->thirdparty); diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index e801209ea84..ae80b55b51d 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -145,12 +145,12 @@ if (empty($reshook)) { $error = 0; - $backurlforlist = dol_buildpath('/stocktransfer/stocktransfer_list.php', 1); + $backurlforlist = dol_buildpath('/product/stock/stocktransfer/stocktransfer_list.php', 1); if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = dol_buildpath('/stocktransfer/stocktransfer_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + else $backtopage = dol_buildpath('/product/stock/stocktransfer/stocktransfer_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); } } $triggermodname = 'STOCKTRANSFER_STOCKTRANSFER_MODIFY'; // Name of trigger action code to execute when we modify record @@ -207,12 +207,12 @@ if (empty($reshook)) { $error++; $langs->load("errors"); - setEventMessages($langs->trans("ErrorTryToMakeMoveOnProductRequiringBatchData", $prod->ref), null, 'errors'); + setEventMessages($langs->transnoentities("ErrorTryToMakeMoveOnProductRequiringBatchData", $prod->ref), null, 'errors'); } } else { if(!empty($batch)) { $error++; - setEventMessages($langs->trans('StockTransferNoBatchForProduct', $prod->getNomUrl()), '', 'errors'); + setEventMessages($langs->transnoentities('StockTransferNoBatchForProduct', $prod->getNomUrl()), '', 'errors'); } } @@ -508,7 +508,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteStockTransfer'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Delete'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); } // Confirmation to delete line if ($action == 'deleteline') @@ -570,7 +570,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($action == 'valid' && $permissiontoadd) { $nextref=$object->getNextNumRef(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $langs->trans('ConfirmValidateStockTransfer', $nextref), 'confirm_validate', $formquestion, 0, 2); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $langs->transnoentities('ConfirmValidateStockTransfer', $nextref), 'confirm_validate', $formquestion, 0, 2); } // Call Hook formConfirm @@ -585,7 +585,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '