diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index ad33a43b17f..8f121f2788f 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -50,6 +50,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'moc
$backtopage = GETPOST('backtopage', 'alpha');
$lineid = GETPOST('lineid', 'int');
$fk_movement = GETPOST('fk_movement', 'int');
+$fk_default_warehouse = GETPOST('fk_default_warehouse', 'int');
$collapse = GETPOST('collapse', 'aZ09comma');
@@ -734,6 +735,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Warehouse");
+
+ // Select warehouse to force it everywhere
+ if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
+ $listwarehouses = $tmpwarehouse->list_array(1);
+ if (count($listwarehouses) > 1) {
+ print ' ' . $langs->trans("ForceTo") . ' ' . $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth300', 1);
+ } elseif (count($listwarehouses) == 1) {
+ print ' ' . $langs->trans("ForceTo") . ' ' . $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth300', 1);
+ }
+ }
}
print ' | ';
if ($conf->stock->enabled) {
@@ -1057,6 +1068,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print '';
+ // default warehouse processing
+ print '';
+
// Lines to produce