mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_m2x_options: use common object to reuse in props assignment
This commit is contained in:
@@ -21,55 +21,52 @@ import {isX2Many} from "@web/views/utils";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
import {session} from "@web/session";
|
||||
|
||||
Many2OneField.props = {
|
||||
...Many2OneField.props,
|
||||
noSearchMore: {type: Boolean, optional: true},
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
};
|
||||
Many2XAutocomplete.props = {
|
||||
...Many2XAutocomplete.props,
|
||||
const fieldColorProps = {
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
};
|
||||
|
||||
Many2OneField.props = {
|
||||
...Many2OneField.props,
|
||||
noSearchMore: {type: Boolean, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
Many2XAutocomplete.props = {
|
||||
...Many2XAutocomplete.props,
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
KanbanMany2OneAvatarField.props = {
|
||||
...KanbanMany2OneAvatarField.props,
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
Many2OneAvatarField.props = {
|
||||
...Many2OneAvatarField.props,
|
||||
noSearchMore: {type: Boolean, optional: true},
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
Many2ManyTagsField.props = {
|
||||
...Many2ManyTagsField.props,
|
||||
searchLimit: {type: Number, optional: true},
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
Many2ManyTagsFieldColorEditable.props = {
|
||||
...Many2ManyTagsFieldColorEditable.props,
|
||||
searchLimit: {type: Number, optional: true},
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
Many2ManyTagsAvatarField.props = {
|
||||
...Many2ManyTagsAvatarField.props,
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
KanbanMany2ManyTagsAvatarField.props = {
|
||||
...KanbanMany2ManyTagsAvatarField.props,
|
||||
fieldColor: {type: String, optional: true},
|
||||
fieldColorOptions: {type: Object, optional: true},
|
||||
...fieldColorProps,
|
||||
};
|
||||
|
||||
patch(many2OneField, {
|
||||
|
||||
Reference in New Issue
Block a user