Purpose of this commit is to improve the generic usage of the project app. So in this commit done the following changes: - add done task count field in milestone and display it in milestone form view stat button all tasks under this milestone and the done tasks of the milestone. - rename 'project.project' form view field lable from 'Name of the tasks' to 'Name of the Tasks'. - add 'invoiced' column in the project update description under the sales section. - remove helper for 'project.project' name field in form view. - add a placeholder in the 'project.task' form view. task-3073860 closes odoo/odoo#107076 Related: odoo/enterprise#34593 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
67 lines
3.2 KiB
XML
67 lines
3.2 KiB
XML
<?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"
|
|
attrs="{'invisible': [('task_count', '=', 0)]}"
|
|
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="text-secondary fw-normal"> Tasks</span>
|
|
</span>
|
|
<span class="o_stat_value">
|
|
<field name="done_task_count" nolabel="1"/>
|
|
<span class="text-secondary 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.tree</field>
|
|
<field name="model">project.milestone</field>
|
|
<field name="arch" type="xml">
|
|
<tree 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"/>
|
|
<field name="is_deadline_exceeded" invisible="1"/>
|
|
<field name="task_count" invisible="1" />
|
|
<field name="can_be_marked_as_done" invisible="1"/>
|
|
<button name="action_view_tasks"
|
|
type="object"
|
|
title="View Tasks"
|
|
string="View Tasks"
|
|
class="btn btn-link float-end"
|
|
attrs="{'invisible': [('task_count', '=', 0)]}"
|
|
groups="project.group_project_milestone"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
</odoo>
|