Reviewers: ,
Please review this at http://codereview.tryton.org/888002/
Affected files:
M shipment.py
M view/move_form.xml
Index: shipment.py
===================================================================
--- a/shipment.py
+++ b/shipment.py
@@ -79,7 +79,7 @@
warehouse_storage = fields.Function(fields.Many2One('stock.location',
'Warehouse Storage', on_change_with=['warehouse']),
'on_change_with_warehouse_storage')
- incoming_moves = fields.Function(fields.One2Many('stock.move', None,
+ incoming_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Incoming Moves',
add_remove=[
('shipment', '=', None),
@@ -99,7 +99,7 @@
depends=['state', 'warehouse', 'supplier_location',
'warehouse_input', 'company']),
'get_incoming_moves', setter='set_incoming_moves')
- inventory_moves = fields.Function(fields.One2Many('stock.move', None,
+ inventory_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Inventory Moves',
domain=[
('from_location', '=', Eval('warehouse_input')),
@@ -777,7 +777,7 @@
warehouse_output = fields.Function(fields.Many2One('stock.location',
'Warehouse Output', on_change_with=['warehouse']),
'on_change_with_warehouse_output')
- outgoing_moves = fields.Function(fields.One2Many('stock.move', None,
+ outgoing_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Outgoing Moves',
domain=[
('from_location', '=', Eval('warehouse_output')),
@@ -791,7 +791,7 @@
depends=['state', 'warehouse', 'customer', 'warehouse_output',
'customer_location', 'company']),
'get_outgoing_moves', setter='set_outgoing_moves')
- inventory_moves = fields.Function(fields.One2Many('stock.move', None,
+ inventory_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Inventory Moves',
domain=[
('from_location', 'child_of', [Eval('warehouse_storage',
-1)],
@@ -1296,7 +1296,7 @@
warehouse_input = fields.Function(fields.Many2One('stock.location',
'Warehouse Input', on_change_with=['warehouse']),
'on_change_with_warehouse_input')
- incoming_moves = fields.Function(fields.One2Many('stock.move', None,
+ incoming_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Incoming Moves',
domain=[
('from_location', '=', Eval('customer_location')),
@@ -1310,7 +1310,7 @@
depends=['state', 'warehouse', 'customer', 'customer_location',
'warehouse_input', 'company']),
'get_incoming_moves', setter='set_incoming_moves')
- inventory_moves = fields.Function(fields.One2Many('stock.move', None,
+ inventory_moves =
fields.Function(fields.One2Many('stock.move', 'shipment',
'Inventory Moves',
domain=[
('from_location', '=', Eval('warehouse_input')),
Index: view/move_form.xml
===================================================================
--- a/view/move_form.xml
+++ b/view/move_form.xml
@@ -2,6 +2,8 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form string="Move" col="4">
+ <label name="shipment"/>
+ <field name="shipment" colspan="3"/>
<label name="from_location"/>
<field name="from_location"/>
<label name="to_location"/>