Reviewers: ,
Please review this at http://codereview.tryton.org/635003/ Affected files: M CHANGELOG M inventory.py Index: CHANGELOG =================================================================== --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Return an object in Inventory's create_move() * Add workflow to stock move Version 2.6.0 - 2012-10-22 Index: inventory.py =================================================================== --- a/inventory.py +++ b/inventory.py @@ -114,14 +114,14 @@ @Workflow.transition('done') def confirm(self, inventories): Move = Pool().get('stock.move') - move_ids = [] + moves = [] for inventory in inventories: for line in inventory.lines: - move_id = line.create_move() - if move_id: - move_ids.append(move_id) - if move_ids: - Move.do(Move.browse(move_ids)) + move = line.create_move() + if move: + moves.append(move) + if moves: + Move.do(moves) @classmethod @ModelView.button @@ -308,7 +308,7 @@ }]) self.move = move self.save() - return move.id + return move def update_values4complete(self, quantity, uom_id): ''' -- -- [email protected] mailing list
