From 16f548ed7ac340d9dcc2aecb563b0d7a05dc116b Mon Sep 17 00:00:00 2001 From: David Tran Date: Fri, 25 Oct 2019 10:34:24 +0000 Subject: [PATCH] [FIX] stock: couldn't select another warehouse on product.replenish form Wrong key in default_get. It should be `company_id` instead of `company` closes odoo/odoo#39448 X-original-commit: 0859a5b073aeadf7cfa5e32b7c45cce7a1933f0d Signed-off-by: Simon Lejeune (sle) --- addons/stock/wizard/product_replenish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/wizard/product_replenish.py b/addons/stock/wizard/product_replenish.py index ba9531af915..96362497165 100644 --- a/addons/stock/wizard/product_replenish.py +++ b/addons/stock/wizard/product_replenish.py @@ -46,7 +46,7 @@ class ProductReplenish(models.TransientModel): company = product_tmpl_id.company_id or self.env.company if 'product_uom_id' in fields: res['product_uom_id'] = product_tmpl_id.uom_id.id - if 'company' in fields: + if 'company_id' in fields: res['company_id'] = company.id if 'warehouse_id' in fields: warehouse = self.env['stock.warehouse'].search([('company_id', '=', company.id)], limit=1)