From a51698af798dfa0201ff1f8ebae0b40c893d5264 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Tue, 20 May 2008 19:21:36 +0200 Subject: [PATCH] Customer Packing: ready state changed to packed state. --- packing.py | 10 +++++----- packing.xml | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packing.py b/packing.py index 20f12d7356..b88af63b0c 100644 --- a/packing.py +++ b/packing.py @@ -255,14 +255,14 @@ class PackingOut(OSV): relation='stock.move', string='Outgoing Moves', fnct_inv='set_outgoing_moves', states={ - 'readonly':"state != 'ready'", + 'readonly':"state != 'packed'", }, context="{'warehouse': warehouse, "\ "'packing_state': state, 'type':'outgoing',}") inventory_moves = fields.Function('get_inventory_moves', type='one2many', relation='stock.move', string='Inventory Moves', fnct_inv='set_inventory_moves', states={ - 'readonly':"state in ('ready', 'done')", + 'readonly':"state in ('packed', 'done')", }, context="{'warehouse': warehouse, "\ "'packing_state': state, 'type':'inventory_out',}") moves = fields.One2Many('stock.move', 'packing_out', 'Moves', @@ -273,7 +273,7 @@ class PackingOut(OSV): ('done', 'Done'), ('cancel', 'Cancel'), ('assigned', 'Assigned'), - ('ready', 'Ready'), + ('packed', 'Packed'), ('waiting', 'Waiting'), ], 'State', readonly=True) @@ -401,13 +401,13 @@ class PackingOut(OSV): 'effective_date': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context) - def set_state_ready(self, cursor, user, packing_id, context=None): + def set_state_packed(self, cursor, user, packing_id, context=None): move_obj = self.pool.get('stock.move') packing = self.browse(cursor, user, packing_id, context=context) move_obj.set_state_done( cursor, user, [m.id for m in packing.inventory_moves], context=context) - self.write(cursor, user, packing_id, {'state':'ready'}, + self.write(cursor, user, packing_id, {'state':'packed'}, context=context) for move in packing.inventory_moves: move_obj.create(cursor, user, { diff --git a/packing.xml b/packing.xml index 325783601e..3065605905 100644 --- a/packing.xml +++ b/packing.xml @@ -209,7 +209,7 @@ ('cancel','done') '''}"/>