From 1e706d30692845bbba34a45bc1ef3d065846f33a Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 2 May 2023 11:20:28 +0000 Subject: [PATCH] [IMP] web, *: milk adaptations *: hr_holidays, stock, sale, product, web, sale, purchase, stock, website, survey Adapt some custom control panels (mainly for custom reports) to the milk controlpanel. hr_holidays: Move the buttons to create a new time off or a new allocation to the "create button" slot and transform it into a dropdown (creating allocation requests is clearly a secondary action, not a primary one) stock: 3 lines does not fit, must be on 2 lines Part-of: odoo/odoo#116641 --- .../src/views/calendar/calendar_controller.js | 4 + .../views/calendar/calendar_controller.xml | 28 ++++--- .../src/views/calendar/calendar_view.js | 2 - .../mrp_bom_overview_control_panel.xml | 75 +++++++++---------- .../mrp_bom_overview_display_filter.xml | 2 +- .../mo_overview/mrp_mo_overview.xml | 12 +-- .../product_pricelist_report.xml | 24 +++--- addons/purchase/views/product_views.xml | 12 +-- addons/sale/views/product_views.xml | 12 +-- .../dashboard_action/dashboard_action.xml | 2 +- .../stock_reception_report_main.xml | 2 +- .../src/stock_forecasted/stock_forecasted.xml | 4 +- addons/stock/views/product_views.xml | 24 +++--- .../static/src/scss/survey_survey_views.scss | 3 + addons/survey/views/survey_survey_views.xml | 16 ++-- .../static/src/views/list/list_controller.xml | 2 +- .../actions/reports/report_action.xml | 2 +- .../src/components/fields/redirect_field.xml | 2 +- 18 files changed, 119 insertions(+), 109 deletions(-) diff --git a/addons/hr_holidays/static/src/views/calendar/calendar_controller.js b/addons/hr_holidays/static/src/views/calendar/calendar_controller.js index 3cd97792353..2ab051f7354 100644 --- a/addons/hr_holidays/static/src/views/calendar/calendar_controller.js +++ b/addons/hr_holidays/static/src/views/calendar/calendar_controller.js @@ -3,6 +3,7 @@ import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; import { CalendarController } from '@web/views/calendar/calendar_controller'; import { FormViewDialog } from '@web/views/view_dialogs/form_view_dialog'; +import { Dropdown, DropdownItem } from "@web/core/dropdown/dropdown"; import { serializeDate } from "@web/core/l10n/dates"; @@ -113,5 +114,8 @@ export class TimeOffCalendarController extends CalendarController { } TimeOffCalendarController.components = { ...TimeOffCalendarController.components, + Dropdown, + DropdownItem, FilterPanel: TimeOffCalendarFilterPanel, } +TimeOffCalendarController.template = "hr_holidays.CalendarController" \ No newline at end of file diff --git a/addons/hr_holidays/static/src/views/calendar/calendar_controller.xml b/addons/hr_holidays/static/src/views/calendar/calendar_controller.xml index 300f34702cf..307458f8b4e 100644 --- a/addons/hr_holidays/static/src/views/calendar/calendar_controller.xml +++ b/addons/hr_holidays/static/src/views/calendar/calendar_controller.xml @@ -1,17 +1,23 @@ - - - - - - + + + + +
+ + + + +
+
+
-
+ \ No newline at end of file diff --git a/addons/hr_holidays/static/src/views/calendar/calendar_view.js b/addons/hr_holidays/static/src/views/calendar/calendar_view.js index 6439c10280a..f85bdfbcc5a 100644 --- a/addons/hr_holidays/static/src/views/calendar/calendar_view.js +++ b/addons/hr_holidays/static/src/views/calendar/calendar_view.js @@ -14,8 +14,6 @@ const TimeOffCalendarView = { Controller: TimeOffCalendarController, Renderer: TimeOffCalendarRenderer, Model: TimeOffCalendarModel, - - buttonTemplate: "hr_holidays.CalendarController.controlButtons", } registry.category('views').add('time_off_calendar', TimeOffCalendarView); diff --git a/addons/mrp/static/src/components/bom_overview_control_panel/mrp_bom_overview_control_panel.xml b/addons/mrp/static/src/components/bom_overview_control_panel/mrp_bom_overview_control_panel.xml index 4db09eb6453..162f84d8a9d 100644 --- a/addons/mrp/static/src/components/bom_overview_control_panel/mrp_bom_overview_control_panel.xml +++ b/addons/mrp/static/src/components/bom_overview_control_panel/mrp_bom_overview_control_panel.xml @@ -3,7 +3,7 @@ - +
@@ -15,47 +15,44 @@
- -
-
-
- -
- -
-
- -
+ +
+ + +
+
Quantity
+ +
Quantity
-
- -
- -
+ + +
+
Variant
+
-
- - - - -
- - - - Warehouse: - - - - - - + +
+
+ + + + Warehouse: + + + + + + + +
+
diff --git a/addons/mrp/static/src/components/bom_overview_display_filter/mrp_bom_overview_display_filter.xml b/addons/mrp/static/src/components/bom_overview_display_filter/mrp_bom_overview_display_filter.xml index 0adf1c31b0c..5484467d85d 100644 --- a/addons/mrp/static/src/components/bom_overview_display_filter/mrp_bom_overview_display_filter.xml +++ b/addons/mrp/static/src/components/bom_overview_display_filter/mrp_bom_overview_display_filter.xml @@ -5,7 +5,7 @@ - Display: + Display: diff --git a/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.xml b/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.xml index ec2070caef4..d6282088f57 100644 --- a/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.xml +++ b/addons/mrp/static/src/components/mo_overview/mrp_mo_overview.xml @@ -2,14 +2,16 @@
- - + + - - - + +
+ + +
diff --git a/addons/product/static/src/js/pricelist_report/product_pricelist_report.xml b/addons/product/static/src/js/pricelist_report/product_pricelist_report.xml index c7d76191cfb..69ba59d5993 100644 --- a/addons/product/static/src/js/pricelist_report/product_pricelist_report.xml +++ b/addons/product/static/src/js/pricelist_report/product_pricelist_report.xml @@ -5,16 +5,16 @@
- + - -
-
-
- -
- @@ -25,20 +25,20 @@ -
-
+
- +
- Quantities: + Quantities
- - - + + + Purchased
@@ -111,9 +111,9 @@ groups="purchase.group_purchase_user" type="object" icon="fa-credit-card" attrs="{'invisible': [('purchase_ok', '=', False)]}" help="Purchased in the last 365 days">
- - - + + + Purchased
diff --git a/addons/sale/views/product_views.xml b/addons/sale/views/product_views.xml index 8572622b0f5..05ca54c1f94 100644 --- a/addons/sale/views/product_views.xml +++ b/addons/sale/views/product_views.xml @@ -49,9 +49,9 @@ groups="sales_team.group_sale_salesman" attrs="{'invisible': [('sale_ok', '=', False)]}">
- - - + + + Sold
@@ -82,9 +82,9 @@ groups="sales_team.group_sale_salesman" attrs="{'invisible': [('sale_ok', '=', False)]}">
- - - + + + Sold
diff --git a/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.xml b/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.xml index 1bc9c12af4b..3b1a729ef1b 100644 --- a/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.xml +++ b/addons/spreadsheet_dashboard/static/src/bundle/dashboard_action/dashboard_action.xml @@ -2,7 +2,7 @@
- + - +