[REV] stock: group_by WH when multiple WH

This reverts commit 70ce14e798
because :
- It is ugly by default with dropship activated.
- This behavior can be done easily with a favorite search (for
poeple which wanted this feature).
- Technical debt

closes odoo/odoo#77092

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
This commit is contained in:
Rémy Voet (ryv)
2021-09-24 14:00:23 +00:00
parent 8e6b59c761
commit d547bce39d
2 changed files with 1 additions and 21 deletions
-10
View File
@@ -206,16 +206,6 @@ class PickingType(models.Model):
if self.show_operations and self.code != 'incoming':
self.show_reserved = True
@api.model
def action_view_picking_type(self):
action = self.env["ir.actions.actions"]._for_xml_id("stock.stock_picking_type_action")
if self.user_has_groups('stock.group_stock_multi_locations'):
context = literal_eval(action['context'])
context['search_default_groupby_warehouse_id'] = True
action['context'] = context
return action
def _get_action(self, action_xmlid):
action = self.env["ir.actions.actions"]._for_xml_id(action_xmlid)
if self:
+1 -11
View File
@@ -97,16 +97,6 @@
</field>
</record>
<record id="stock_picking_type_menu_action" model="ir.actions.server">
<field name="name">Overview</field>
<field name="model_id" ref="stock.model_stock_picking_type"/>
<field name="groups_id" eval="[(4, ref('stock.group_stock_user'))]"/>
<field name="state">code</field>
<field name="code">
action = model.action_view_picking_type()
</field>
</record>
<record id="action_picking_type_list" model="ir.actions.act_window">
<field name="name">Operations Types</field>
<field name="res_model">stock.picking.type</field>
@@ -123,7 +113,7 @@
</record>
<menuitem
action="stock_picking_type_menu_action"
action="stock_picking_type_action"
id="stock_picking_type_menu"
parent="menu_stock_root" sequence="0"
name="Overview"/>