=== modified file 'stock/stock.py' --- stock/stock.py 2013-10-15 07:56:22 +0000 +++ stock/stock.py 2013-12-30 08:26:07 +0000 @@ -742,7 +742,12 @@ @return: True """ pickings = self.browse(cr, uid, ids, context=context) - self.write(cr, uid, ids, {'state': 'confirmed'}) + to_update = [] + for pick in pickings: + if pick.state != 'confirmed': + to_update.append(pick.id) + if to_update: + self.write(cr, uid, to_update, {'state': 'confirmed'}) todo = [] for picking in pickings: for r in picking.move_lines: @@ -821,7 +826,12 @@ """ Changes picking state to assigned. @return: True """ - self.write(cr, uid, ids, {'state': 'assigned'}) + to_update = [] + for pick in self.browse(cr, uid, ids, context=context): + if pick.state != 'assigned': + to_update.append(pick.id) + if to_update: + self.write(cr, uid, to_update, {'state': 'assigned'}) return True def test_finished(self, cr, uid, ids):