| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="project_project_view_activity" model="ir.ui.view"> |
| 4 |
<field name="name">project.project.view.activity</field> |
| 5 |
<field name="model">project.project</field> |
| 6 |
<field name="arch" type="xml"> |
| 7 |
<activity string="Project" js_class="project_project_activity"> |
| 8 |
<templates> |
| 9 |
<div t-name="activity-box" class="d-flex"> |
| 10 |
<field name="user_id" widget="many2one_avatar_user"/> |
| 11 |
<field name="name" string="Project Name" class="flex-grow-1 o_text_block"/> |
| 12 |
</div> |
| 13 |
</templates> |
| 14 |
</activity> |
| 15 |
</field> |
| 16 |
</record> |
| 17 |
|
| 18 |
<record id="action_send_mail_project_project" model="ir.actions.act_window"> |
| 19 |
<field name="name">Send Email</field> |
| 20 |
<field name="res_model">mail.compose.message</field> |
| 21 |
<field name="view_mode">form</field> |
| 22 |
<field name="target">new</field> |
| 23 |
<field name="group_ids" eval="[(4, ref('project.group_project_manager'))]"/> |
| 24 |
<field name="context">{ |
| 25 |
'default_composition_mode': 'mass_mail', |
| 26 |
}</field> |
| 27 |
<field name="binding_model_id" ref="project.model_project_project"/> |
| 28 |
<field name="binding_view_types">list,kanban</field> |
| 29 |
</record> |
| 30 |
|
| 31 |
<record id="edit_project" model="ir.ui.view"> |
| 32 |
<field name="name">project.project.form</field> |
| 33 |
<field name="model">project.project</field> |
| 34 |
<field name="arch" type="xml"> |
| 35 |
<form string="Project" class="o_form_project_project" js_class="project_project_form"> |
| 36 |
<field name="company_id" invisible="1"/> |
| 37 |
<header> |
| 38 |
<button name="action_open_share_project_wizard" string="Share Project" type="object" class="oe_highlight" groups="project.group_project_manager" |
| 39 |
invisible="privacy_visibility in ['followers', 'employees'] or is_template" context="{'default_access_mode': 'read'}" data-hotkey="r"/> |
| 40 |
<field name="stage_id" widget="statusbar_duration" options="{'clickable': '1', 'fold_field': 'fold'}" groups="project.group_project_stages" domain="[('company_id', 'in', (company_id, False))]"/> |
| 41 |
</header> |
| 42 |
<sheet string="Project"> |
| 43 |
<div class="oe_button_box" name="button_box" groups="base.group_user"> |
| 44 |
<button class="oe_stat_button" type="object" name="action_view_tasks" icon="fa-check"> |
| 45 |
<div class="o_field_widget o_stat_info"> |
| 46 |
<field name="label_tasks" readonly="1"/> |
| 47 |
<span class="o_stat_value"> |
| 48 |
<field name="closed_task_count"/> / <field name="task_count"/> |
| 49 |
(<field name="task_completion_percentage" widget="percentage" options="{'digits': [1, 0]}"/>) |
| 50 |
</span> |
| 51 |
</div> |
| 52 |
</button> |
| 53 |
<button class="oe_stat_button" name="project_update_all_action" type="object" groups="project.group_project_user" context="{'active_id': id}" invisible="is_template"> |
| 54 |
<field name="last_update_color" invisible="1"/> |
| 55 |
<div class="o_stat_info"> |
| 56 |
<field name="update_count" invisible="1"/> |
| 57 |
<field name="last_update_status" readonly="1" widget="status_with_color" status_label="Dashboard" hideStatusName="True"/> |
| 58 |
</div> |
| 59 |
</button> |
| 60 |
</div> |
| 61 |
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/> |
| 62 |
<widget name="web_ribbon" title="Template" bg_color="text-bg-info" invisible="not (is_template and active)"/> |
| 63 |
|
| 64 |
<div class="oe_title"> |
| 65 |
<h1 class="d-flex flex-row"> |
| 66 |
<field name="is_favorite" nolabel="1" widget="project_is_favorite" class="me-2" options="{'autosave': False}"/> |
| 67 |
<field name="name" options="{'line_breaks': False}" widget="text" class="o_text_overflow" placeholder="e.g. Office Party"/> |
| 68 |
</h1> |
| 69 |
</div> |
| 70 |
<group> |
| 71 |
<group> |
| 72 |
<field name="label_tasks" string="Name of the Tasks" placeholder="e.g. Tasks"/> |
| 73 |
<field name="partner_id" widget="res_partner_many2one"/> |
| 74 |
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/> |
| 75 |
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" placeholder="Visible to all"/> |
| 76 |
</group> |
| 77 |
<group> |
| 78 |
<field name="active" invisible="1"/> |
| 79 |
<field name="user_id" string="Project Manager" widget="many2one_avatar_user" readonly="not active" domain="[('share', '=', False)]"/> |
| 80 |
<field name="date_start" string="Planned Date" widget="daterange" options='{"end_date_field": "date", "always_range": "1"}' required="date_start or date" /> |
| 81 |
<field name="date" invisible="1" required="date_start"/> |
| 82 |
</group> |
| 83 |
</group> |
| 84 |
<notebook> |
| 85 |
<page name="description" string="Description"> |
| 86 |
<field name="description" options="{'resizable': false}" placeholder="Project description..."/> |
| 87 |
</page> |
| 88 |
<page name="settings" string="Settings"> |
| 89 |
<group> |
| 90 |
<group> |
| 91 |
<!-- Always display the whole alias in edit mode. It depends in read only --> |
| 92 |
<!-- Need to add alias_id in view for getting alias_domain_id by default --> |
| 93 |
<field name="alias_id" invisible="1"/> |
| 94 |
<label for="alias_name" string="Email Alias" invisible="is_template"/> |
| 95 |
<field name="alias_email" widget="email" readonly="1" nolabel="1" groups="!project.group_project_manager" invisible="is_template"/> |
| 96 |
<div class="d-inline-flex" groups="project.group_project_manager" invisible="is_template"> |
| 97 |
<field name="alias_name" placeholder="alias"/>@ |
| 98 |
<field name="alias_domain_id" placeholder="e.g. mycompany.com" |
| 99 |
options="{'no_create': True, 'no_open': True}"/> |
| 100 |
</div> |
| 101 |
<!-- the alias contact must appear when the user start typing and it must disappear |
| 102 |
when the string is deleted. --> |
| 103 |
<field name="alias_contact" class="oe_inline" string="Accept Emails From" |
| 104 |
invisible="not alias_email"/> |
| 105 |
<field name="privacy_visibility" widget="radio"/> |
| 106 |
<span colspan="2" class="text-muted o_row ps-1" invisible="access_instruction_message == ''"> |
| 107 |
<i class="fa fa-lightbulb-o pe-2" title="Info"/><field class="d-inline" name="access_instruction_message" nolabel="1"/> |
| 108 |
</span> |
| 109 |
<span colspan="2" class="text-muted o_row ps-1" invisible="privacy_visibility_warning == ''"> |
| 110 |
<i class="fa fa-warning pe-2" title="Warning"/><field class="d-inline" name="privacy_visibility_warning" nolabel="1"/> |
| 111 |
</span> |
| 112 |
</group> |
| 113 |
<group name="analytic" groups="analytic.group_analytic_accounting"> |
| 114 |
<div class="o_flexible_margin_top o_horizontal_separator text-uppercase fw-bolder small mb-3" colspan="2">analytic</div> |
| 115 |
<field name="account_id"/> |
| 116 |
</group> |
| 117 |
<group name="extra_settings"> |
| 118 |
</group> |
| 119 |
</group> |
| 120 |
<group> |
| 121 |
<group name="group_tasks_managment" string="Tasks Management" col="1" class="row mt16 o_settings_container"> |
| 122 |
<div> |
| 123 |
<setting class="col-lg-12" id="recurring_tasks_setting" help="Auto-generate tasks for regular activities"> |
| 124 |
<field name="allow_recurring_tasks"/> |
| 125 |
</setting> |
| 126 |
<setting class="col-lg-12" id="task_dependencies_setting" help="Determine the order in which to perform tasks"> |
| 127 |
<field name="allow_task_dependencies"/> |
| 128 |
</setting> |
| 129 |
<setting class="col-lg-12" id="project_milestone_setting" help="Track major progress points that must be reached to achieve success"> |
| 130 |
<field name="allow_milestones"/> |
| 131 |
</setting> |
| 132 |
</div> |
| 133 |
</group> |
| 134 |
<group name="group_time_managment" string="Time Management" invisible="1" col="1" class="row mt16 o_settings_container"/> |
| 135 |
</group> |
| 136 |
</page> |
| 137 |
</notebook> |
| 138 |
</sheet> |
| 139 |
<chatter reload_on_follower="True"/> |
| 140 |
</form> |
| 141 |
</field> |
| 142 |
</record> |
| 143 |
|
| 144 |
<record id="view_project_project_filter" model="ir.ui.view"> |
| 145 |
<field name="name">project.project.select</field> |
| 146 |
<field name="model">project.project</field> |
| 147 |
<field name="arch" type="xml"> |
| 148 |
<search string="Search Project"> |
| 149 |
<field name="name" string="Project"/> |
| 150 |
<field name="tag_ids"/> |
| 151 |
<field name="user_id" string="Project Manager"/> |
| 152 |
<field name="stage_id" groups="project.group_project_stages"/> |
| 153 |
<field name="partner_id" string="Customer" filter_domain="[('partner_id', 'child_of', self)]" invisible="context.get('default_is_template')"/> |
| 154 |
<field name="activity_user_id" string="Activities of"/> |
| 155 |
<field name="activity_type_id" string="Activity type"/> |
| 156 |
<filter string="My Projects" name="own_projects" domain="[('user_id', '=', uid)]" invisible="context.get('default_is_template')"/> |
| 157 |
<filter string="My Favorites" name="my_projects" domain="[('favorite_user_ids', 'in', uid)]"/> |
| 158 |
<filter string="Unassigned" name="unassigned_projects" domain="[('user_id', '=', False)]"/> |
| 159 |
<separator invisible="context.get('default_is_template')"/> |
| 160 |
<filter string="Late Milestones" name="late_milestones" domain="[('is_milestone_exceeded', '=', True)]" groups="project.group_project_milestone" invisible="context.get('default_is_template') or not context.get('allow_milestones', True)"/> |
| 161 |
<separator invisible="context.get('default_is_template')"/> |
| 162 |
<filter string="Start Date" name="start_date" date="date_start" end_month="1" end_year="1"/> |
| 163 |
<filter string="End Date" name="end_date" date="date" end_month="1" end_year="1"/> |
| 164 |
<separator/> |
| 165 |
<filter string="Templates" context="{'render_project_templates': True}" name="templates" domain="[('is_template', '=', True)]" |
| 166 |
invisible="not context.get('display_milestone_deadline')"/> |
| 167 |
<separator/> |
| 168 |
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> |
| 169 |
<separator invisible="1"/> |
| 170 |
<filter invisible="1" string="My Activities" name="filter_activities_my" |
| 171 |
domain="[('activity_user_id', '=', uid)]"/> |
| 172 |
<separator/> |
| 173 |
<filter invisible="1" string="Late Activities" name="activities_overdue" |
| 174 |
domain="[('my_activity_date_deadline', '<', 'today')]" |
| 175 |
help="Show all records whose next activity date is past"/> |
| 176 |
<filter invisible="1" string="Today Activities" name="activities_today" |
| 177 |
domain="[('my_activity_date_deadline', '=', 'today')]"/> |
| 178 |
<filter invisible="1" string="Future Activities" name="activities_upcoming_all" |
| 179 |
domain="[('my_activity_date_deadline', '>', 'today')]"/> |
| 180 |
<group> |
| 181 |
<filter string="Project Manager" name="Manager" context="{'group_by': 'user_id'}"/> |
| 182 |
<filter string="Stage" name="groupby_stage" context="{'group_by': 'stage_id'}" groups="project.group_project_stages"/> |
| 183 |
<filter string="Status" name="status" context="{'group_by': 'last_update_status'}" invisible="context.get('default_is_template')"/> |
| 184 |
<filter string="Tags" name="tags" context="{'group_by': 'tag_ids'}"/> |
| 185 |
<filter string="Company" name="company" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/> |
| 186 |
</group> |
| 187 |
</search> |
| 188 |
</field> |
| 189 |
</record> |
| 190 |
|
| 191 |
<record id="view_project" model="ir.ui.view"> |
| 192 |
<field name="name">project.project.list</field> |
| 193 |
<field name="model">project.project</field> |
| 194 |
<field name="arch" type="xml"> |
| 195 |
<list decoration-muted="active == False" string="Projects" multi_edit="1" sample="1" default_order="is_favorite desc, sequence, name, id" js_class="project_project_list"> |
| 196 |
<field name="sequence" column_invisible="True"/> |
| 197 |
<field name="message_needaction" column_invisible="True"/> |
| 198 |
<field name="active" column_invisible="True"/> |
| 199 |
<field name="is_milestone_exceeded" column_invisible="True"/> |
| 200 |
<field name="can_mark_milestone_as_done" column_invisible="True"/> |
| 201 |
<field name="is_milestone_deadline_exceeded" column_invisible="1"/> |
| 202 |
<field name="allow_milestones" column_invisible="True"/> |
| 203 |
<field name="is_favorite" string="Favorite" nolabel="1" widget="project_is_favorite" optional="hide"/> |
| 204 |
<field name="name" class="fw-bold"/> |
| 205 |
<field name="partner_id" optional="show" string="Customer" invisible="is_template"/> |
| 206 |
<field name="company_id" optional="show" groups="base.group_multi_company" options="{'no_create': True, 'no_open': True}"/> |
| 207 |
<field name="company_id" column_invisible="True"/> |
| 208 |
<field name="date_start" string="Planned Date" widget="daterange" options="{'end_date_field': 'date', 'always_range': '1'}" optional="hide"/> |
| 209 |
<field name="date" column_invisible="True" /> |
| 210 |
<field name="milestone_progress" widget="progressbar" |
| 211 |
invisible="milestone_progress == 0 or not allow_milestones or is_template" |
| 212 |
optional="hide" |
| 213 |
/> |
| 214 |
<field name="next_milestone_id" |
| 215 |
decoration-danger="is_milestone_deadline_exceeded" decoration-success="can_mark_milestone_as_done" |
| 216 |
optional="hide" |
| 217 |
invisible="not allow_milestones or is_template" |
| 218 |
/> |
| 219 |
<field name="user_id" optional="show" string="Project Manager" widget="many2one_avatar_user" options="{'no_open':True, 'no_create': True}"/> |
| 220 |
<field name="last_update_color" column_invisible="True"/> |
| 221 |
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/> |
| 222 |
<field name="last_update_status" string="Status" nolabel="1" width="20px" optional="show" widget="project_state_selection" invisible="is_template"/> |
| 223 |
<field name="stage_id_color" column_invisible="1"/> |
| 224 |
<field name="stage_id" domain="[('company_id', 'in', (company_id, False))]" optional="show" widget="badge" options="{'no_open': True, 'color_field': 'stage_id_color'}" /> |
| 225 |
<button string="View Tasks" name="action_view_tasks" type="object"/> |
| 226 |
</list> |
| 227 |
</field> |
| 228 |
</record> |
| 229 |
|
| 230 |
<record id="project_list_view_group_stage" model="ir.ui.view"> |
| 231 |
<field name="name">project.project.list.group.stage</field> |
| 232 |
<field name="model">project.project</field> |
| 233 |
<field name="inherit_id" ref="view_project"/> |
| 234 |
<field name="mode">primary</field> |
| 235 |
<field name="arch" type="xml"> |
| 236 |
<list position="attributes"> |
| 237 |
<attribute name="default_group_by">stage_id</attribute> |
| 238 |
</list> |
| 239 |
</field> |
| 240 |
</record> |
| 241 |
|
| 242 |
<record id="view_project_config" model="ir.ui.view"> |
| 243 |
<field name="name">project.project.list.config</field> |
| 244 |
<field name="model">project.project</field> |
| 245 |
<field name="inherit_id" ref="project.view_project"/> |
| 246 |
<field name="mode">primary</field> |
| 247 |
<field name="arch" type="xml"> |
| 248 |
<xpath expr="//list" position="attributes"> |
| 249 |
<attribute name="default_order">sequence, name, id</attribute> |
| 250 |
</xpath> |
| 251 |
<field name="sequence" position="attributes"> |
| 252 |
<attribute name="column_invisible">0</attribute> |
| 253 |
<attribute name="widget">handle</attribute> |
| 254 |
</field> |
| 255 |
</field> |
| 256 |
</record> |
| 257 |
|
| 258 |
<record id="view_project_config_group_stage" model="ir.ui.view"> |
| 259 |
<field name="name">project.project.list.config.group.stage</field> |
| 260 |
<field name="model">project.project</field> |
| 261 |
<field name="inherit_id" ref="view_project_config"/> |
| 262 |
<field name="mode">primary</field> |
| 263 |
<field name="arch" type="xml"> |
| 264 |
<list position="attributes"> |
| 265 |
<attribute name="default_group_by">stage_id</attribute> |
| 266 |
</list> |
| 267 |
</field> |
| 268 |
</record> |
| 269 |
|
| 270 |
<record id="quick_create_project_form" model="ir.ui.view"> |
| 271 |
<field name="name">project.form.quick_create</field> |
| 272 |
<field name="model">project.project</field> |
| 273 |
<field name="priority">1000</field> |
| 274 |
<field name="arch" type="xml"> |
| 275 |
<form class="o_form_project_project"> |
| 276 |
<group> |
| 277 |
<field name="name" string="Project Title" placeholder="e.g. Office Party"/> |
| 278 |
</group> |
| 279 |
</form> |
| 280 |
</field> |
| 281 |
</record> |
| 282 |
|
| 283 |
<record id="project_view_kanban" model="ir.ui.view"> |
| 284 |
<field name="name">project.project.kanban</field> |
| 285 |
<field name="model">project.project</field> |
| 286 |
<field name="arch" type="xml"> |
| 287 |
<kanban class="o_kanban_mobile"> |
| 288 |
<templates> |
| 289 |
<t t-name="card"> |
| 290 |
<field name="name" class="fw-bolder" string="Project Name"/> |
| 291 |
<div class="d-flex"> |
| 292 |
<field name="partner_id" string="Contact"/> |
| 293 |
<field name="user_id" class="ms-auto" widget="many2one_avatar_user"/> |
| 294 |
</div> |
| 295 |
</t> |
| 296 |
</templates> |
| 297 |
</kanban> |
| 298 |
</field> |
| 299 |
</record> |
| 300 |
|
| 301 |
<record id="project_project_view_form_simplified" model="ir.ui.view"> |
| 302 |
<field name="name">project.project.view.form.simplified</field> |
| 303 |
<field name="model">project.project</field> |
| 304 |
<field name="arch" type="xml"> |
| 305 |
<form string="Project"> |
| 306 |
<div class="oe_title mb-lg-3 mb-md-2"> |
| 307 |
<label for="name" string="Name"/> |
| 308 |
<h1> |
| 309 |
<field name="name" class="o_project_name" placeholder="e.g. Office Party"/> |
| 310 |
</h1> |
| 311 |
</div> |
| 312 |
<field name="user_id" invisible="1"/> |
| 313 |
<div class="row o_settings_container"/> |
| 314 |
<div name="alias_def" class="mt-2" colspan="2"> |
| 315 |
<label for="alias_name" string="Create tasks by email:"/> |
| 316 |
<span> |
| 317 |
<field name="alias_id" invisible="1"/> |
| 318 |
<field name="alias_name" placeholder="e.g. office-party"/>@ |
| 319 |
<field name="alias_domain_id" class="oe_inline" placeholder="e.g. mycompany.com" |
| 320 |
options="{'no_create': True, 'no_open': True}"/> |
| 321 |
</span> |
| 322 |
</div> |
| 323 |
</form> |
| 324 |
</field> |
| 325 |
</record> |
| 326 |
|
| 327 |
<record id="project_project_view_form_simplified_footer" model="ir.ui.view"> |
| 328 |
<field name="name">project.project.view.form.simplified</field> |
| 329 |
<field name="model">project.project</field> |
| 330 |
<field name="inherit_id" ref="project.project_project_view_form_simplified"/> |
| 331 |
<field name="mode">primary</field> |
| 332 |
<field name="arch" type="xml"> |
| 333 |
<xpath expr="//div[@name='alias_def']" position="after"> |
| 334 |
<footer> |
| 335 |
<button string="Create project" name="action_view_tasks" type="object" class="btn-primary o_open_tasks" data-hotkey="q"/> |
| 336 |
<button string="Discard" class="btn-secondary" special="cancel" data-hotkey="x"/> |
| 337 |
</footer> |
| 338 |
</xpath> |
| 339 |
</field> |
| 340 |
</record> |
| 341 |
|
| 342 |
<record id="open_create_project" model="ir.actions.act_window"> |
| 343 |
<field name="name">Create a Project</field> |
| 344 |
<field name="res_model">project.project</field> |
| 345 |
<field name="view_mode">form</field> |
| 346 |
<field name="view_id" ref="project_project_view_form_simplified_footer"/> |
| 347 |
<field name="target">new</field> |
| 348 |
<field name="context">{"default_allow_billable": 0}</field> |
| 349 |
</record> |
| 350 |
|
| 351 |
<record model="ir.ui.view" id="view_project_kanban"> |
| 352 |
<field name="name">project.project.kanban</field> |
| 353 |
<field name="model">project.project</field> |
| 354 |
<field name="arch" type="xml"> |
| 355 |
<kanban highlight_color="color" |
| 356 |
class="o_project_kanban" |
| 357 |
js_class="project_project_kanban" |
| 358 |
on_create="project.open_create_project" |
| 359 |
action="action_view_tasks" type="object" |
| 360 |
quick_create_view="project.quick_create_project_form" |
| 361 |
sample="1" |
| 362 |
default_order="is_favorite desc, sequence, name, id" |
| 363 |
> |
| 364 |
<field name="allow_milestones"/> |
| 365 |
<field name="rating_count" /> |
| 366 |
<field name="show_ratings"/> |
| 367 |
<field name="privacy_visibility"/> |
| 368 |
<field name="last_update_color"/> |
| 369 |
<field name="is_milestone_deadline_exceeded"/> |
| 370 |
<field name="can_mark_milestone_as_done"/> |
| 371 |
<field name="is_template"/> |
| 372 |
<progressbar field="last_update_status" colors='{"on_track": "success", "at_risk": "warning", "off_track": "danger", "on_hold": "info", "done": "purple"}'/> |
| 373 |
<field name="sequence" widget="handle"/> |
| 374 |
<templates> |
| 375 |
<t t-name="menu" groups="base.group_user"> |
| 376 |
<div class="container"> |
| 377 |
<div class="row"> |
| 378 |
<div name="card_menu_view" class="col-6"> |
| 379 |
<h5 role="menuitem" class="o_kanban_card_manage_title"> |
| 380 |
<span>View</span> |
| 381 |
</h5> |
| 382 |
<div role="menuitem"> |
| 383 |
<a name="action_view_tasks" type="object">Tasks</a> |
| 384 |
</div> |
| 385 |
<div role="menuitem" groups="project.group_project_milestone" t-if="record.allow_milestones.raw_value and !record.is_template.raw_value"> |
| 386 |
<a name="action_get_list_view" type="object">Milestones</a> |
| 387 |
</div> |
| 388 |
</div> |
| 389 |
<div class="col-6 o_kanban_manage_reporting" t-if="!record.is_template.raw_value"> |
| 390 |
<h5 role="menuitem" class="o_kanban_card_manage_title" groups="project.group_project_user"> |
| 391 |
<span>Reporting</span> |
| 392 |
</h5> |
| 393 |
<div class="d-inline-block" role="menuitem" groups="project.group_project_user" name="task_analysis"> |
| 394 |
<a name="action_view_tasks_analysis" type="object">Tasks Analysis</a> |
| 395 |
</div> |
| 396 |
<div class="d-inline-block" role="menuitem" name="project_burndown_menu" groups="project.group_project_user"> |
| 397 |
<a name="action_project_task_burndown_chart_report" type="object">Burndown Chart</a> |
| 398 |
</div> |
| 399 |
</div> |
| 400 |
</div> |
| 401 |
<div class="o_kanban_card_manage_settings row"> |
| 402 |
<div role="menuitem" aria-haspopup="true" class="col-6" groups="project.group_project_manager"> |
| 403 |
<field name="color" widget="kanban_color_picker"/> |
| 404 |
</div> |
| 405 |
<div role="menuitem" class="col-6" groups="project.group_project_manager"> |
| 406 |
|
| 407 |
<a t-if="['portal', 'invited_users'].includes(record.privacy_visibility.raw_value) and !record.is_template.raw_value" class="dropdown-item" role="menuitem" name="action_open_share_project_wizard" type="object">Share Project</a> |
| 408 |
|
| 409 |
<a class="dropdown-item" role="menuitem" name="copy" type="object">Duplicate</a> |
| 410 |
<a class="dropdown-item" role="menuitem" type="open">Settings</a> |
| 411 |
</div> |
| 412 |
<div class="col-12 ps-0" groups="!project.group_project_manager"> |
| 413 |
<div role="menuitem" class="w-100"> |
| 414 |
<a class="dropdown-item mx-0" role="menuitem" type="open">View</a> |
| 415 |
</div> |
| 416 |
</div> |
| 417 |
</div> |
| 418 |
</div> |
| 419 |
</t> |
| 420 |
<t t-name="card"> |
| 421 |
<main class="o_project_kanban_main"> |
| 422 |
<div class="d-flex align-items-baseline gap-1"> |
| 423 |
<field name="is_favorite" widget="project_is_favorite" nolabel="1"/> |
| 424 |
<span class="text-truncate d-block fs-4 fw-bold" t-att-title="record.display_name.value"><field name="display_name"/></span> |
| 425 |
</div> |
| 426 |
<div class="o_project_kanban_body min-w-0 pb-4 me-2"> |
| 427 |
<span name="partner_name" class="text-muted d-flex align-items-baseline" t-if="record.partner_id.value"> |
| 428 |
<span class="fa fa-user me-2" aria-label="Partner" title="Partner"></span><field class="text-truncate" name="partner_id"/> |
| 429 |
</span> |
| 430 |
<div t-if="record.date.raw_value or record.date_start.raw_value" class="text-muted d-flex align-items-baseline"> |
| 431 |
<span class="fa fa-clock-o me-2" title="Dates"/> |
| 432 |
<field name="date_start" widget="daterange" options="{'end_date_field': 'date'}"/> |
| 433 |
</div> |
| 434 |
<div t-if="record.alias_email.value" class="text-muted text-truncate" t-att-title="record.alias_email.value"> |
| 435 |
<span class="fa fa-envelope-o me-2" aria-label="Domain Alias" title="Domain Alias"></span><field name="alias_email"/> |
| 436 |
</div> |
| 437 |
<div t-if="record.show_ratings.raw_value and record.rating_count.raw_value > 0" class="d-flex text-muted"> |
| 438 |
<b class="me-1"> |
| 439 |
<span class="fa mt4 fa-smile-o fw-bolder text-success" t-if="record.rating_avg.raw_value >= 3.66" title="Average Rating: Happy" role="img" aria-label="Happy face"/> |
| 440 |
<span class="fa mt4 fa-meh-o fw-bolder text-warning" t-elif="record.rating_avg.raw_value >= 2.33" title="Average Rating: Neutral" role="img" aria-label="Neutral face"/> |
| 441 |
<span class="fa mt4 fa-frown-o fw-bolder text-danger" t-else="" title="Average Rating: Unhappy" role="img" aria-label="Unhappy face"/> |
| 442 |
</b> |
| 443 |
<t t-if="record.rating_avg.raw_value % 1 == 0"> |
| 444 |
<field name="rating_avg" nolabel="1" widget="float" digits="[1, 0]"/> |
| 445 |
</t> |
| 446 |
<t t-else=""> |
| 447 |
<field name="rating_avg" nolabel="1" widget="float" digits="[1, 1]"/> |
| 448 |
</t> / 5 |
| 449 |
</div> |
| 450 |
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/> |
| 451 |
</div> |
| 452 |
</main> |
| 453 |
<footer class="mt-auto pt-0"> |
| 454 |
<div class="d-flex align-items-center"> |
| 455 |
<div class="o_project_kanban_boxes d-flex align-items-baseline"> |
| 456 |
<a class="o_project_kanban_box me-1" name="action_view_tasks" type="object"> |
| 457 |
<div> |
| 458 |
<field name="open_task_count" class="o_value"/> |
| 459 |
<field name="label_tasks" class="ms-1"/> |
| 460 |
</div> |
| 461 |
</a> |
| 462 |
<a groups='project.group_project_milestone' t-if="record.allow_milestones and record.allow_milestones.raw_value and record.milestone_count.raw_value > 0" |
| 463 |
t-attf-class="d-inline-block small me-1 text-{{ record.is_milestone_deadline_exceeded.raw_value ? 'danger' : (record.can_mark_milestone_as_done.raw_value ? 'success' : 'muted') }}" |
| 464 |
role="button" |
| 465 |
name="action_get_list_view" |
| 466 |
type="object" |
| 467 |
t-attf-title="#{record.milestone_count_reached.value} Milestones reached out of #{record.milestone_count.value}" |
| 468 |
> |
| 469 |
<span class="fa fa-flag me-1"/> |
| 470 |
<field name="milestone_count_reached"/>/<field name="milestone_count"/> |
| 471 |
</a> |
| 472 |
</div> |
| 473 |
<field name="activity_ids" widget="kanban_activity" class="ms-2"/> |
| 474 |
</div> |
| 475 |
<div class="d-flex ms-auto align-items-center"> |
| 476 |
<field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]" class="me-1"/> |
| 477 |
<field t-if="record.last_update_status.value && widget.editable && !record.is_template.raw_value" name="last_update_status" widget="project_state_selection"/> |
| 478 |
<span t-if="record.last_update_status.value && !widget.editable" t-att-class="'o_status_bubble mx-0 o_color_bubble_' + record.last_update_color.value" t-att-title="record.last_update_status.value"></span> |
| 479 |
</div> |
| 480 |
</footer> |
| 481 |
</t> |
| 482 |
</templates> |
| 483 |
</kanban> |
| 484 |
</field> |
| 485 |
</record> |
| 486 |
|
| 487 |
<record id="project_kanban_view_group_stage" model="ir.ui.view"> |
| 488 |
<field name="name">project.project.kanban.group.stage</field> |
| 489 |
<field name="model">project.project</field> |
| 490 |
<field name="mode">primary</field> |
| 491 |
<field name="inherit_id" ref="view_project_kanban"/> |
| 492 |
<field name="arch" type="xml"> |
| 493 |
<xpath expr="//kanban" position="attributes"> |
| 494 |
<attribute name="default_group_by">stage_id</attribute> |
| 495 |
</xpath> |
| 496 |
</field> |
| 497 |
</record> |
| 498 |
|
| 499 |
<record id="view_project_config_kanban" model="ir.ui.view"> |
| 500 |
<field name="name">project.kanban.inherit.config.project</field> |
| 501 |
<field name="model">project.project</field> |
| 502 |
<field name="mode">primary</field> |
| 503 |
<field name="inherit_id" ref="view_project_kanban"/> |
| 504 |
<field name="arch" type="xml"> |
| 505 |
<xpath expr="//kanban" position="attributes"> |
| 506 |
<attribute name="action"></attribute> |
| 507 |
</xpath> |
| 508 |
</field> |
| 509 |
</record> |
| 510 |
|
| 511 |
<record id="view_project_config_kanban_group_stage" model="ir.ui.view"> |
| 512 |
<field name="name">project.kanban.inherit.config.project.group.stage</field> |
| 513 |
<field name="model">project.project</field> |
| 514 |
<field name="mode">primary</field> |
| 515 |
<field name="inherit_id" ref="view_project_config_kanban"/> |
| 516 |
<field name="arch" type="xml"> |
| 517 |
<xpath expr="//kanban" position="attributes"> |
| 518 |
<attribute name="default_group_by">stage_id</attribute> |
| 519 |
</xpath> |
| 520 |
</field> |
| 521 |
</record> |
| 522 |
|
| 523 |
<record id="view_project_calendar" model="ir.ui.view"> |
| 524 |
<field name="name">project.project.calendar</field> |
| 525 |
<field name="model">project.project</field> |
| 526 |
<field name="arch" type="xml"> |
| 527 |
<calendar |
| 528 |
date_start="date_start" |
| 529 |
date_stop="date" |
| 530 |
string="Projects" |
| 531 |
mode="month" |
| 532 |
scales="month,year" |
| 533 |
event_open_popup="true" |
| 534 |
quick_create="0" |
| 535 |
color="stage_id_color" |
| 536 |
js_class="project_project_calendar"> |
| 537 |
<field name="partner_id" invisible="not partner_id"/> |
| 538 |
<field name="user_id" widget="many2one_avatar_user" invisible="not user_id"/> |
| 539 |
<field name="is_favorite" widget="project_is_favorite" nolabel="1" string="Favorite"/> |
| 540 |
<field name="stage_id_color" invisible="1"/> |
| 541 |
<field name="stage_id" groups="project.group_project_stages" invisible="not stage_id"/> |
| 542 |
<field name="last_update_color" invisible="1"/> |
| 543 |
<field name="last_update_status" string="Status" widget="status_with_color" invisible="last_update_status == 'to_define'"/> |
| 544 |
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" invisible="not tag_ids"/> |
| 545 |
</calendar> |
| 546 |
</field> |
| 547 |
</record> |
| 548 |
|
| 549 |
<!-- Please update both act_window when modifying one (open_view_project_all or open_view_project_all_group_stage) as one or the other is used in the menu menu_project --> |
| 550 |
<record id="open_view_project_all" model="ir.actions.act_window"> |
| 551 |
<field name="name">Projects</field> |
| 552 |
<field name="path">project</field> |
| 553 |
<field name="res_model">project.project</field> |
| 554 |
<field name="domain">[("is_template", "=", False)]</field> |
| 555 |
<field name="context">{'display_milestone_deadline': True}</field> |
| 556 |
<field name="view_mode">kanban,list,form</field> |
| 557 |
<field name="view_id" ref="view_project_kanban"/> |
| 558 |
<field name="search_view_id" ref="view_project_project_filter"/> |
| 559 |
<field name="help" type="html"> |
| 560 |
<p class="o_view_nocontent_smiling_face"> |
| 561 |
No projects found. Let's create one! |
| 562 |
</p> |
| 563 |
<p> |
| 564 |
Create projects to organize your tasks. Define a different workflow for each project. |
| 565 |
</p> |
| 566 |
</field> |
| 567 |
</record> |
| 568 |
|
| 569 |
<!-- Please update both act_window when modifying one (open_view_project_all or open_view_project_all_group_stage) as one or the other is used in the menu menu_project --> |
| 570 |
<record id="open_view_project_all_group_stage" model="ir.actions.act_window"> |
| 571 |
<field name="name">Projects</field> |
| 572 |
<field name="res_model">project.project</field> |
| 573 |
<field name="context">{'display_milestone_deadline': True}</field> |
| 574 |
<field name="domain">[("is_template", "=", False)]</field> |
| 575 |
<field name="view_mode">kanban,list,form,calendar,activity</field> |
| 576 |
<field name="view_id" ref="view_project_kanban"/> |
| 577 |
<field name="search_view_id" ref="view_project_project_filter"/> |
| 578 |
<field name="target">main</field> |
| 579 |
<field name="help" type="html"> |
| 580 |
<p class="o_view_nocontent_smiling_face"> |
| 581 |
No projects found. Let's create one! |
| 582 |
</p> |
| 583 |
<p> |
| 584 |
Projects contain tasks on the same topic, and each has its own dashboard. |
| 585 |
</p> |
| 586 |
</field> |
| 587 |
</record> |
| 588 |
|
| 589 |
<record id="open_view_project_all_group_stage_kanban_view" model="ir.actions.act_window.view"> |
| 590 |
<field name="sequence" eval="10"/> |
| 591 |
<field name="view_mode">kanban</field> |
| 592 |
<field name="act_window_id" ref="open_view_project_all_group_stage"/> |
| 593 |
<field name="view_id" ref="project_kanban_view_group_stage"/> |
| 594 |
</record> |
| 595 |
<record id="open_view_project_all_group_stage_tree_view" model="ir.actions.act_window.view"> |
| 596 |
<field name="sequence" eval="20"/> |
| 597 |
<field name="view_mode">list</field> |
| 598 |
<field name="act_window_id" ref="open_view_project_all_group_stage"/> |
| 599 |
<field name="view_id" ref="project_list_view_group_stage"/> |
| 600 |
</record> |
| 601 |
|
| 602 |
<!-- Please update both act_window when modifying one (open_view_project_all_config or open_view_project_all_config_group_stage) as one or the other is used in the menu menu_project_config --> |
| 603 |
<record id="open_view_project_all_config" model="ir.actions.act_window"> |
| 604 |
<field name="name">Projects</field> |
| 605 |
<field name="res_model">project.project</field> |
| 606 |
<field name="path">project-configuration</field> |
| 607 |
<field name="domain">[('is_template', '=', False)]</field> |
| 608 |
<field name="view_mode">list,kanban,form</field> |
| 609 |
<field name="view_ids" eval="[(5, 0, 0), |
| 610 |
(0, 0, {'view_mode': 'list', 'view_id': ref('view_project_config')}), |
| 611 |
(0, 0, {'view_mode': 'kanban', 'view_id': ref('view_project_config_kanban')})]"/> |
| 612 |
<field name="search_view_id" ref="view_project_project_filter"/> |
| 613 |
<field name="context">{'display_milestone_deadline': True}</field> |
| 614 |
<field name="help" type="html"> |
| 615 |
<p class="o_view_nocontent_smiling_face"> |
| 616 |
No projects found. Let's create one! |
| 617 |
</p> |
| 618 |
<p> |
| 619 |
Create projects to organize your tasks and define a different workflow for each project. |
| 620 |
</p> |
| 621 |
</field> |
| 622 |
</record> |
| 623 |
|
| 624 |
<!-- Please update both act_window when modifying one (open_view_project_all_config or open_view_project_all_config_group_stage) as one or the other is used in the menu menu_project_config --> |
| 625 |
<record id="open_view_project_all_config_group_stage" model="ir.actions.act_window"> |
| 626 |
<field name="name">Projects</field> |
| 627 |
<field name="res_model">project.project</field> |
| 628 |
<field name="domain">[('is_template', '=', False)]</field> |
| 629 |
<field name="view_mode">list,kanban,form,calendar,activity</field> |
| 630 |
<field name="search_view_id" ref="view_project_project_filter"/> |
| 631 |
<field name="context">{'display_milestone_deadline': True}</field> |
| 632 |
<field name="help" type="html"> |
| 633 |
<p class="o_view_nocontent_smiling_face"> |
| 634 |
No projects found. Let's create one! |
| 635 |
</p> |
| 636 |
<p> |
| 637 |
Projects contain tasks on the same topic, and each has its own dashboard. |
| 638 |
</p> |
| 639 |
</field> |
| 640 |
</record> |
| 641 |
|
| 642 |
<record id="open_view_project_all_config_group_stage_tree_action_view" model="ir.actions.act_window.view"> |
| 643 |
<field name="sequence" eval="10"/> |
| 644 |
<field name="view_mode">list</field> |
| 645 |
<field name="act_window_id" ref="project.open_view_project_all_config_group_stage"/> |
| 646 |
<field name="view_id" ref="view_project_config_group_stage"/> |
| 647 |
</record> |
| 648 |
<record id="open_view_project_all_config_group_stage_kanban_action_view" model="ir.actions.act_window.view"> |
| 649 |
<field name="sequence" eval="20"/> |
| 650 |
<field name="view_mode">kanban</field> |
| 651 |
<field name="act_window_id" ref="project.open_view_project_all_config_group_stage"/> |
| 652 |
<field name="view_id" ref="view_project_config_kanban_group_stage"/> |
| 653 |
</record> |
| 654 |
|
| 655 |
<record id="project_view_kanban_inherit_project" model="ir.ui.view"> |
| 656 |
<field name="name">project.kanban.inherit.project</field> |
| 657 |
<field name="model">project.project</field> |
| 658 |
<field name="inherit_id" ref="project.view_project_kanban"/> |
| 659 |
<field name="priority">200</field> |
| 660 |
<field name="arch" type="xml"> |
| 661 |
<xpath expr="/kanban" position="inside"> |
| 662 |
<field name="id"/> |
| 663 |
</xpath> |
| 664 |
<xpath expr="//div[@name='task_analysis']" position="before"> |
| 665 |
<div role="menuitem" groups="project.group_project_user"> |
| 666 |
<a name="project_update_all_action" type="object" t-attf-context="{'active_id': #{record.id.raw_value} }">Dashboard</a> |
| 667 |
</div> |
| 668 |
</xpath> |
| 669 |
</field> |
| 670 |
</record> |
| 671 |
|
| 672 |
<record id="project_templates_view_form" model="ir.ui.view"> |
| 673 |
<field name="name">project.project.template.form</field> |
| 674 |
<field name="model">project.project</field> |
| 675 |
<field name="inherit_id" ref="project.edit_project"/> |
| 676 |
<field name="mode">primary</field> |
| 677 |
<field name="arch" type="xml"> |
| 678 |
<form position="attributes"> |
| 679 |
<attribute name="js_class"></attribute> |
| 680 |
</form> |
| 681 |
</field> |
| 682 |
</record> |
| 683 |
|
| 684 |
<record id="project_templates_view_list" model="ir.ui.view"> |
| 685 |
<field name="name">project.project.template.list</field> |
| 686 |
<field name="model">project.project</field> |
| 687 |
<field name="inherit_id" ref="project.view_project"/> |
| 688 |
<field name="mode">primary</field> |
| 689 |
<field name="arch" type="xml"> |
| 690 |
<list position="attributes"> |
| 691 |
<attribute name="js_class"></attribute> |
| 692 |
<attribute name="default_order">sequence, is_favorite desc, name, id</attribute> |
| 693 |
</list> |
| 694 |
<field name="sequence" position="attributes"> |
| 695 |
<attribute name="column_invisible">False</attribute> |
| 696 |
<attribute name="widget">handle</attribute> |
| 697 |
</field> |
| 698 |
<field name="partner_id" position="replace"/> |
| 699 |
<field name="next_milestone_id" position="replace"/> |
| 700 |
<field name="milestone_progress" position="replace"/> |
| 701 |
</field> |
| 702 |
</record> |
| 703 |
|
| 704 |
<record id="project_templates_view_kanban" model="ir.ui.view"> |
| 705 |
<field name="name">project.project.template.kanban</field> |
| 706 |
<field name="model">project.project</field> |
| 707 |
<field name="inherit_id" ref="project.view_project_kanban"/> |
| 708 |
<field name="mode">primary</field> |
| 709 |
<field name="arch" type="xml"> |
| 710 |
<kanban position="attributes"> |
| 711 |
<attribute name="js_class"></attribute> |
| 712 |
</kanban> |
| 713 |
<span name="partner_name" position="replace"/> |
| 714 |
</field> |
| 715 |
</record> |
| 716 |
|
| 717 |
<record id="action_server_convert_project_to_template" model="ir.actions.server"> |
| 718 |
<field name="name">Convert to Template</field> |
| 719 |
<field name="model_id" ref="project.model_project_project"/> |
| 720 |
<field name="binding_model_id" ref="project.model_project_project"/> |
| 721 |
<field name="binding_view_types">form</field> |
| 722 |
<field name="group_ids" eval="[Command.link(ref('project.group_project_manager'))]"/> |
| 723 |
<field name="state">code</field> |
| 724 |
<field name="code"> |
| 725 |
action = record.action_toggle_project_template_mode() |
| 726 |
</field> |
| 727 |
</record> |
| 728 |
|
| 729 |
</odoo> |