[FIX] stock: multicompany reception
authorMartin Trigaux <mat@odoo.com>
Fri, 14 Nov 2014 10:10:15 +0000 (11:10 +0100)
committerMartin Trigaux <mat@odoo.com>
Fri, 14 Nov 2014 11:24:40 +0000 (12:24 +0100)
commitcf488682c82a320589b1241f4b6bd9d59018bfed
tree9bcea5ff0182c169fead5581d7362a438886b8e6
parent7f4c4a5e8a94c4cea0700a3fcc928fa11fbdc96f
[FIX] stock: multicompany reception

When a picking is confirmed, the generated account.move(.line) should take the
company, accounts, journals and period with the same company as the picking,
not the one of the current user.

This was problematic if a user in a company confirm a picking linked to
a purchase order done in another company.
For real time valuations, the generated accounting entries were mixing both
companies.

Fixes #3466
addons/stock/stock.py