首页 > 解决方案 > 库存中默认的树视图

问题描述

在销售中,当我转到产品菜单时,我默认获得树视图。我是这样做的

<record id="product.product_normal_action_sell" model="ir.actions.act_window">
            <field name="view_mode">tree,form,kanban</field>
        </record>
        <record id="product.product_template_action" model="ir.actions.act_window">
            <field name="view_mode">tree,form,kanban</field>
            <field name="view_id" ref="product.product_template_tree_view"/>
        </record>

采购和制造也是如此,但我在库存中做同样的事情有问题。

这是一个调用动作的原始菜单

<menuitem
            action="product.product_template_action_product" id="menu_product_variant_config_stock" name="Products"
            parent="stock.menu_stock_inventory_control" sequence="1"/>

我怎样才能让它在我去库存->产品树视图时默认打开

标签: odooodoo-8odoo-9

解决方案


事实上,它是一样的。你需要添加

  <record id="product.product_template_action_product" model="ir.actions.act_window">
            <field name="view_mode">tree,form,kanban</field>
        </record>

到产品视图


推荐阅读