odoo - 库存中默认的树视图
问题描述
在销售中,当我转到产品菜单时,我默认获得树视图。我是这样做的
<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"/>
我怎样才能让它在我去库存->产品树视图时默认打开
解决方案
事实上,它是一样的。你需要添加
<record id="product.product_template_action_product" model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
</record>
到产品视图
推荐阅读
- javascript - Node.js 事件循环忽略读取流数据事件中的 setTimeout?
- r - 我正在尝试使用 ROSE 来帮助采样不平衡。我的 ovun.sample 代码正在创建空值,我该如何解决?
- python - 如何使用 plt.imshow() 查看图像而不会出现“ValueError:无法将大小为 49152 的数组重塑为形状 (128,128)”?
- graphics - DirectX 11:启用深度缓冲区视图隐藏所有几何图形
- python - 从不同来源创建字典
- java - 为什么在构造函数中更改对象中的变量之一?
- java - 在运行时使用 intellij 在 Spring Boot application.yml 文件中注入占位符值
- html - bootstrap-如何正确对齐结构?
- java - 在 java Android Studio 中找不到局部变量“OpenCVLoader”
- c# - 将数据库附加到 SQL Server