diff options
| author | asa-odoo <asa@odoo.com> | 2020-07-16 13:07:48 +0000 |
|---|---|---|
| committer | Dharmraj Jhala <dja@odoo.com> | 2020-08-24 12:43:34 +0000 |
| commit | d2791395d4063e9080efe3a1dd577c28d27e24bb (patch) | |
| tree | 3bd82da1f6a2776328f6e03a3677ca6ca01467cf /addons/mail/static/src/models/thread/thread.js | |
| parent | 970335d4bb4cd470e488ce5cc6dff042e56c7cb8 (diff) | |
[FIX] calendar: allow creation of 'All day' events
Previously, creation of the 'All day' event was not possible in some
scenarios due to constraint error, even with proper configuration.
Scenario 1: (main spec of the task)
------------------------------------
- go to form view of calendar event
- create a new event
- enter future datetime in 'Starting at' field
- tick the 'All day' checkbox
- enter the end date which is greater than start date
- try to save the record
Scenario 2:
------------------------------------
- go to form view of calendar event
- create a new event
- enter future datetime in 'Starting at' field
- try to save the record
Scenario 3:
------------------------------------
- go to form view of calendar event
- create a new event
- enter any datetime in 'Starting at' field
- enter duration -1.00 hour
- tick the 'All day' checkbox
- enter the end date which is greater than start date
- try to save the record
In all above scenarios, user is not able to save the record even if
the there is no obvioius wrong configuration.
All of the above bugs are result of a recent refactoring[1]
where some redundant fields were removed.
The first two scenarios are result of 'stop' date not being computed
proerly based on 'start' in case the duration is set to '00:00'
(which is default duration) while the third one is due to lack of
proper check in the constraint after the fields used to validate
starting and ending dates were removed.
This commit fixes the issue by improving the compute method and by
ensuring proper validation in the constraint.
[1] - https://github.com/odoo/odoo/pull/42031/commits/6bafd7c677d016e82473f01bd0a3381ac3b24bbd
Task Id: 2299212
PR #54673
closes odoo/odoo#56404
X-original-commit: cc5d090c267bac892d2e8200f8e55de88c5a0af2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: D J <dja@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread/thread.js')
0 files changed, 0 insertions, 0 deletions
