New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MERGE] hr_timesheet: clean durations expressed in hours if encoding unit is in days #46184
Merged
robodoo
merged 4 commits into
odoo:master
from
odoo-dev:master-timesheets-clean-day-duration-pta
Aug 3, 2020
Merged
[MERGE] hr_timesheet: clean durations expressed in hours if encoding unit is in days #46184
robodoo
merged 4 commits into
odoo:master
from
odoo-dev:master-timesheets-clean-day-duration-pta
Aug 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
February 25, 2020 10:19
b04b398
to
130f21b
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Feb 25, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
February 27, 2020 07:52
163483b
to
3e7e092
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Feb 27, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
February 27, 2020 12:26
57f278e
to
70d31d1
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Feb 27, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
February 28, 2020 10:20
cab5fe5
to
a6f0dae
Compare
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
February 28, 2020 12:47
a6f0dae
to
7271c2c
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Feb 28, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
March 16, 2020 07:50
f607eb0
to
02c7915
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Mar 16, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
March 26, 2020 07:26
02c7915
to
133e587
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Mar 26, 2020
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Jul 3, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
July 9, 2020 08:45
cb1fdf6
to
6a05566
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Jul 9, 2020
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
July 9, 2020 09:11
6a05566
to
ee26ef8
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Jul 9, 2020
jbm-odoo
reviewed
Jul 15, 2020
if is_uom_day: | ||
# convert all times from hours to days | ||
for time_type in ['non_billable_project', 'non_billable', 'billable_time', 'billable_fixed', 'canceled', 'total']: | ||
if repartition_employee[employee_id][time_type] != 0.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if repartition_employee[employee_id][time_type] != 0.0: | |
if repartition_employee[employee_id][time_type]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
July 16, 2020 07:01
ee26ef8
to
74406b6
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Jul 16, 2020
…gs of Timesheets if encoding unit is Days [IMP] hr_timesheet: hide the "Timesheet Timer" feature in the project form if encoding unit is not Hours [IMP] hr_timesheet: clean display of Days for timesheets A computed field has to be added to retrieve the encoding uom of the current company and be used in the views. FieldTimesheetFactor field has to be registered to "float_factor" widget for the "planned_hours" field to work correctly with Days (for the conversion from hours to days to be computed and to be able to set a greater value than 1 day) If encoding unit for timesheets is set to Days: - Display Days instead of Hours in Portal > Timesheets - Display Days instead of Hours in Portal > Tasks - Display Days instead of Hours in Portal > Invoices & Bills - Display Days instead of Hours in Portal > Tickets [IMP] hr_timesheet: display clean duration in Timesheet Entries Display Days instead of Hours in Timesheet Entries (print action) if encoding unit for timesheets is set to Days [IMP] hr_timesheet: correctly display timesheets in Days if configured to - correctly display remaining days in project.task kanban and list view - hide timer start button if timesheet is configured in Days - update several column names [IMP] hr_timesheet: clean code [IMP] hr_timesheet: small improvements when displaying timesheets in days - Rename some labels - Fixes style - Prevent fields displayed with widget "timesheet_uom" to change when timer is on - Display correctly "Initially Planned Days" field in task creation form
Display Days instead of Hours in "HR Timesheet/Attendance Report" if encoding unit for timesheets is set to Days
Display Days instead of Hours in project overview if encoding unit for timesheets is set to Days [IMP] sale_timesheet: update some labels in Project Overview [IMP] sale_timesheet: fix style in Project Overview [IMP] sale_timesheet: clean code [IMP] sale_timesheet: add some rounding in project overview
The field was hidden in UI when its value was not set or equal to 0. Display the field if its value is set to 0. [IMP] web: clean code
kitan191
force-pushed
the
master-timesheets-clean-day-duration-pta
branch
from
July 23, 2020 11:55
74406b6
to
cae4ac2
Compare
robodoo
added
CI 🤖
Robodoo has seen passing statuses
and removed
CI 🤖
Robodoo has seen passing statuses
labels
Jul 23, 2020
tivisse
changed the title
Master timesheets clean day duration pta
[MERGE] hr_timesheet: clean durations expressed in hours if encoding unit is in days
Aug 3, 2020
@robodoo r+ merge |
Merge method set to merge directly, using the PR as merge commit message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
There are several places where the duration is expressed in hours even though the encoding unit is in Days.
Specifications
The duration should be expressed in days instead of hours in the following places:
[x] Timesheet Entries
[x] Portal > Tickets
[x] Portal > Timesheets
[x] Portal > Tasks
[x] Portal > Sales Orders
[x] Project Overview
[x] Project task form view (in this case, the label of the field should be 'Planned Days')
[x] Timesheets > HR Timesheet/Attendence Report
[x] Project > All Tasks
Hide the following elements if the encoding unit is in days:
[x] 'Timesheet Timer' feature on the project form view
[x] 'Timesheet Timer' feature on the Helpdesk team form view
[x] the 'Round timesheets' feature in the settings of Timesheets (except if the 'Awesome Timesheet' feature is enabled)
Bonus point:
[x] Timesheet form view: 0.00 Days should be displayed in read-only if the duration = 0
Some labels need to be adapted to explicit the unit of measure (is it carrots? potatoes?): e.g. Duration (Days) or Time Spent (Hours) :
[x] Timesheet entries report
[x] on the portal
[x] Project overview: add 'recorded' next to Hours/Days
[x] Project overview: add 'Days/hours Spent' above the total by employee
[x] task form view: make sure the 'sub-tasks days spent' button/label stays on one line
[x] hide the 'start' button on project tasks and helpdesk tickets if the encoding unit is in days
Task ID : 2152322