diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-07-31 14:29:46 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-08-11 12:32:54 +0000 |
| commit | 1e11249c93a7cc6fc133c05103259177789c4d7e (patch) | |
| tree | 771368dd21a9e6b943925dcf6f062a71ad5bcab6 /addons/web/static/src/xml | |
| parent | 1fc33a63beb20d134081c93852e62f5fe0ff67d4 (diff) | |
[IMP] base,web: add scales param to calendar
This commit adds the parameter `scales` in the calendar view's template.
This parameter can be used to choose which mode(s) is/are allowed.
This commit also refactors the way we manage calendar scales.
Before scales were defined in model and renderer, now it's defined
in the view and given to model, controller and renderer by params.
Task: 2193921
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/web_calendar.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml index 95ea6927a91..c54329e663b 100644 --- a/addons/web/static/src/xml/web_calendar.xml +++ b/addons/web/static/src/xml/web_calendar.xml @@ -110,10 +110,10 @@ <t t-name="CalendarView.scale_buttons"> <div class="btn-group"> - <button type="button" class="o_calendar_button_day btn btn-secondary">Day</button> - <button type="button" class="o_calendar_button_week btn btn-secondary">Week</button> - <button type="button" class="o_calendar_button_month btn btn-secondary">Month</button> - <button type="button" class="o_calendar_button_year btn btn-secondary">Year</button> + <button type="button" t-if="scales.includes('day')" class="o_calendar_button_day btn btn-secondary">Day</button> + <button type="button" t-if="scales.includes('week')" class="o_calendar_button_week btn btn-secondary">Week</button> + <button type="button" t-if="scales.includes('month')" class="o_calendar_button_month btn btn-secondary">Month</button> + <button type="button" t-if="scales.includes('year')" class="o_calendar_button_year btn btn-secondary">Year</button> </div> </t> |
