summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2018-08-21 17:16:40 +0200
committerWilliam Henrotin <whe@odoo.com>2018-08-22 16:02:52 +0200
commit701d0f0e1ab708d26ce08d806d5f8fef200ff7ff (patch)
treeb37e00a43034d4f6a73f24588eeb930bd3993dfd /addons/web/static/src/js/fields/basic_fields.js
parent5fdee3ddbb8f3e69bcf1ecc8dec193975054acc5 (diff)
[FIX] resource: allow to plan 0 hours
The method `plan_hours` does nothing if the `hours` parameter is equal to 0. This commit adds the 0 case in the logic, and add an optional `resource` in the parameters. Example: A workorder works each days between 8am and 4pm. If we call `plan_hours(0)` at 9pm, we want to get 8am the next day. Currently, it sends back 9pm. Before this commit, a hack existed consisting to send a very small value to `plan_hours`. The holidays and non-working time were taken into account and the result was rounded to the second. We can now send explicitely 0 and the non-working hours will be skipped.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions