File: project_milestone_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (61 lines) | stat: -rw-r--r-- 2,976 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="project_milestone_view_form" model="ir.ui.view">
        <field name="name">project.milestone.view.form</field>
        <field name="model">project.milestone</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <div class="oe_button_box" name="button_box">
                        <button name="%(project.action_view_task_from_milestone)d"
                                type="action"
                                class="oe_stat_button"
                                icon="fa-tasks"
                                context="{'default_project_id': project_id}"
                                groups="project.group_project_milestone"
                                close="1"
                        >
                            <div class="o_form_field o_stat_info">
                                <span class="o_stat_value">
                                    <field name="task_count" nolabel="1"/>
                                    <span class="fw-normal"> Tasks</span>
                                </span>
                                <span class="o_stat_value" invisible="done_task_count == 0">
                                    <field name="done_task_count" nolabel="1"/>
                                    <span class="fw-normal"> Done</span>
                                </span>
                            </div>
                        </button>
                    </div>
                    <group>
                        <group name="main_details">
                            <field name="project_id" invisible="1"/>
                            <field name="name" placeholder="e.g: Product Launch"/>
                            <field name="deadline"/>
                            <field name="is_reached"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="project_milestone_view_tree" model="ir.ui.view">
        <field name="name">project.milestone.view.list</field>
        <field name="model">project.milestone</field>
        <field name="arch" type="xml">
            <list decoration-success="can_be_marked_as_done" decoration-danger="is_deadline_exceeded and not can_be_marked_as_done" decoration-muted="is_reached" editable="bottom" sample="1">
                <field name="name"/>
                <field name="deadline" optional="show"/>
                <field name="is_reached" optional="show"/>
                <button name="action_view_tasks"
                        type="object"
                        title="View Tasks"
                        string="View Tasks"
                        class="btn btn-link float-end"
                        invisible="task_count == 0"
                        groups="project.group_project_milestone"/>
            </list>
        </field>
    </record>
</odoo>