Fix moves states for customer shipment

- outgoing moves should be editable in assigned
- inventory moves should be readonly in cancel

review310003
This commit is contained in:
Cédric Krier committed 2012-03-28 18:00:35 +02:00
1 parent a3485b82c4
commit 3dda1e5ab0
1 file changed
+3 -2
+3 -2
View File
@@ -760,7 +760,7 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
('company', '=', Eval('company')),
],
states={
'readonly': ((Eval('state') != 'draft')
'readonly': ((Eval('state').in_(['waiting', 'done', 'cancel']))
| ~Eval('warehouse') | ~Eval('customer')),
},
depends=['state', 'warehouse', 'customer', 'warehouse_output',
@@ -775,7 +775,8 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
('company', '=', Eval('company')),
],
states={
'readonly': Eval('state').in_(['draft', 'packed', 'done']),
'readonly': Eval('state').in_(
['draft', 'packed', 'done', 'cancel']),
},
depends=['state', 'warehouse', 'warehouse_storage',
'warehouse_output', 'company']),