Commit Graph
11 Commits
Author SHA1 Message Date
Thibault Francois 7f83e0286e [FIX] timer, hr_timesheet: Fix _compute_display_timer_buttons
mixin method should not return in the middle of the loop
Use the value updated on the record instead

super() is called with self at every iteration
which is not very efficient and can be wrong

Solution call super for each specific record
and only when needed

write is not a good practice in compute method

X-original-commit: 7e19ed98d18305370b5c14edd3d310cfea5df714
2020-06-15 15:51:20 +02:00
jbm-odoo d6a23144d5 [MOV] timer: Move to Enterprise
taskId: 2217930
2020-06-15 15:51:20 +02:00
jbm-odoo e7dda3fab0 [IMP] project_timesheet: Add internal project by default to ease onboarding
taskId: 2217930
2020-06-15 15:50:19 +02:00
Thibault Francois ab48798229 [FIX] timer, hr_timesheet: Fix _compute_display_timer_buttons
mixin method should not return in the middle of the loop
Use the value updated on the record instead

super() is called with self at every iteration
which is not very efficient and can be wrong

Solution call super for each specific record
and only when needed

write is not a good practice in compute method

closes odoo/odoo#52858

X-original-commit: 7e19ed98d18305370b5c14edd3d310cfea5df714
Related: odoo/enterprise#11100
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-11 14:00:06 +00:00
Yannick Tivisse 45f3659305 [IMP] project,...: Improve list views with new widgets
Purpose
=======

Task 2195254 introduced many wonderful widgets to pimp the list view.
This task aims at implemeting them into the Services apps: project,
timesheets, helpdesk, expense, planning and field service.

Remaining days: https://drive.google.com/file/d/1o4Wn47445GxLqBkw-ifH9MgtFU_437xz/view
Avatar: https://drive.google.com/file/d/1yDwJWP0MZCUKZbqCa8hte1ziVTYRMMtb/view
Activities: https://drive.google.com/file/d/1e_rXH50eZq4zY2HOzw7_pfgiD39SoRIl/view
Field-specific decorations: https://drive.google.com/file/d/1WFnqJ-jkyDFftRHxWW4bgomoWrOpOuaY/view
More control on buttons

Specifications
==============

You will find below a list of which widgets to apply to which fields by
model. Some changes have to be done in the form/kanban views as well.

1) project.task

remaining days -> date_deadline -> list + kanban + form views
hide this field if is_closed is true
avatar -> user_id -> list view
activities -> 'next activity' field to be added -> list view
field-specific decorations
https://nimb.ws/ACewrY remove the current orange/red decorations we have
if planned_hours > 0, display the remaining_hours field in (list view):
red if progress is > 100%
orange if progress is between 80% and 100%
green if progress is <80%
display unit_amount in red if > 24:00 -> form view

2) rating.rating

display the rating in:
green = satisfied
orange = not_satisfied
red = highly_dissatisfied
list + form views

3) project.project

avatar -> user_id -> list + form views

4) account.analytic.line

avatar -> employee_id -> list view
display unit_amount in red if > 24:00 -> list + kanban + form view
https://nimb.ws/eIWa7E merge the timer and duration fields together

5) helpdesk.ticket

avatar
user_id -> list view
employee_id under timesheet_ids -> form view
remaining hours -> sla_deadline
activities -> 'next activity' field to be added -> list view
field specific decoration -> display unit_amount in red if > 24:00 -> form view

6) hr.expense

avatar -> employee_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
reported = green
approved = green
done = green
refused = red
combine the unit_amount and the currency_id fields (see the total_amount field for reference) -> list view (idem for the expense_line_ids one2many on hr.expense.sheet)
display the total_amount in bold
move 'company_id' before 'amount'

7) hr.expense.sheet

avatar
employee_id -> list view
user_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
submit = green
approve = green
post = green
done = green
cancel = red
display the total_amount in bold
move 'company_id' before 'amount'

8) planning.slot

avatar -> employee_id -> list view
decoration
display the allocated_percentage field in red if > 100% -> list + form view
display the forecast_hours field in red if > planned hours and if planned_hours > 0 -> form view
display the effective_hours field in red if > forecast_hours and if forecast_hours > 0 -> form view

9) misc

calendar.event -> avatar -> user_id -> form view
mail.activity.type -> combine the delay_count and delay_unit fields together -> list view
note.note -> 'next activity' field to be added -> list view
crm.lead.mining.request
combine the lead_number and lead_type fields together -> list view
display the name in bold
badge -> state
draft = blue
done = green
error = red
planning.slot.template -> display the duration field in red if it is = 0

closes odoo/odoo#51271

Taskid: 2248351
Related: odoo/enterprise#10605
Related: odoo/upgrade#1252
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 12:44:14 +00:00
Nisha patel 6bfc5bd817 [FIX] hr_timesheet, timer: Fix traceback in kanban view when using the timer
Currently, when the unit amount of line is zero and the timer time
spent on entry is less than one minutes then entries are unlinked
once the timer is stopped and due to that the entry disappear from the
kanban view and traceback is generated.

After this commit, we fix the issue by preventing the deletion of
entries by setting options 'prevent_deletion' on widget so we should
no allow to delete the entry if the option is set on widget.

closes odoo/odoo#50395

Taskid: 2230155
Closes: #49128
X-original-commit: 64b9a9b4deaee5a8139b0afbe3f222a476a038f9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-29 13:29:31 +00:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Yannick Tivisse fd9b08c70f [FIX] timer: Fix wrong type for res_id field
Purpose
=======

Having a char field referring to an Integer could lead
to unwanted behavior if not managed correctly.

closes odoo/odoo#45393

X-original-commit: d73a86fd682495c034dfde678442f37689ecb759
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-14 12:27:01 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
Okan SUMER (osu) e2b749fb7a [ADD] timer: New mixin to record time on models
Purpose
=======

The timer mechanism is already existing on timesheet.

We would like to introduce it on helpdesk.ticket too, and
probably on other models afterward.

On the other hand, only one timer can be launched on a single
timesheet currently, shared amongst the different users.

This commit introduced a new mixin on which
- Each user can launch a timer on each record of the models
  inheriting the mixin.
- Launching a new timer on a record pauses the timer of the
  user that could be already running.
- The mixin brings methods to start/stop/pause/resume the
  timer, that could be overridden to implement a specific
  behavior for the related model, for example create a
  timesheet entry.

TaskID: 2149450
2020-02-05 16:44:37 +01:00