[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
|
@ -1525,9 +1525,9 @@ class stock_move(osv.osv):
|
|||
'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)
|
||||
|
@ -1551,6 +1551,11 @@ class stock_move(osv.osv):
|
|||
update_val = {}
|
||||
update_val['product_qty'] = quantity_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