fix readonly states of process in production

This commit is contained in:
?ngel ?lvarez 2014-09-04 16:44:05 +02:00
parent d5fa362342
commit cf0ffe21d3
1 changed files with 6 additions and 1 deletions

View File

@ -259,7 +259,12 @@ class Production:
domain=[
('output_products', '=', Eval('product', 0)),
],
depends=['product'])
states={
'readonly': (~Eval('state').in_(['request', 'draft'])
| ~Eval('warehouse', 0) | ~Eval('location', 0)),
'invisible': ~Eval('product'),
},
depends=['product', 'state', 'warehouse', 'location'])
@classmethod
def __setup__(cls):