diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index b3004fffb2f..3837588035e 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -856,5 +856,46 @@
+
+
+
+ product.normal.form
+ product.product
+
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index d6d3a23efa7..ddfe4808dba 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1427,14 +1427,6 @@ class stock_move(osv.osv):
default = default.copy()
return super(stock_move, self).copy(cr, uid, id, default, context)
- def create(self, cr, user, vals, context=None):
- # Check that the stock.move is in draft state at creation to force
- # passing through button_confirm
- if vals.get('state','draft') not in ('draft','done','waiting'):
- logger = netsvc.Logger()
- logger.notifyChannel("code", netsvc.LOG_WARNING, "All new stock.move must be in state draft at the creation !")
- return super(stock_move, self).create(cr, user, vals, context)
-
def _auto_init(self, cursor, context):
res = super(stock_move, self)._auto_init(cursor, context)
cursor.execute('SELECT indexname \
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index 0e670ee3e5d..8616f939bb8 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -240,15 +240,11 @@ class split_in_production_lot(osv.osv_memory):
default_val = {
'product_qty': quantity,
'product_uos_qty': uos_qty,
- 'state': 'draft'
+ 'state': move.state
}
if quantity_rest > 0:
current_move = move_obj.copy(cr, uid, move.id, default_val)
move_obj.action_confirm(cr, uid, [current_move])
- if move.state=='assigned':
- move_obj.force_assign(cr, uid, [current_move])
- elif move.state<>'confirmed':
- move_obj.write(cr, uid, [current_move], {'state': move.state})
new_move.append(current_move)
if quantity_rest == 0:
current_move = move.id