[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user