From a2dc3abba52429db6ea9900ffd4b894e16c8c965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 Jul 2008 12:41:51 +0200 Subject: [PATCH] Add readonly for state cancel --- packing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packing.py b/packing.py index 4be866b2ca..05fa0340f2 100644 --- a/packing.py +++ b/packing.py @@ -43,13 +43,13 @@ class PackingIn(OSV): "('to_location_warehouse', '=', warehouse),"\ "]", states={ - 'readonly': "state in ('received', 'done')", + 'readonly': "state in ('received', 'done', 'cancel')", }, context="{'warehouse': warehouse, 'type': 'incoming'}") inventory_moves = fields.Function('get_inventory_moves', type='one2many', relation='stock.move', string='Inventory Moves', fnct_inv='set_inventory_moves', states={ - 'readonly': "state in ('draft', 'done')", + 'readonly': "state in ('draft', 'done', 'cancel')", }, context="{'warehouse': warehouse, 'type':'inventory_in'}") moves = fields.One2Many('stock.move', 'packing_in', 'Moves', readonly=True)