From 7da9c296eb84765faba1ac8721f85a5730173740 Mon Sep 17 00:00:00 2001 From: YOGRAJ TANDEL Date: Fri, 30 Oct 2020 10:13:09 +0000 Subject: [PATCH] [ADD] calendar,lunch,web: weekly recurrent widget with this commit we adding weekly recurrent widget, currently proeject and calendar shows boolean for each day vertically but with this widget we displays week days and its boolean horizontally. Here widget will display first day as per language's week_start field, also we adds FieldDependencies on custom widget and consider those FieldDependencies while processing view node in basic_view.js We add support of registry to contain owl custom widgets and add support of rendering owl custom widgets. Also with this commit we removes fields like sun, mon, tue etc. from view and instead use "web_weekly_recurrence" custom widget to display boolean for each week day. Co-authored-by: Mohammed Shekha --- addons/calendar/views/calendar_views.xml | 25 +-- addons/lunch/views/lunch_alert_views.xml | 16 +- addons/lunch/views/lunch_supplier_views.xml | 15 +- .../project/tests/test_project_recurrence.py | 32 ++-- addons/project/views/project_views.xml | 25 +-- addons/web/__manifest__.py | 1 + addons/web/static/src/js/widgets/week_days.js | 90 ++++++++++ addons/web/static/src/scss/form_view.scss | 22 +++ addons/web/static/src/xml/week_days.xml | 25 +++ .../static/tests/widgets/week_days_tests.js | 157 ++++++++++++++++++ addons/web/views/webclient_templates.xml | 2 + doc/reference/javascript_reference.rst | 9 + 12 files changed, 361 insertions(+), 58 deletions(-) create mode 100644 addons/web/static/src/js/widgets/week_days.js create mode 100644 addons/web/static/src/xml/week_days.xml create mode 100644 addons/web/static/tests/widgets/week_days_tests.js diff --git a/addons/calendar/views/calendar_views.xml b/addons/calendar/views/calendar_views.xml index d02418f5f37..9b1fff5b28e 100644 --- a/addons/calendar/views/calendar_views.xml +++ b/addons/calendar/views/calendar_views.xml @@ -168,9 +168,12 @@