diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index b54e5e0afb3f7..0c05eccd3a8bb 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -282,7 +282,6 @@ def generate_views(action): # providing at least one view mode is a requirement, not an option view_modes = action['view_mode'].split(',') - # BLUE STINGRAY / METRIC WISE CUSTOM # make sure the view_description is instantiated view_description = action['view_description'] or False diff --git a/addons/web/static/src/legacy/js/chrome/abstract_action.js b/addons/web/static/src/legacy/js/chrome/abstract_action.js index fd539ac0e47ca..972c414b7afda 100644 --- a/addons/web/static/src/legacy/js/chrome/abstract_action.js +++ b/addons/web/static/src/legacy/js/chrome/abstract_action.js @@ -50,17 +50,6 @@ const AbstractAction = Widget.extend(ActionMixin, { */ withSearchBar: false, - /** - * BLUE STINGRAY / METRIC WISE CUSTOM - * A client action might want to see the view description displayed in its - * control panel, or it choose not to use it. - * - * It also only makes sense if hasControlPanel is set to true. - * - * @type boolean - */ - withViewDescription: false, - /** * This parameter can be set to customize the available sub menus in the * controlpanel (Filters/Group By/Favorites). This is basically a list of @@ -98,7 +87,6 @@ const AbstractAction = Widget.extend(ActionMixin, { this.extensions.ControlPanel = { actionId: action.id, withSearchBar: this.withSearchBar, - withViewDescription: this.withViewDescription, }; this.viewId = action.search_view_id && action.search_view_id[0]; @@ -108,7 +96,6 @@ const AbstractAction = Widget.extend(ActionMixin, { breadcrumbs: options && options.breadcrumbs, withSearchBar: this.withSearchBar, searchMenuTypes: this.searchMenuTypes, - withViewDescription: this.withViewDescription, }; } }, diff --git a/addons/web/static/src/legacy/js/chrome/action_mixin.js b/addons/web/static/src/legacy/js/chrome/action_mixin.js index 9a121d66a9d70..ba126b6cd90fe 100644 --- a/addons/web/static/src/legacy/js/chrome/action_mixin.js +++ b/addons/web/static/src/legacy/js/chrome/action_mixin.js @@ -66,7 +66,6 @@ odoo.define('web.ActionMixin', function (require) { _title: '', /** - * BLUE STINGRAY / METRIC WISE CUSTOM * String containing the view description of the client action * * @see _setViewDescription @@ -163,7 +162,6 @@ odoo.define('web.ActionMixin', function (require) { }, /** - * BLUE STINGRAY / METRIC WISE CUSTOM * Returns a view_description that may be displayed in center of the * control panel area. * diff --git a/addons/web/static/src/search/control_panel/control_panel.js b/addons/web/static/src/search/control_panel/control_panel.js index 3b35aae782ea9..90ae5d7b67cd3 100644 --- a/addons/web/static/src/search/control_panel/control_panel.js +++ b/addons/web/static/src/search/control_panel/control_panel.js @@ -39,8 +39,8 @@ export class ControlPanel extends Component { const originalSlots = {}; const transferredSlotNames = [ "control-panel-top-left", - "control-panel-top-right", "control-panel-top-center", + "control-panel-top-right", "control-panel-bottom-left", "control-panel-bottom-right", ]; @@ -67,15 +67,14 @@ export class ControlPanel extends Component { const display = Object.assign( { "top-left": true, - "top-center":true, + "top-center": true, "top-right": true, "bottom-left": true, "bottom-right": true, }, this.props.display || this.env.searchModel.display.controlPanel ); - display.top = display["top-left"] || display["top-center"] || - display["top-right"]; + display.top = display["top-left"] || display["top-center"] || display["top-right"]; display.bottom = display["bottom-left"] || display["bottom-right"]; return display; } diff --git a/addons/web/static/src/search/control_panel/control_panel.xml b/addons/web/static/src/search/control_panel/control_panel.xml index efef6446d3869..968d929b75dae 100644 --- a/addons/web/static/src/search/control_panel/control_panel.xml +++ b/addons/web/static/src/search/control_panel/control_panel.xml @@ -11,10 +11,8 @@
- - -

- + +

@@ -72,4 +70,5 @@ + diff --git a/addons/web/static/src/webclient/actions/action_service.js b/addons/web/static/src/webclient/actions/action_service.js index 8278fd3853539..775cb94b4882c 100644 --- a/addons/web/static/src/webclient/actions/action_service.js +++ b/addons/web/static/src/webclient/actions/action_service.js @@ -298,12 +298,6 @@ function makeActionManager(env) { const storedAction = browser.sessionStorage.getItem("current_action"); const lastAction = JSON.parse(storedAction || "{}"); if (lastAction.res_model === state.model) { - if (lastAction.context) { - // If this method is called because of a company switch, the - // stored allowed_company_ids is incorrect. - // (Fix will be improved in master) - delete lastAction.context.allowed_company_ids; - } actionRequest = lastAction; options.viewType = state.view_type; } diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index b69f0f33a19e8..7dfbed96dcabd 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -37,8 +37,7 @@ class IrActions(models.Model): ('report', 'Report')], required=True, default='action') binding_view_types = fields.Char(default='list,form') - # BLUE STINGRAY / METRIC WISE CUSTOM - view_description = fields.Char(string='View Description') + view_description = fields.Html(string='View Description') def _compute_xml_id(self): res = self.get_external_id() @@ -167,7 +166,8 @@ def _get_readable_fields(self): """ return { "binding_model_id", "binding_type", "binding_view_types", - "display_name", "help", "id", "name", "type", "xml_id", "view_description", + "display_name", "help", "id", "name", "type", "xml_id", + "view_description", } @@ -295,7 +295,8 @@ def _get_readable_fields(self): return super()._get_readable_fields() | { "context", "domain", "filter", "groups_id", "limit", "res_id", "res_model", "search_view", "search_view_id", "target", "view_id", - "view_description", "view_mode", "views", + "view_description", + "view_mode", "views", # `flags` is not a real field of ir.actions.act_window but is used # to give the parameters to generate the action "flags" diff --git a/odoo/addons/base/views/ir_actions_views.xml b/odoo/addons/base/views/ir_actions_views.xml index 0df875ee6c799..b8a02e6ed926d 100644 --- a/odoo/addons/base/views/ir_actions_views.xml +++ b/odoo/addons/base/views/ir_actions_views.xml @@ -421,7 +421,7 @@ env['res.partner'].create({'name': partner_name})