Skip to content

Commit

Permalink
do not discard the owner in chained move
Browse files Browse the repository at this point in the history
This addresses odoo/odoo#4839, and makes the related fix in the core
work with this module as well.
  • Loading branch information
lepistone committed Jan 22, 2015
1 parent 08b82aa commit b1dfc27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sale_owner_stock_sourcing/model/procurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ def _run_move_create(self, procurement):
"""
res = super(Procurement, self)._run_move_create(procurement)
res['restrict_partner_id'] = procurement.sale_line_id.stock_owner_id.id
sale_line = procurement.sale_line_id
if sale_line:
res['restrict_partner_id'] = sale_line.stock_owner_id.id
return res

0 comments on commit b1dfc27

Please sign in to comment.