[IMP]:task-1773 improvement by given comment
bzr revid: ksa@tinyerp.co.in-20101118064712-zuuj9wim9h140olk
This commit is contained in:
parent
56ba267931
commit
06187294ab
|
@ -2416,7 +2416,10 @@ class stock_inventory(osv.osv):
|
|||
return self.pool.get('stock.move').create(cr, uid, move_vals)
|
||||
|
||||
def action_done(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'done'} ,context=context)
|
||||
move_obj = self.pool.get('stock.move')
|
||||
for inv in self.browse(cr,uid,ids):
|
||||
move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context)
|
||||
self.write(cr, uid, [inv.id], {'state':'done'}, context=context)
|
||||
return True
|
||||
|
||||
def action_confirm(self, cr, uid, ids, context=None):
|
||||
|
@ -2448,7 +2451,6 @@ class stock_inventory(osv.osv):
|
|||
'prodlot_id': lot_id,
|
||||
'date': inv.date,
|
||||
'date': inv.date,
|
||||
'state': 'done'
|
||||
}
|
||||
if change > 0:
|
||||
value.update( {
|
||||
|
|
|
@ -150,8 +150,8 @@
|
|||
<field name="state"/>
|
||||
<group col="4" colspan="2">
|
||||
<button name="action_cancel_inventary" states="draft" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
|
||||
<button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
|
||||
<button name="action_done" states="confirm" string="Done" type="object" icon="gtk-jump-to"/>
|
||||
<button name="action_confirm" states="draft" string="Validate Inventory" type="object" icon="gtk-apply"/>
|
||||
<button name="action_done" states="confirm" string="Confirm Inventory" type="object" icon="gtk-jump-to"/>
|
||||
<button name="action_cancel" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
|
||||
|
|
Loading…
Reference in New Issue