Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7800 Lượt xem

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

How can i do it ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 24
2266
1
thg 11 23
1471
0
thg 10 17
5037
4
thg 5 23
9161
1
thg 2 23
5758