parent
640d7cf504
commit
0735a349f7
|
@ -24,6 +24,14 @@ class ProductiveProcDocMixin(object):
|
|||
productive_process = fields.Many2One('productive.process',
|
||||
'Productive process', ondelete='RESTRICT', required=True, select=True)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(ProductiveProcDocMixin, cls).__setup__()
|
||||
if getattr(cls, 'state', None):
|
||||
cls.productive_process.states['readonly'] = (
|
||||
Eval('state') != 'draft')
|
||||
cls.productive_process.depends.append('state')
|
||||
|
||||
@staticmethod
|
||||
def default_productive_process():
|
||||
transaction = Transaction()
|
||||
|
|
Loading…
Reference in New Issue