| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
<record id="hr_timesheet_line_tree" model="ir.ui.view"> |
| 5 |
<field name="name">account.analytic.line.list.hr_timesheet</field> |
| 6 |
<field name="model">account.analytic.line</field> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<list editable="top" string="Timesheet Activities" sample="1" decoration-muted="readonly_timesheet == True"> |
| 9 |
<field name="readonly_timesheet" column_invisible="True"/> |
| 10 |
<field name="date" readonly="readonly_timesheet"/> |
| 11 |
<field name="employee_id" column_invisible="True" readonly="readonly_timesheet"/> |
| 12 |
<field name="project_id" options="{'no_create_edit': True}" required="1" readonly="readonly_timesheet" |
| 13 |
context="{'search_default_my_projects': True}"/> |
| 14 |
<field name="task_id" optional="show" options="{'no_create_edit': True, 'no_open': True}" widget="task_with_hours" |
| 15 |
context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}" |
| 16 |
readonly="readonly_timesheet"/> |
| 17 |
<field name="name" optional="show" required="0" readonly="readonly_timesheet"/> |
| 18 |
<field name="unit_amount" string="Time Spent" optional="show" widget="timesheet_uom" sum="Total" readonly="readonly_timesheet" |
| 19 |
decoration-danger="unit_amount > 24 or unit_amount < 0" decoration-muted="unit_amount == 0"/> |
| 20 |
<field name="company_id" column_invisible="True"/> |
| 21 |
<field name="user_id" column_invisible="True"/> |
| 22 |
</list> |
| 23 |
</field> |
| 24 |
</record> |
| 25 |
|
| 26 |
<record id="hr_timesheet_line_portal_tree" model="ir.ui.view"> |
| 27 |
<field name="name">portal.hr_timesheet.account.analytic.line.list</field> |
| 28 |
<field name="model">account.analytic.line</field> |
| 29 |
<field name="inherit_id" ref="hr_timesheet_line_tree"/> |
| 30 |
<field name="mode">primary</field> |
| 31 |
<field name="priority">10</field> |
| 32 |
<field name="arch" type="xml"> |
| 33 |
<xpath expr="//list" position="attributes"> |
| 34 |
<attribute name="edit">0</attribute> |
| 35 |
<attribute name="create">0</attribute> |
| 36 |
<attribute name="delete">0</attribute> |
| 37 |
<attribute name="js_class"></attribute> |
| 38 |
</xpath> |
| 39 |
<xpath expr="//field[@name='task_id']" position="attributes"> |
| 40 |
<attribute name="options">{'no_create_edit': True, 'no_open': True}</attribute> |
| 41 |
</xpath> |
| 42 |
</field> |
| 43 |
</record> |
| 44 |
|
| 45 |
<record id="timesheet_view_tree_user" model="ir.ui.view"> |
| 46 |
<field name="name">account.analytic.line.view.list.with.user</field> |
| 47 |
<field name="model">account.analytic.line</field> |
| 48 |
<field name="inherit_id" ref="hr_timesheet_line_tree"/> |
| 49 |
<field name="mode">primary</field> |
| 50 |
<field name="priority">10</field> |
| 51 |
<field name="arch" type="xml"> |
| 52 |
<xpath expr="//field[@name='employee_id']" position="attributes"> |
| 53 |
<attribute name="column_invisible">0</attribute> |
| 54 |
<attribute name="required">1</attribute> |
| 55 |
<attribute name="widget">many2one_avatar_employee</attribute> |
| 56 |
<attribute name="context">{'active_test': True}</attribute> |
| 57 |
</xpath> |
| 58 |
</field> |
| 59 |
</record> |
| 60 |
|
| 61 |
<record id="view_hr_timesheet_line_pivot" model="ir.ui.view"> |
| 62 |
<field name="name">account.analytic.line.pivot</field> |
| 63 |
<field name="model">account.analytic.line</field> |
| 64 |
<field name="arch" type="xml"> |
| 65 |
<pivot string="Timesheets" sample="1"> |
| 66 |
<field name="employee_id" type="row"/> |
| 67 |
<field name="date" interval="month" type="col"/> |
| 68 |
<field name="unit_amount" string="Time Spent" type="measure" widget="timesheet_uom"/> |
| 69 |
<field name="amount" string="Timesheet Costs"/> |
| 70 |
</pivot> |
| 71 |
</field> |
| 72 |
</record> |
| 73 |
|
| 74 |
<record id="view_my_timesheet_line_pivot" model="ir.ui.view"> |
| 75 |
<field name="name">account.analytic.line.pivot</field> |
| 76 |
<field name="model">account.analytic.line</field> |
| 77 |
<field name="arch" type="xml"> |
| 78 |
<pivot string="Timesheet" sample="1"> |
| 79 |
<field name="date" interval="week" type="row"/> |
| 80 |
<field name="unit_amount" string="Time Spent" type="measure" widget="timesheet_uom"/> |
| 81 |
<field name="amount" string="Timesheet Costs"/> |
| 82 |
</pivot> |
| 83 |
</field> |
| 84 |
</record> |
| 85 |
|
| 86 |
<record id="view_hr_timesheet_line_graph" model="ir.ui.view"> |
| 87 |
<field name="name">account.analytic.line.graph</field> |
| 88 |
<field name="model">account.analytic.line</field> |
| 89 |
<field name="arch" type="xml"> |
| 90 |
<graph string="Timesheets" sample="1" js_class="hr_timesheet_graphview"> |
| 91 |
<field name="task_id"/> |
| 92 |
<field name="project_id"/> |
| 93 |
<field name="unit_amount" string="Time Spent" type="measure" widget="timesheet_uom"/> |
| 94 |
<field name="amount" string="Timesheet Costs"/> |
| 95 |
</graph> |
| 96 |
</field> |
| 97 |
</record> |
| 98 |
|
| 99 |
<!-- For My Timesheet view, groups by week then project --> |
| 100 |
<record id="view_hr_timesheet_line_graph_my" model="ir.ui.view"> |
| 101 |
<field name="name">account.analytic.line.graph</field> |
| 102 |
<field name="model">account.analytic.line</field> |
| 103 |
<field name="arch" type="xml"> |
| 104 |
<graph string="Timesheet" sample="1" js_class="hr_timesheet_graphview"> |
| 105 |
<field name="date" interval="week"/> |
| 106 |
<field name="project_id"/> |
| 107 |
<field name="amount" type="measure" string="Timesheet Costs"/> |
| 108 |
<field name="unit_amount" string="Time Spent" type="measure" widget="timesheet_uom"/> |
| 109 |
</graph> |
| 110 |
</field> |
| 111 |
</record> |
| 112 |
|
| 113 |
<!-- For Other Timesheet view, groups by employee then project --> |
| 114 |
<record id="view_hr_timesheet_line_graph_all" model="ir.ui.view"> |
| 115 |
<field name="name">account.analytic.line.graph</field> |
| 116 |
<field name="model">account.analytic.line</field> |
| 117 |
<field name="arch" type="xml"> |
| 118 |
<graph string="Timesheet" sample="1" js_class="hr_timesheet_graphview"> |
| 119 |
<field name="employee_id"/> |
| 120 |
<field name="project_id"/> |
| 121 |
<field name="amount" type="measure" string="Timesheet Costs"/> |
| 122 |
<field name="unit_amount" string="Time Spent" type="measure" widget="timesheet_uom"/> |
| 123 |
</graph> |
| 124 |
</field> |
| 125 |
</record> |
| 126 |
|
| 127 |
<!-- For a single project Timesheet view, group by month then task --> |
| 128 |
<record id="view_hr_timesheet_line_by_project" model="ir.ui.view"> |
| 129 |
<field name="name">account.analytic.line.graph.by.project</field> |
| 130 |
<field name="model">account.analytic.line</field> |
| 131 |
<field name="inherit_id" ref="hr_timesheet.view_hr_timesheet_line_graph_all"/> |
| 132 |
<field name="mode">primary</field> |
| 133 |
<field name="arch" type="xml"> |
| 134 |
<field name="project_id" position="replace"/> |
| 135 |
<field name="employee_id" position="before"> |
| 136 |
<field name="date" interval="month"/> |
| 137 |
<field name="task_id"/> |
| 138 |
</field> |
| 139 |
<field name="employee_id" position="attributes"> |
| 140 |
<attribute name="invisible">1</attribute> |
| 141 |
</field> |
| 142 |
</field> |
| 143 |
</record> |
| 144 |
|
| 145 |
<record id="view_hr_timesheet_line_graph_by_employee" model="ir.ui.view"> |
| 146 |
<field name="name">account.analytic.line.graph.by.employee</field> |
| 147 |
<field name="model">account.analytic.line</field> |
| 148 |
<field name="inherit_id" ref="hr_timesheet.view_hr_timesheet_line_graph_all"/> |
| 149 |
<field name="mode">primary</field> |
| 150 |
<field name="arch" type="xml"> |
| 151 |
<field name="project_id" position="replace"/> |
| 152 |
</field> |
| 153 |
</record> |
| 154 |
|
| 155 |
<record id="hr_timesheet_line_form" model="ir.ui.view"> |
| 156 |
<field name="name">account.analytic.line.form</field> |
| 157 |
<field name="model">account.analytic.line</field> |
| 158 |
<field name="priority">1</field> |
| 159 |
<field name="inherit_id" eval="False"/> |
| 160 |
<field name="arch" type="xml"> |
| 161 |
<form string="Analytic Entry"> |
| 162 |
<sheet string="Analytic Entry"> |
| 163 |
<group> |
| 164 |
<group> |
| 165 |
<field name="readonly_timesheet" invisible="1"/> |
| 166 |
<field name="project_id" options="{'no_create_edit': True}" |
| 167 |
context="{'search_default_my_projects': True}" |
| 168 |
required="1" |
| 169 |
readonly="readonly_timesheet"/> |
| 170 |
<field name="task_id" widget="task_with_hours" options="{'no_create_edit': True}" |
| 171 |
context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}" |
| 172 |
readonly="readonly_timesheet"/> |
| 173 |
<field name="company_id" groups="base.group_multi_company" invisible="1"/> |
| 174 |
</group> |
| 175 |
<group> |
| 176 |
<field name="date" readonly="readonly_timesheet"/> |
| 177 |
<field name="amount" invisible="1"/> |
| 178 |
<field name="unit_amount" string="Time Spent" widget="timesheet_uom" decoration-danger="unit_amount > 24" |
| 179 |
readonly="readonly_timesheet" decoration-muted="unit_amount == 0"/> |
| 180 |
<field name="currency_id" invisible="1"/> |
| 181 |
<field name="company_id" invisible="1"/> |
| 182 |
</group> |
| 183 |
</group> |
| 184 |
<field name="name" placeholder="Describe your activity" widget="text" nolabel="1" required="0" readonly="readonly_timesheet"/> |
| 185 |
</sheet> |
| 186 |
</form> |
| 187 |
</field> |
| 188 |
</record> |
| 189 |
|
| 190 |
<record id="timesheet_view_form_user" model="ir.ui.view"> |
| 191 |
<field name="name">account.analytic.line.list.with.user</field> |
| 192 |
<field name="model">account.analytic.line</field> |
| 193 |
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/> |
| 194 |
<field name="mode">primary</field> |
| 195 |
<field name="priority">10</field> |
| 196 |
<field name="arch" type="xml"> |
| 197 |
<xpath expr="//field[@name='date']" position="before"> |
| 198 |
<field name="employee_id" groups="hr_timesheet.group_hr_timesheet_approver" widget="many2one_avatar_employee" |
| 199 |
required="1" |
| 200 |
readonly="readonly_timesheet" context="{'active_test': True}"/> |
| 201 |
<field name="user_id" invisible="1" groups="hr_timesheet.group_hr_timesheet_approver"/> |
| 202 |
</xpath> |
| 203 |
</field> |
| 204 |
</record> |
| 205 |
|
| 206 |
<record id="hr_timesheet_line_search" model="ir.ui.view"> |
| 207 |
<field name="name">account.analytic.line.search</field> |
| 208 |
<field name="model">account.analytic.line</field> |
| 209 |
<field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/> |
| 210 |
<field name="arch" type="xml"> |
| 211 |
<xpath expr="//filter[@name='month']" position="before"> |
| 212 |
<filter name="mine" string="My Timesheets" domain="[('user_id', '=', uid)]"/> |
| 213 |
<separator/> |
| 214 |
</xpath> |
| 215 |
<filter name="month" position="inside"> |
| 216 |
<filter name="date_this_week" string="This Week" domain="[ |
| 217 |
('date', '>=', '=week_start'), |
| 218 |
('date', '<', '=week_start +1w'), |
| 219 |
]"/> |
| 220 |
<filter name="date_today" string="Today" domain="[('date', '>=', 'today'), ('date', '<', 'today +1d')]"/> |
| 221 |
<filter name="date_last_week" string="Last Week" domain="[ |
| 222 |
('date', '>=', '=week_start -1w'), |
| 223 |
('date', '<', '=week_start'), |
| 224 |
]"/> |
| 225 |
</filter> |
| 226 |
<xpath expr="//group[@name='groupby']" position="before"> |
| 227 |
<field name="employee_id"/> |
| 228 |
<field name="project_id"/> |
| 229 |
<field name="task_id"/> |
| 230 |
<field name="parent_task_id"/> |
| 231 |
<field name="department_id"/> |
| 232 |
<field name="manager_id"/> |
| 233 |
</xpath> |
| 234 |
<xpath expr="//group[@name='groupby']" position="inside"> |
| 235 |
<filter string="Project" name="groupby_project" domain="[]" context="{'group_by': 'project_id'}"/> |
| 236 |
<filter string="Parent Task" name="groupby_parent_task" domain="[]" context="{'group_by': 'parent_task_id'}"/> |
| 237 |
<filter string="Task" name="groupby_task" domain="[]" context="{'group_by': 'task_id'}"/> |
| 238 |
<filter string="Department" name="groupby_department" domain="[]" context="{'group_by': 'department_id'}"/> |
| 239 |
<filter string="Manager" name="groupby_manager" domain="[]" context="{'group_by': 'manager_id'}"/> |
| 240 |
<filter string="Employee" name="groupby_employee" domain="[]" context="{'group_by': 'employee_id'}"/> |
| 241 |
</xpath> |
| 242 |
</field> |
| 243 |
</record> |
| 244 |
|
| 245 |
<record id="timesheet_view_form_portal_user" model="ir.ui.view"> |
| 246 |
<field name="name">account.analytic.line.form</field> |
| 247 |
<field name="model">account.analytic.line</field> |
| 248 |
<field name="inherit_id" ref="hr_timesheet.timesheet_view_form_user"/> |
| 249 |
<field name="mode">primary</field> |
| 250 |
<field name="priority">10</field> |
| 251 |
<field name="arch" type="xml"> |
| 252 |
<xpath expr="//field[@name='employee_id']" position="attributes"> |
| 253 |
<attribute name="required">1</attribute> |
| 254 |
<attribute name="widget">many2one_avatar_employee</attribute> |
| 255 |
<attribute name="context">{'active_test': True}</attribute> |
| 256 |
<attribute name="options">{'no_open': True}</attribute> |
| 257 |
<attribute name="readonly">1</attribute> |
| 258 |
</xpath> |
| 259 |
<xpath expr="//field[@name='project_id']" position="attributes"> |
| 260 |
<attribute name="options">{'no_create_edit': True, 'no_open': True}</attribute> |
| 261 |
<attribute name="readonly">1</attribute> |
| 262 |
</xpath> |
| 263 |
<xpath expr="//field[@name='task_id']" position="attributes"> |
| 264 |
<attribute name="options">{'no_create_edit': True, 'no_open': True}</attribute> |
| 265 |
<attribute name="readonly">1</attribute> |
| 266 |
</xpath> |
| 267 |
</field> |
| 268 |
</record> |
| 269 |
|
| 270 |
<record id="hr_timesheet_line_my_timesheet_search" model="ir.ui.view"> |
| 271 |
<field name="name">view.search.my.timesheet.menu</field> |
| 272 |
<field name="model">account.analytic.line</field> |
| 273 |
<field name="inherit_id" ref="hr_timesheet_line_search"/> |
| 274 |
<field name="mode">primary</field> |
| 275 |
<field name="arch" type="xml"> |
| 276 |
<field name="employee_id" position="replace"/> |
| 277 |
<field name="department_id" position="replace"/> |
| 278 |
<field name="manager_id" position="replace"/> |
| 279 |
<filter name="mine" position="replace"/> |
| 280 |
<filter name="groupby_department" position="replace"/> |
| 281 |
<filter name="groupby_manager" position="replace"/> |
| 282 |
<filter name="groupby_employee" position="replace"/> |
| 283 |
</field> |
| 284 |
</record> |
| 285 |
|
| 286 |
<record id="view_kanban_account_analytic_line" model="ir.ui.view"> |
| 287 |
<field name="name">account.analytic.line.kanban</field> |
| 288 |
<field name="model">account.analytic.line</field> |
| 289 |
<field name="arch" type="xml"> |
| 290 |
<kanban class="o_kanban_mobile" sample="1"> |
| 291 |
<field name="company_id" invisible="1"/> |
| 292 |
<templates> |
| 293 |
<t t-name="card"> |
| 294 |
<div class="d-flex gap-1"> |
| 295 |
<span t-att-title="record.employee_id.value"> |
| 296 |
<field name="employee_id" widget="image" options="{'preview_image': 'avatar_128'}" class="o_image_64_cover me-2 float-start"/> |
| 297 |
</span> |
| 298 |
<div class="d-flex flex-column min-w-0 lh-sm"> |
| 299 |
<span class="text-truncate" invisible="context.get('default_project_id')" t-att-title="record.project_id.value"> |
| 300 |
<field name="project_id" class="p-0 fw-bold fs-5"/> |
| 301 |
</span> |
| 302 |
<span name="task_id_wrapper" class="text-truncate" t-att-title="record.task_id.value"> |
| 303 |
<field name="task_id" invisible="context.get('default_project_id')"/> |
| 304 |
<field name="task_id" invisible="not context.get('default_project_id')" class="p-0 fw-bold fs-5"/> |
| 305 |
</span> |
| 306 |
<span> |
| 307 |
<i class="fa fa-calendar me-1" role="img" aria-label="Date" title="Date"></i> |
| 308 |
<field name="date"/><span invisible="context.get('is_my_timesheets')"> - <field name="employee_id"/></span> |
| 309 |
</span> |
| 310 |
<span class="text-truncate" t-att-title="record.name.value"><field name="name" class="fst-italic"/></span> |
| 311 |
</div> |
| 312 |
</div> |
| 313 |
<footer class="mt-0 pt-0"> |
| 314 |
<div class="d-flex ms-auto"> |
| 315 |
<strong><field name="unit_amount" widget="timesheet_duration_uom" decoration-danger="unit_amount > 24" decoration-muted="unit_amount == 0" class="ms-1"/></strong> |
| 316 |
</div> |
| 317 |
</footer> |
| 318 |
</t> |
| 319 |
</templates> |
| 320 |
</kanban> |
| 321 |
</field> |
| 322 |
</record> |
| 323 |
|
| 324 |
<record id="view_calendar_account_analytic_line" model="ir.ui.view"> |
| 325 |
<field name="name">account.analytic.line.calendar</field> |
| 326 |
<field name="model">account.analytic.line</field> |
| 327 |
<field name="arch" type="xml"> |
| 328 |
<calendar |
| 329 |
scales="month" |
| 330 |
mode="month" |
| 331 |
date_start="date" |
| 332 |
color="employee_id" |
| 333 |
show_unusual_days="True" |
| 334 |
multi_create_view="hr_timesheet.view_calendar_account_analytic_line_multi_create" |
| 335 |
js_class="timesheet_calendar" |
| 336 |
create_name_field="calendar_display_name" |
| 337 |
form_view_id="%(hr_timesheet.hr_timesheet_line_form)d" |
| 338 |
> |
| 339 |
<field name="employee_id" avatar_field="avatar_128" widget="many2one_avatar_employee"/> |
| 340 |
<field name="project_id"/> |
| 341 |
<field name="task_id" invisible="not task_id"/> |
| 342 |
<field name="name"/> |
| 343 |
<field name="employee_id" avatar_field="avatar_128" filters="1" write_model="account.analytic.line.calendar.employee" write_field="employee_id" filter_field="checked"/> |
| 344 |
</calendar> |
| 345 |
</field> |
| 346 |
</record> |
| 347 |
|
| 348 |
<record id="view_calendar_account_analytic_line_multi_create" model="ir.ui.view"> |
| 349 |
<field name="name">account.analytic.line.calendar.multi_create</field> |
| 350 |
<field name="model">account.analytic.line</field> |
| 351 |
<field name="arch" type="xml"> |
| 352 |
<form> |
| 353 |
<group> |
| 354 |
<field name="project_id" options="{'no_create_edit': True}" |
| 355 |
context="{'search_default_my_projects': True}" required="1"/> |
| 356 |
<field name="task_id" widget="task_with_hours" |
| 357 |
context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}"/> |
| 358 |
<field name="unit_amount" string="Time Spent" widget="timesheet_uom" decoration-danger="unit_amount > 24" |
| 359 |
decoration-muted="unit_amount == 0"/> |
| 360 |
<field name="name" required="0" placeholder="e.g. Sending E-mails"/> |
| 361 |
</group> |
| 362 |
</form> |
| 363 |
</field> |
| 364 |
</record> |
| 365 |
|
| 366 |
<record id="view_calendar_account_analytic_line_my_timesheets" model="ir.ui.view"> |
| 367 |
<field name="name">account.analytic.line.calendar</field> |
| 368 |
<field name="model">account.analytic.line</field> |
| 369 |
<field name="inherit_id" ref="hr_timesheet.view_calendar_account_analytic_line"/> |
| 370 |
<field name="mode">primary</field> |
| 371 |
<field name="arch" type="xml"> |
| 372 |
<calendar position="attributes"> |
| 373 |
<attribute name="color">project_id</attribute> |
| 374 |
<attribute name="js_class">timesheet_calendar_my_timesheets</attribute> |
| 375 |
</calendar> |
| 376 |
<field name="employee_id" position="replace"/> |
| 377 |
<field name="employee_id" filters="1" position="replace"/> |
| 378 |
</field> |
| 379 |
</record> |
| 380 |
|
| 381 |
<record id="view_kanban_account_analytic_line_portal_user" model="ir.ui.view"> |
| 382 |
<field name="name">portal.account.analytic.line.kanban</field> |
| 383 |
<field name="model">account.analytic.line</field> |
| 384 |
<field name="inherit_id" ref="hr_timesheet.view_kanban_account_analytic_line"/> |
| 385 |
<field name="mode">primary</field> |
| 386 |
<field name="priority">10</field> |
| 387 |
<field name="arch" type="xml"> |
| 388 |
<xpath expr="//div/span" position="replace" class="ps-0"/> |
| 389 |
</field> |
| 390 |
</record> |
| 391 |
<!-- |
| 392 |
Actions |
| 393 |
--> |
| 394 |
<record id="act_hr_timesheet_line" model="ir.actions.act_window"> |
| 395 |
<field name="name">My Timesheets</field> |
| 396 |
<field name="path">timesheets</field> |
| 397 |
<field name="res_model">account.analytic.line</field> |
| 398 |
<field name="view_mode">list,form,kanban,pivot,graph</field> |
| 399 |
<field name="domain">[('project_id', '!=', False), ('user_id', '=', uid)]</field> |
| 400 |
<field name="context">{ |
| 401 |
"search_default_week":1, |
| 402 |
"is_timesheet": 1, |
| 403 |
"is_my_timesheets": 1, |
| 404 |
}</field> |
| 405 |
<field name="search_view_id" ref="hr_timesheet_line_my_timesheet_search"/> |
| 406 |
<field name="help" type="html"> |
| 407 |
<p class="o_view_nocontent_smiling_face"> |
| 408 |
No activities found. Let's start a new one! |
| 409 |
</p> |
| 410 |
<p> |
| 411 |
Track your working hours by projects every day and invoice this time to your customers. |
| 412 |
</p> |
| 413 |
</field> |
| 414 |
</record> |
| 415 |
|
| 416 |
<record id="act_hr_timesheet_line_view_tree" model="ir.actions.act_window.view"> |
| 417 |
<field name="view_mode">list</field> |
| 418 |
<field name="sequence" eval="4"/> |
| 419 |
<field name="view_id" ref="hr_timesheet_line_tree"/> |
| 420 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 421 |
</record> |
| 422 |
|
| 423 |
<record id="act_hr_timesheet_line_view_form" model="ir.actions.act_window.view"> |
| 424 |
<field name="view_mode">form</field> |
| 425 |
<field name="sequence" eval="5"/> |
| 426 |
<field name="view_id" ref="hr_timesheet_line_form"/> |
| 427 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 428 |
</record> |
| 429 |
|
| 430 |
<record id="act_hr_timesheet_line_view_calendar" model="ir.actions.act_window.view"> |
| 431 |
<field name="view_mode">calendar</field> |
| 432 |
<field name="sequence" eval="5"/> |
| 433 |
<field name="view_id" ref="view_calendar_account_analytic_line_my_timesheets"/> |
| 434 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 435 |
</record> |
| 436 |
|
| 437 |
<record id="act_hr_timesheet_line_view_kanban" model="ir.actions.act_window.view"> |
| 438 |
<field name="view_mode">kanban</field> |
| 439 |
<field name="sequence">6</field> |
| 440 |
<field name="view_id" ref="hr_timesheet.view_kanban_account_analytic_line"/> |
| 441 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 442 |
</record> |
| 443 |
|
| 444 |
<record id="act_hr_timesheet_line_view_pivot" model="ir.actions.act_window.view"> |
| 445 |
<field name="view_mode">pivot</field> |
| 446 |
<field name="sequence" eval="7"/> |
| 447 |
<field name="view_id" ref="view_my_timesheet_line_pivot"/> |
| 448 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 449 |
</record> |
| 450 |
|
| 451 |
<record id="act_hr_timesheet_line_view_graph" model="ir.actions.act_window.view"> |
| 452 |
<field name="view_mode">graph</field> |
| 453 |
<field name="sequence" eval="8"/> |
| 454 |
<field name="view_id" ref="view_hr_timesheet_line_graph_my"/> |
| 455 |
<field name="act_window_id" ref="act_hr_timesheet_line"/> |
| 456 |
</record> |
| 457 |
|
| 458 |
<record id="timesheet_action_task" model="ir.actions.act_window"> |
| 459 |
<field name="name">Task's Timesheets</field> |
| 460 |
<field name="res_model">account.analytic.line</field> |
| 461 |
<field name="context">{ |
| 462 |
'is_timesheet': 1, |
| 463 |
}</field> |
| 464 |
<field name="domain">[('task_id', 'in', active_ids)]</field> |
| 465 |
<field name="view_mode">list</field> |
| 466 |
<field name="view_id" ref="timesheet_view_tree_user"/> |
| 467 |
</record> |
| 468 |
|
| 469 |
<record id="timesheet_action_project" model="ir.actions.act_window"> |
| 470 |
<field name="name">Project's Timesheets</field> |
| 471 |
<field name="res_model">account.analytic.line</field> |
| 472 |
<field name="context">{ |
| 473 |
'is_timesheet': 1, |
| 474 |
}</field> |
| 475 |
<field name="domain">[('project_id', 'in', active_ids)]</field> |
| 476 |
<field name="view_mode">list</field> |
| 477 |
<field name="view_id" ref="timesheet_view_tree_user"/> |
| 478 |
</record> |
| 479 |
|
| 480 |
<record id="timesheet_action_all" model="ir.actions.act_window"> |
| 481 |
<field name="name">All Timesheets</field> |
| 482 |
<field name="res_model">account.analytic.line</field> |
| 483 |
<field name="path">all-timesheets</field> |
| 484 |
<field name="view_mode">list,form,kanban,pivot,graph</field> |
| 485 |
<field name="search_view_id" ref="hr_timesheet_line_search"/> |
| 486 |
<field name="domain">[('project_id', '!=', False)]</field> |
| 487 |
<field name="context">{ |
| 488 |
'search_default_week':1, |
| 489 |
'is_timesheet': 1, |
| 490 |
}</field> |
| 491 |
<field name="help" type="html"> |
| 492 |
<p class="o_view_nocontent_smiling_face"> |
| 493 |
No activities found. Let's start a new one! |
| 494 |
</p> |
| 495 |
<p> |
| 496 |
Track your working hours by projects every day and invoice this time to your customers. |
| 497 |
</p> |
| 498 |
</field> |
| 499 |
</record> |
| 500 |
|
| 501 |
<record id="timesheet_action_view_all_tree" model="ir.actions.act_window.view"> |
| 502 |
<field name="sequence" eval="4"/> |
| 503 |
<field name="view_mode">list</field> |
| 504 |
<field name="view_id" ref="timesheet_view_tree_user"/> |
| 505 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 506 |
</record> |
| 507 |
|
| 508 |
<record id="timesheet_action_view_all_form" model="ir.actions.act_window.view"> |
| 509 |
<field name="sequence" eval="5"/> |
| 510 |
<field name="view_mode">form</field> |
| 511 |
<field name="view_id" ref="timesheet_view_form_user"/> |
| 512 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 513 |
</record> |
| 514 |
|
| 515 |
<record id="timesheet_action_view_all_calendar" model="ir.actions.act_window.view"> |
| 516 |
<field name="sequence" eval="5"/> |
| 517 |
<field name="view_mode">calendar</field> |
| 518 |
<field name="view_id" ref="view_calendar_account_analytic_line"/> |
| 519 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 520 |
</record> |
| 521 |
|
| 522 |
<record id="timesheet_action_view_all_kanban" model="ir.actions.act_window.view"> |
| 523 |
<field name="view_mode">kanban</field> |
| 524 |
<field name="sequence">6</field> |
| 525 |
<field name="view_id" ref="hr_timesheet.view_kanban_account_analytic_line"/> |
| 526 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 527 |
</record> |
| 528 |
|
| 529 |
<record id="timesheet_action_view_all_pivot" model="ir.actions.act_window.view"> |
| 530 |
<field name="sequence" eval="7"/> |
| 531 |
<field name="view_mode">pivot</field> |
| 532 |
<field name="view_id" ref="view_hr_timesheet_line_pivot"/> |
| 533 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 534 |
</record> |
| 535 |
|
| 536 |
<record id="timesheet_action_view_all_graph" model="ir.actions.act_window.view"> |
| 537 |
<field name="sequence" eval="8"/> |
| 538 |
<field name="view_mode">graph</field> |
| 539 |
<field name="view_id" ref="view_hr_timesheet_line_graph_all"/> |
| 540 |
<field name="act_window_id" ref="timesheet_action_all"/> |
| 541 |
</record> |
| 542 |
|
| 543 |
<record id="timesheet_action_from_employee" model="ir.actions.act_window"> |
| 544 |
<field name="name">Timesheets</field> |
| 545 |
<field name="res_model">account.analytic.line</field> |
| 546 |
<field name="search_view_id" ref="hr_timesheet_line_search"/> |
| 547 |
<field name="domain">[('project_id', '!=', False), ('employee_id', '=', active_id)]</field> |
| 548 |
<field name="context">{ |
| 549 |
'default_employee_id': active_id, |
| 550 |
"is_timesheet": 1, |
| 551 |
}</field> |
| 552 |
<field name="help" type="html"> |
| 553 |
<p class="o_view_nocontent_smiling_face"> |
| 554 |
Record a new activity |
| 555 |
</p><p> |
| 556 |
You can register and track your workings hours by project every |
| 557 |
day. Every time spent on a project will become a cost and can be re-invoiced to |
| 558 |
customers if required. |
| 559 |
</p> |
| 560 |
</field> |
| 561 |
</record> |
| 562 |
|
| 563 |
<record id="act_hr_timesheet_line_by_project" model="ir.actions.act_window"> |
| 564 |
<field name="name">Timesheets</field> |
| 565 |
<field name="res_model">account.analytic.line</field> |
| 566 |
<field name="path">project-timesheets</field> |
| 567 |
<field name="view_mode">list,kanban,pivot,graph,form</field> |
| 568 |
<field name="view_id" ref="timesheet_view_tree_user"/> |
| 569 |
<field name="domain">[('project_id', '=', active_id)]</field> |
| 570 |
<field name="context">{ |
| 571 |
"default_project_id": active_id, |
| 572 |
"is_timesheet": 1, |
| 573 |
}</field> |
| 574 |
<field name="search_view_id" ref="hr_timesheet_line_search"/> |
| 575 |
<field name="help" type="html"> |
| 576 |
<p class="o_view_nocontent_smiling_face"> |
| 577 |
Record a new activity |
| 578 |
</p><p> |
| 579 |
Track your working hours by projects every day and invoice this time to your customers. |
| 580 |
</p> |
| 581 |
</field> |
| 582 |
</record> |
| 583 |
|
| 584 |
<record id="project_embedded_action_timesheets" model="ir.embedded.actions"> |
| 585 |
<field name="parent_res_model">project.project</field> |
| 586 |
<field name="sequence">20</field> |
| 587 |
<field name="parent_action_id" ref="project.act_project_project_2_project_task_all"/> |
| 588 |
<field name="action_id" eval="False"/> |
| 589 |
<field name="name">Timesheets</field> |
| 590 |
<field name="python_method">action_project_timesheets</field> |
| 591 |
<field name="domain">[('allow_timesheets', '=', True)]</field> |
| 592 |
<field name="context">{'from_embedded_action': true}</field> |
| 593 |
<field name="groups_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_user'))]" /> |
| 594 |
</record> |
| 595 |
|
| 596 |
<record id="project_embedded_action_timesheets_dashboard" model="ir.embedded.actions"> |
| 597 |
<field name="parent_res_model">project.project</field> |
| 598 |
<field name="sequence">30</field> |
| 599 |
<field name="parent_action_id" ref="project.project_update_all_action"/> |
| 600 |
<field name="action_id" eval="False"/> |
| 601 |
<field name="name">Timesheets</field> |
| 602 |
<field name="python_method">action_project_timesheets</field> |
| 603 |
<field name="domain">[('allow_timesheets', '=', True)]</field> |
| 604 |
<field name="context">{'from_embedded_action': true}</field> |
| 605 |
<field name="groups_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_user'))]" /> |
| 606 |
</record> |
| 607 |
|
| 608 |
<record id="act_hr_timesheet_line_by_project_view_tree" model="ir.actions.act_window.view"> |
| 609 |
<field name="view_mode">list</field> |
| 610 |
<field name="sequence" eval="1"/> |
| 611 |
<field name="view_id" ref="timesheet_view_tree_user"/> |
| 612 |
<field name="act_window_id" ref="act_hr_timesheet_line_by_project"/> |
| 613 |
</record> |
| 614 |
|
| 615 |
<record id="act_hr_timesheet_line_by_project_view_kanban" model="ir.actions.act_window.view"> |
| 616 |
<field name="view_mode">kanban</field> |
| 617 |
<field name="sequence" eval="2"/> |
| 618 |
<field name="view_id" ref="view_kanban_account_analytic_line"/> |
| 619 |
<field name="act_window_id" ref="act_hr_timesheet_line_by_project"/> |
| 620 |
</record> |
| 621 |
|
| 622 |
<record id="act_hr_timesheet_line_by_project_view_pivot" model="ir.actions.act_window.view"> |
| 623 |
<field name="view_mode">pivot</field> |
| 624 |
<field name="sequence" eval="3"/> |
| 625 |
<field name="view_id" ref="view_hr_timesheet_line_pivot"/> |
| 626 |
<field name="act_window_id" ref="act_hr_timesheet_line_by_project"/> |
| 627 |
</record> |
| 628 |
|
| 629 |
<record id="act_hr_timesheet_line_by_project_view_graph" model="ir.actions.act_window.view"> |
| 630 |
<field name="view_mode">graph</field> |
| 631 |
<field name="sequence" eval="4"/> |
| 632 |
<field name="view_id" ref="view_hr_timesheet_line_by_project"/> |
| 633 |
<field name="act_window_id" ref="act_hr_timesheet_line_by_project"/> |
| 634 |
</record> |
| 635 |
|
| 636 |
<record id="act_hr_timesheet_line_by_project_view_form" model="ir.actions.act_window.view"> |
| 637 |
<field name="view_mode">form</field> |
| 638 |
<field name="sequence" eval="10"/> |
| 639 |
<field name="view_id" ref="hr_timesheet_line_form"/> |
| 640 |
<field name="act_window_id" ref="act_hr_timesheet_line_by_project"/> |
| 641 |
</record> |
| 642 |
</data> |
| 643 |
</odoo> |