';
diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
index d23631c6fe7..2d8b0a8cc17 100644
--- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
+++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
@@ -136,6 +136,9 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
-- v16
+ALTER TABLE llx_projet_task_time ADD COLUMN intervention_id integer DEFAULT NULL;
+ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;
+
ALTER TABLE llx_c_stcomm MODIFY COLUMN code VARCHAR(24) NOT NULL;
ALTER TABLE llx_societe_account DROP FOREIGN KEY llx_societe_account_fk_website;
diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql
index 63eadb1177f..e91e50b5721 100644
--- a/htdocs/install/mysql/tables/llx_projet_task_time.sql
+++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql
@@ -29,6 +29,8 @@ create table llx_projet_task_time
thm double(24,8),
invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here
invoice_line_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice line id here
+ intervention_id integer DEFAULT NULL, -- If we need to have an intervention line for each line of timespent, we can save intervention id here
+ intervention_line_id integer DEFAULT NULL, -- If we need to have an intervention line of timespent line, we can save intervention line id here
import_key varchar(14), -- Import key
datec datetime, -- date creation time
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 22ce7e61e7f..14fd3a52171 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -334,7 +334,6 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
-$sql .= $db->order($sortfield, $sortorder);
/* If a group by is required
$sql .= " GROUP BY ";
@@ -564,7 +563,7 @@ if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
}
foreach ($object->fields as $key => $val) {
$searchkey = empty($search[$key]) ? '' : $search[$key];
- $cssforfield = (empty($val['css']) ? '' : $val['css']);
+ $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index d0db633658a..ab93e3561b0 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -258,8 +258,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$object->fetch($id_temp, $ref);
- $object->timespent_note = GETPOST("timespent_note_line", 'alpha');
- $object->timespent_old_duration = GETPOST("old_duration");
+ $object->timespent_note = GETPOST("timespent_note_line", "alphanohtml");
+ $object->timespent_old_duration = GETPOST("old_duration", "int");
$object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds
$object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds
if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered
@@ -285,8 +285,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$object->fetch($id, $ref);
$object->timespent_id = GETPOST("lineid", 'int');
- $object->timespent_note = GETPOST("timespent_note_line");
- $object->timespent_old_duration = GETPOST("old_duration");
+ $object->timespent_note = GETPOST("timespent_note_line", "alphanohtml");
+ $object->timespent_old_duration = GETPOST("old_duration", "int");
$object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds
$object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds
if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered
@@ -1255,10 +1255,11 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print '';
if ($projectstatic->thirdparty->id > 0) {
+ print ' ';
print '