[MOV] web, *: move TagsList to core components
Since this component is imported and used in many places, it is more convenient to move this component a core component instead of a component made exclusively for the Many2ManyTagsField component. This change makes the usage of TagsList possible by SelectMenu, which would create issues as the fields folder should not be imported in other modules. Part-of: odoo/odoo#115799
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ import { _lt } from "@web/core/l10n/translation";
|
||||
import { AnalyticAutoComplete } from "../autocomplete/autocomplete";
|
||||
|
||||
import { standardFieldProps } from "@web/views/fields/standard_field_props";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { useOpenMany2XRecord } from "@web/views/fields/relational_utils";
|
||||
import { parseFloat as oParseFloat } from "@web/views/fields/parsers";
|
||||
import { formatPercentage } from "@web/views/fields/formatters";
|
||||
|
||||
@@ -166,7 +166,6 @@ For more specific needs, you may also assign custom-defined actions
|
||||
('remove', 'web/static/src/legacy/js/services/ajax_service.js'),
|
||||
'web/static/src/views/fields/formatters.js',
|
||||
'web/static/src/views/fields/file_handler.*',
|
||||
'web/static/src/views/fields/many2many_tags/tags_list.*',
|
||||
|
||||
'web/static/src/legacy/js/core/misc.js',
|
||||
'web/static/src/legacy/js/env.js',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* @odoo-module */
|
||||
|
||||
import { useStore } from "../core/messaging_hook";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { NavigableList } from "../composer/navigable_list";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { getActiveHotkey } from "@web/core/hotkeys/hotkey_service";
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import {
|
||||
Many2ManyTagsAvatarField,
|
||||
many2ManyTagsAvatarField,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Many2ManyTagsField,
|
||||
many2ManyTagsField,
|
||||
} from "@web/views/fields/many2many_tags/many2many_tags_field";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { onMounted, onWillUpdateProps } from "@odoo/owl";
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Domain } from "@web/core/domain";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { Many2XAutocomplete } from "@web/views/fields/relational_utils";
|
||||
|
||||
import { Component, onWillStart, onWillUpdateProps } from "@odoo/owl";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { shallowEqual } from "@web/core/utils/objects";
|
||||
import { useDebounced } from "@web/core/utils/timing";
|
||||
import { scrollTo } from "@web/core/utils/scrolling";
|
||||
import { fuzzyLookup } from "@web/core/utils/search";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
|
||||
export class SelectMenu extends Component {
|
||||
static template = "web.SelectMenu";
|
||||
|
||||
@@ -15,7 +15,7 @@ import { CalendarQuickCreate } from "./quick_create/calendar_quick_create";
|
||||
|
||||
import { Component, useState } from "@odoo/owl";
|
||||
|
||||
export const SCALE_LABELS = {
|
||||
const SCALE_LABELS = {
|
||||
day: _lt("Day"),
|
||||
week: _lt("Week"),
|
||||
month: _lt("Month"),
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from "@web/views/fields/relational_utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { TagsList } from "./tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { usePopover } from "@web/core/popover/popover_hook";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
many2ManyTagsField,
|
||||
Many2ManyTagsField,
|
||||
} from "@web/views/fields/many2many_tags/many2many_tags_field";
|
||||
import { TagsList } from "../many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { AvatarMany2XAutocomplete } from "@web/views/fields/relational_utils";
|
||||
|
||||
export class Many2ManyTagsAvatarField extends Many2ManyTagsField {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { usePopover } from "@web/core/popover/popover_hook";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { DateTimePicker, DatePicker } from "@web/core/datepicker/datepicker";
|
||||
import { Domain } from "@web/core/domain";
|
||||
import { Many2XAutocomplete, useOpenMany2XRecord } from "@web/views/fields/relational_utils";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { TagsList } from "@web/views/fields/many2many_tags/tags_list";
|
||||
import { TagsList } from "@web/core/tags_list/tags_list";
|
||||
import { m2oTupleFromData } from "@web/views/fields/many2one/many2one_field";
|
||||
import { PropertyTags } from "./property_tags";
|
||||
import { AutoComplete } from "@web/core/autocomplete/autocomplete";
|
||||
|
||||
Reference in New Issue
Block a user