summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-09-03 12:57:53 +0200
committerThibault Delavallée <tde@odoo.com>2018-09-10 13:08:57 +0200
commit14491e8f9b23525f6d9017cfbc91366849a63389 (patch)
tree2466f4ac0427aaae4d97d2413840e218fbd93b59 /addons/web/static/src/js/views/basic/basic_controller.js
parentbd5b2c9466eabe56bbb1e91d29a7e422e957550f (diff)
[REF] hr_holidays: clean fields used to store and display duration
Purpose of this commit is to simplify fields used in leave and allocation used to store the duration of the requests. We want notably to get rid of "number of days temp" that, contrary to its name, is not temporary at all as it stores the real number of days. We also want to clarify the hours or days encoding that is different on leave and allocation models. Specifications * number_of_days on leave and allocation is the master field holding the leave or allocation duration in days; * two fields are used for interface that are suffixed by _display in order to indicate they are UX only: number_of_hours_display and number_of_days_ display. They are interface fields used for the user and correct number of days is computed and stored in number_of_days; * more specifically for leave model * display fields are readonly as it is computed based on dates given by the user, directly (from / to) or indirectly (half-day leaves for example); * duration field is computed through an onchange. It could be directly set by hand by managers if some confusion in the number of days appear; * more specifically for allocation model * display fields trigger an inverse as they are the real duration given by HR officers or managers; * duration field is computed through the inverse of display fields; Various reports, data and use of leave / allocation models are updated to use the correct field. This commit is linked to task ID 1876795 and PR #26571.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions