summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2015-11-30 10:55:10 +0100
committerNicolas Martinelli <nim@odoo.com>2015-11-30 13:07:27 +0100
commitf2aea91b4a1f31cbc5dabe4f0af9346fec6b50f8 (patch)
treeb514710087b97c1b03c0d3be831a7726c0bb7c9c
parent901a3e030c4b11a219abf391839a471025bab4b3 (diff)
[IMP] stock: add picking partner_id
Add a related field to the partner_id of the picking. Note that partner_id on stock.move is different from partner_id on stock.picking in case of dropshipping, therefore we need to show both fields. opw-656298
-rw-r--r--addons/stock/stock.py2
-rw-r--r--addons/stock/stock_view.xml1
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index b90c2b672f9..40e395fddf2 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1920,7 +1920,7 @@ class stock_move(osv.osv):
auto_join=True, help="Location where the system will stock the finished products."),
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
-
+ 'picking_partner_id': fields.related('picking_id', 'partner_id', type='many2one', relation='res.partner', string='Transfer Destination Address'),
'move_dest_id': fields.many2one('stock.move', 'Destination Move', help="Optional: next stock move when chaining them", select=True, copy=False),
'move_orig_ids': fields.one2many('stock.move', 'move_dest_id', 'Original Move', help="Optional: previous stock move when chaining them", select=True),
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 25c39fcc9df..34862af8aa6 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1338,6 +1338,7 @@
<group name="destination_grp" string="Destination" groups="stock.group_locations">
<field name="location_dest_id" />
<field name="partner_id" context="{'contact_display':'partner'}" />
+ <field name="picking_partner_id" context="{'contact_display':'partner'}"/>
<field name="move_dest_id" groups="base.group_no_one" readonly="1"/>
</group>
<group name="quants_grp" string="Reserved Quants" colspan="2" groups="base.group_no_one" attrs="{'invisible': [('state', '=', 'done')]}">