[FIX] stock: default warehouse in replenish wizard

Before this commit, passing the `default_warehouse_id` in the context
has no effect with the product replenish wizard because the warehouse id
was overrided in the `default_get`.
This commit is contained in:
svs-odoo
2020-07-31 12:36:54 +00:00
parent 61300f6817
commit 56eb3f3599
+1 -1
View File
@@ -49,7 +49,7 @@ class ProductReplenish(models.TransientModel):
res['product_uom_id'] = product_tmpl_id.uom_id.id
if 'company_id' in fields:
res['company_id'] = company.id
if 'warehouse_id' in fields:
if 'warehouse_id' in fields and 'warehouse_id' not in res:
warehouse = self.env['stock.warehouse'].search([('company_id', '=', company.id)], limit=1)
res['warehouse_id'] = warehouse.id
if 'date_planned' in fields: