From f4cb239fa83fa48c5a4343b9206e78fe8d76c000 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 26 Jul 2018 13:39:25 +0200 Subject: [PATCH] [FIX] stock: fix previous fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Typo in 5c44f205a2 Courtesy of Miquel Raïch, Eficient Closes #25935 --- addons/stock/models/res_company.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/models/res_company.py b/addons/stock/models/res_company.py index b78080e023c..28a10509d52 100644 --- a/addons/stock/models/res_company.py +++ b/addons/stock/models/res_company.py @@ -28,8 +28,8 @@ class Company(models.Model): location.sudo().write({'company_id': company.id}) company.write({'internal_transit_location_id': location.id}) - warehouses = self.env['stock.warehouse'].search([('partner_id', '=', location.partner_id.id)]) - warehouses.mapped('partner_id').with_context(force_company=location.id).write({ + warehouses = self.env['stock.warehouse'].search([('partner_id', '=', company.partner_id.id)]) + warehouses.mapped('partner_id').with_context(force_company=company.id).write({ 'property_stock_customer': location.id, 'property_stock_supplier': location.id, })