lims: disallow managing services from the entry form
This commit is contained in:
parent
63a85d4865
commit
9d37fd9daf
|
@ -99,7 +99,8 @@ class Entry(Workflow, ModelSQL, ModelView):
|
|||
no_acknowledgment_of_receipt = fields.Boolean(
|
||||
'No acknowledgment of receipt')
|
||||
samples = fields.One2Many('lims.sample', 'entry', 'Samples',
|
||||
readonly=True, context={'entry': Eval('id'), 'party': Eval('party')},
|
||||
readonly=True, context={'from_entry': True,
|
||||
'entry': Eval('id'), 'party': Eval('party')},
|
||||
depends=['party'])
|
||||
invoice_comments = fields.Text('Invoice comments')
|
||||
report_comments = fields.Text('Report comments', translate=True)
|
||||
|
|
|
@ -1576,9 +1576,11 @@ class Fraction(ModelSQL, ModelView):
|
|||
cls._buttons.update({
|
||||
'manage_services': {
|
||||
'invisible': ~Eval('button_manage_services_available'),
|
||||
'readonly': Bool(Eval('context', {}).get('from_entry', False)),
|
||||
},
|
||||
'complete_services': {
|
||||
'invisible': ~Eval('button_manage_services_available'),
|
||||
'readonly': Bool(Eval('context', {}).get('from_entry', False)),
|
||||
},
|
||||
'confirm': {
|
||||
'invisible': ~Eval('button_confirm_available'),
|
||||
|
@ -1586,6 +1588,7 @@ class Fraction(ModelSQL, ModelView):
|
|||
'load_services': {
|
||||
'invisible': Or(Bool(Eval('button_manage_services_available')),
|
||||
Bool(Eval('services'))),
|
||||
'readonly': Bool(Eval('context', {}).get('from_entry', False)),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue