summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2017-06-07 11:24:44 +0200
committerNicolas Martinelli <nim@odoo.com>2017-06-07 16:10:01 +0200
commit506ac455376d605bc360764ae958835b3da195e9 (patch)
tree48409f0650855730a48cbe702139a87fa2241ad7 /addons/web/static/src/xml/base.xml
parent2332df6bc7380e742e7d3dfb945124e21078087d (diff)
[FIX] resource: get working hours
- Use the demo resource calendar (40h/week) - Create a project forecast for the Administrator - Set the 'Start date' and 'End date' to 2017-07-07 - Plan 8 hours The % of time should be 100 %, but it's not always the case. The core of the issue comes from `get_working_hours`. Case 1: Call with start_dt = end_dt = 2017-07-07 00:00:00 `get_working_hours_of_date` is called twice with the following start/end dt: - 2017-06-07 00:00:00, 2017-06-07 00:00:00 => 0 hours - 2017-06-08 00:00:00, 2017-06-08 23:59:59.999999 => 8 hours This is obviously not correct, we don't care about what happens on 2017-06-08. The number of hours is correct in total, but it comes from the wrong day. Case 2: Call with start_dt = 2017-07-07 00:00:00 and end_dt = 2017-07-07 23:59:59 `get_working_hours_of_date` is called twice with the following start/end dt: - 2017-06-07 00:00:00, 2017-06-07 23:59:59.999999 => 8 hours - 2017-06-08 00:00:00, 2017-06-08 23:59:59.999999 => 8 hours This is obviously not correct either... We change how the `until` parameter is computed. This way, the correct call is the second call (Case 2), and `get_working_hours_of_date` is calld once with the following start/end dt: - 2017-06-07 00:00:00, 2017-06-07 23:59:59.999999 => 8 hours opw-745253
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions