Do not apply domain in advance state for production_location field.
This commit refs #28835
This commit is contained in:
parent
8058d282ab
commit
5925cd7a88
11
unit_load.py
11
unit_load.py
|
@ -129,10 +129,13 @@ class UnitLoad(ModelSQL, ModelView):
|
|||
'on_change_with_warehouse_production')
|
||||
production_location = fields.Many2One('stock.location',
|
||||
'Production location', select=True,
|
||||
domain=[('type', '=', 'production'),
|
||||
If(Bool(Eval('warehouse')),
|
||||
('parent', 'child_of', Eval('warehouse_production')),
|
||||
())],
|
||||
domain=[
|
||||
('type', '=', 'production'),
|
||||
If(Bool(Eval('warehouse')
|
||||
& (Eval('production_state') == 'running')),
|
||||
('parent', 'child_of', Eval('warehouse_production')),
|
||||
())
|
||||
],
|
||||
states={
|
||||
'readonly': (Eval('state') != 'draft') | (
|
||||
Eval('production_state') == 'done'),
|
||||
|
|
Loading…
Reference in New Issue