[FIX] mrp: default location

- Create a picking type with specific default locations, for type
  Manufacturing
- Go to Inventory, click on the 'To Process' button
- Create a MO

The default locations are not taken into account.

This is because the default picking type is not in the context.

opw-2128182

closes odoo/odoo#41049

X-original-commit: 6f7cbedd0ad252352209391501ba8971f7e90d00
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-11-28 11:55:01 +00:00
parent ca92a5e8cd
commit b96830ed83
+2 -2
View File
@@ -29,7 +29,7 @@
<div class="container o_kanban_card_content" t-if="!selection_mode">
<div class="row">
<div class="col-6 o_kanban_primary_left">
<button class="btn btn-primary" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_todo': 1}">
<button class="btn btn-primary" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_todo': 1, 'default_picking_type_id': active_id}">
<span t-if="record.code.raw_value =='mrp_operation'"><t t-esc="record.count_mo_todo.value"/> To Process</span>
</button>
</div>
@@ -46,7 +46,7 @@
</div>
<div t-if="record.count_mo_late.raw_value > 0" class="row">
<div class="col-9">
<a class="oe_kanban_stock_picking_type_list" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_late': 1}">
<a class="oe_kanban_stock_picking_type_list" name="%(mrp_production_action_picking_deshboard)d" type="action" context="{'search_default_late': 1, 'default_picking_type_id': active_id}">
Late
</a>
</div>