mirror of
https://github.com/Kalenis/kalenislims.git
synced 2023-12-14 07:13:04 +01:00
lims: avoid problem with laboratory when copying old services
This commit is contained in:
parent
0a7daf6d05
commit
bf9704e801
|
@ -350,7 +350,8 @@ class Service(ModelSQL, ModelView):
|
||||||
report_date_readonly = fields.Function(fields.Boolean(
|
report_date_readonly = fields.Function(fields.Boolean(
|
||||||
'Report deadline Readonly'), 'get_report_date_readonly')
|
'Report deadline Readonly'), 'get_report_date_readonly')
|
||||||
laboratory = fields.Many2One('lims.laboratory', 'Laboratory',
|
laboratory = fields.Many2One('lims.laboratory', 'Laboratory',
|
||||||
domain=[('id', 'in', Eval('laboratory_domain'))],
|
domain=['OR', ('id', '=', Eval('laboratory')),
|
||||||
|
('id', 'in', Eval('laboratory_domain'))],
|
||||||
states={
|
states={
|
||||||
'required': Bool(Eval('laboratory_domain')),
|
'required': Bool(Eval('laboratory_domain')),
|
||||||
'readonly': Bool(Eval('context', {}).get('readonly', True)),
|
'readonly': Bool(Eval('context', {}).get('readonly', True)),
|
||||||
|
|
Loading…
Reference in a new issue