diff options
| author | Tiffany Chang (tic) <tic@odoo.com> | 2019-12-31 10:37:16 +0000 |
|---|---|---|
| committer | Tiffany Chang (tic) <tic@odoo.com> | 2020-01-03 10:34:54 +0000 |
| commit | 3e37ec8844ee66b3898f8799be1765d080e0bfb4 (patch) | |
| tree | f3ac3b71d4abc9f3914242a8a5b7e7fa5e5f346d /addons/web/static/src/js/views | |
| parent | ae7f574e5446a7bc6c939fc273225b41e2296bf7 (diff) | |
[IMP] web: add 'create' attribute to calendar view
Previously it was always possible to create within the calendar view.
For some modules this did not make sense and lead to confusing behavior,
for example: a new model instance created in the calendar view that was
not viewable in the calendar view, but was viewable in other views. By
adding a 'create' attribute (to be used in view xml), we allow users to
choose whether or not they want a calendar view to be able to create.
Note that this change does not affect the edit ability of calendar views
for existing instances.
Part of
Task: 2126530
Diffstat (limited to 'addons/web/static/src/js/views')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_view.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_view.js b/addons/web/static/src/js/views/calendar/calendar_view.js index b1a6ea7be13..9c9355145ee 100644 --- a/addons/web/static/src/js/views/calendar/calendar_view.js +++ b/addons/web/static/src/js/views/calendar/calendar_view.js @@ -146,7 +146,7 @@ var CalendarView = AbstractView.extend({ this.loadParams.fields = fields; this.loadParams.fieldsInfo = viewInfo.fieldsInfo; this.loadParams.editable = !fields[mapping.date_start].readonly; - this.loadParams.creatable = true; + this.loadParams.creatable = this.controllerParams.activeActions.create; this.loadParams.eventLimit = eventLimit; this.loadParams.fieldColor = attrs.color; |
