跳至內容
選單
此問題已被標幟
2 回覆
7763 瀏覽次數

Guys, is it possible to sort tasks in projects by date ?

How can i do it ?

頭像
捨棄
最佳答案

Hi. Go to Project -> Tasks, turn on the List view and then use Advanced filters (e.g Ending date) to filter the information.

頭像
捨棄
最佳答案

You can use either _order in your python file by inheriting the project.task model or by adding the default_order attribute by inheriting the tree view in your xml file.

in .py file:

class task(models.Model):
_inherit = 'project.task'
_order = 'date_start desc'

in xml file:

<record id="view_task_tree2_inherited" model="ir.ui.view">
<field name="name">view.task.tree2.inherited</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_tree2"/>
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="default_order">date_start desc</attribute>
</tree>

</field>
</record>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
8月 24
2236
1
11月 23
1466
0
10月 17
5011
4
5月 23
9143
1
2月 23
5749