“ group_by_no_leaf”的用途是什么?

时间:2019-07-30 06:52:14

标签: odoo odoo-12

我们在行动过程中传递了“ group_by_no_leaf”,有人可以帮助我理解其确切用法吗?

例如,如下所示:

<record id="action_project_task_user_tree" model="ir.actions.act_window">
            <field name="name">Tasks Analysis</field>
            <field name="res_model">report.project.task.user</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,pivot</field>
            <field name="search_view_id" ref="view_task_project_user_search"/>
            <field name="context">{'group_by_no_leaf':1,'group_by':[]}</field>
            <field name="help">This report allows you to analyse the performance of your projects and users. You can analyse the quantities of tasks, the hours spent compared to the planned hours, the average number of days to open or close a task, etc.</field>
        </record>

1 个答案:

答案 0 :(得分:0)

“ group_by_no_leaf”是列表视图的可选参数,当给定时,该参数隐藏按钮的第一行。 (包含“创建”,“导入”等按钮的行。)

源:/addons/web/static/tests/views/list_tests.js第1569行包含用于验证此行为的unit_test。