[FIX]: Fixed problem of location not changed in scrap product when qty is same as move qty, Put proper states in buttons of consume,split and scrap in move lines
bzr revid: rpa@openerp.co.in-20100224125018-rbutemps3x3klejp
This commit is contained in:
parent
3873b7c1e3
commit
57b92258d9
|
@ -1521,13 +1521,13 @@ class stock_move(osv.osv):
|
|||
if quantity_rest > 0:
|
||||
default_val = {
|
||||
'product_qty': quantity,
|
||||
'product_uos_qty': uos_qty,
|
||||
'state': move.state,
|
||||
'product_uos_qty': uos_qty,
|
||||
'state': move.state,
|
||||
}
|
||||
if location_dest_id:
|
||||
default_val.update({'location_dest_id':location_dest_id})
|
||||
default_val.update({'location_dest_id': location_dest_id})
|
||||
if location_id:
|
||||
default_val.update({'location_id':location_id})
|
||||
default_val.update({'location_id': location_id})
|
||||
|
||||
if move.product_id.track_production and location_id:
|
||||
res += self.split_lines(cr, uid, [move.id], quantity, split_by_qty=1, context=context)
|
||||
|
@ -1550,7 +1550,12 @@ class stock_move(osv.osv):
|
|||
res += [move.id]
|
||||
update_val = {}
|
||||
update_val['product_qty'] = quantity_rest
|
||||
update_val['product_uos_qty'] = uos_qty_rest
|
||||
update_val['product_uos_qty'] = uos_qty_rest
|
||||
if location_dest_id:
|
||||
update_val.update({'location_dest_id': location_dest_id})
|
||||
if location_id:
|
||||
update_val.update({'location_id': location_id})
|
||||
|
||||
self.write(cr, uid, [move.id], update_val)
|
||||
|
||||
if consume:
|
||||
|
|
|
@ -589,12 +589,12 @@
|
|||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<notebook colspan="4">
|
||||
|
@ -744,12 +744,12 @@
|
|||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<notebook colspan="4">
|
||||
|
@ -924,12 +924,12 @@
|
|||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<notebook colspan="4">
|
||||
|
@ -1099,12 +1099,12 @@
|
|||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="gtk-justify-fill"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<button
|
||||
name="%(stock.move_scrap)d"
|
||||
string="D" type="action"
|
||||
icon="gtk-convert"
|
||||
states="done,cancel" />
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<notebook colspan="4">
|
||||
|
|
Loading…
Reference in New Issue