Keep copying readonly moves of shipments
Since cf8f1399bc1b readonly fields are not more copied but on shipment the moves is readonly only to force the usage of Function fields. So we could convert the readonly attribute by a static readonly states. Closes #13004
This commit is contained in:
1 parent
c60534e7ff
commit
ba1d556234
1 file changed
+18
-6
@@ -407,8 +407,12 @@ class ShipmentIn(
|
||||
},
|
||||
help="The moves that put the stock away into the storage area."),
|
||||
'get_inventory_moves', setter='set_inventory_moves')
|
||||
moves = fields.One2Many('stock.move', 'shipment', 'Moves',
|
||||
domain=[('company', '=', Eval('company'))], readonly=True)
|
||||
moves = fields.One2Many(
|
||||
'stock.move', 'shipment', "Moves",
|
||||
domain=[('company', '=', Eval('company'))],
|
||||
states={
|
||||
'readonly': True,
|
||||
})
|
||||
origins = fields.Function(fields.Char('Origins'), 'get_origins')
|
||||
received_by = employee_field("Received By")
|
||||
done_by = employee_field("Done By")
|
||||
@@ -1245,8 +1249,12 @@ class ShipmentOut(
|
||||
},
|
||||
help="The moves that pick the stock from the storage area."),
|
||||
'get_inventory_moves', setter='set_inventory_moves')
|
||||
moves = fields.One2Many('stock.move', 'shipment', 'Moves',
|
||||
domain=[('company', '=', Eval('company'))], readonly=True)
|
||||
moves = fields.One2Many(
|
||||
'stock.move', 'shipment', "Moves",
|
||||
domain=[('company', '=', Eval('company'))],
|
||||
states={
|
||||
'readonly': True,
|
||||
})
|
||||
origins = fields.Function(fields.Char('Origins'), 'get_origins')
|
||||
picked_by = employee_field("Picked By")
|
||||
packed_by = employee_field("Packed By")
|
||||
@@ -1943,8 +1951,12 @@ class ShipmentOutReturn(
|
||||
},
|
||||
help="The moves that put the stock away into the storage area."),
|
||||
'get_inventory_moves', setter='set_inventory_moves')
|
||||
moves = fields.One2Many('stock.move', 'shipment', 'Moves',
|
||||
domain=[('company', '=', Eval('company'))], readonly=True)
|
||||
moves = fields.One2Many(
|
||||
'stock.move', 'shipment', "Moves",
|
||||
domain=[('company', '=', Eval('company'))],
|
||||
states={
|
||||
'readonly': True,
|
||||
})
|
||||
origins = fields.Function(fields.Char('Origins'), 'get_origins')
|
||||
received_by = employee_field("Received By")
|
||||
done_by = employee_field("Done By")
|
||||
|
||||
Reference in new issue
Block a user