diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index f7a9495c244..118ab6ededf 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1461,6 +1461,7 @@ if ($id > 0)
print '
';
print '
'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'
';
@@ -654,8 +654,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '';
print '
'.$alreadyconsumed.' | ';
- print '
';
- print ' | '; // Warehouse
+ print '
'; // Warehouse
+ if ($alreadyconsumed) {
+ print '';
+ if (empty($conf->use_javascript_ajax)) print 'id.'">';
+ print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"');
+ if (empty($conf->use_javascript_ajax)) print '';
+ }
+ print ' | ';
if ($conf->productbatch->enabled) {
print '
| '; // Lot
}
@@ -757,7 +770,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
'.$tmpproduct->getNomUrl(1).' | ';
print '
'.$line->qty.' | ';
print '
'.$alreadyproduced.' | ';
- print '
| '; // Warehouse
+ print '
'; // Warehouse
+ if ($alreadyproduced) {
+ print '';
+ if (empty($conf->use_javascript_ajax)) print 'id.'">';
+ print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expand'.$line->id.'"');
+ if (empty($conf->use_javascript_ajax)) print '';
+ }
+ print ' | ';
if ($conf->productbatch->enabled) {
print '
| '; // Lot
}
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index c50d816f14f..55e7af367b7 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -941,6 +941,10 @@ class MouvementStock extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$origin = new Project($this->db);
break;
+ case 'mo':
+ require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
+ $origin = new Mo($this->db);
+ break;
default:
if ($origintype)
diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php
index cfb0d6d0b9c..ebcc7968c60 100644
--- a/htdocs/product/stock/movement_list.php
+++ b/htdocs/product/stock/movement_list.php
@@ -674,9 +674,9 @@ if ($resql)
}
$param = '';
- if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
- if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
- if ($id > 0) $param .= '&id='.$id;
+ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
+ if ($id > 0) $param .= '&id='.urlencode($id);
if ($search_movement) $param .= '&search_movement='.urlencode($search_movement);
if ($search_inventorycode) $param .= '&search_inventorycode='.urlencode($search_inventorycode);
if ($search_type_mouvement) $param .= '&search_type_mouvement='.urlencode($search_type_mouvement);
@@ -684,10 +684,8 @@ if ($resql)
if ($search_product) $param .= '&search_product='.urlencode($search_product);
if ($search_batch) $param .= '&search_batch='.urlencode($search_batch);
if ($search_warehouse > 0) $param .= '&search_warehouse='.urlencode($search_warehouse);
- if (!empty($sref)) $param .= '&sref='.urlencode($sref); // FIXME $sref is not defined
- if (!empty($snom)) $param .= '&snom='.urlencode($snom); // FIXME $snom is not defined
if ($search_user) $param .= '&search_user='.urlencode($search_user);
- if ($idproduct > 0) $param .= '&idproduct='.$idproduct;
+ if ($idproduct > 0) $param .= '&idproduct='.urlencode($idproduct);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';