[IMP] web: rename "view_in_kanban" key in properties definition
Purpose: -------- The "KanbanPropertiesField" has been renamed to "CardPropertiesField". For consistency, the key "view_in_kanban" of the properties definition is renamed to "view_in_cards" Task-3458627 Part-of: odoo/odoo#132578
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
t-foreach="propertiesList"
|
||||
t-as="propertyConfiguration"
|
||||
t-key="propertyConfiguration.name"
|
||||
t-if="propertyConfiguration.value and propertyConfiguration.view_in_kanban">
|
||||
t-if="propertyConfiguration.value and propertyConfiguration.view_in_cards">
|
||||
<!-- We purposefully hide 'Falsy' values such as a False boolean or a 0 value integer field. -->
|
||||
<div class="mw-100 text-truncate d-flex gap-2"
|
||||
t-att-class="{'border rounded-3 ps-2' : propertyConfiguration.type === 'boolean'}">
|
||||
|
||||
@@ -305,7 +305,7 @@ export class PropertyDefinition extends Component {
|
||||
onViewInKanbanChange(newValue) {
|
||||
const propertyDefinition = {
|
||||
...this.state.propertyDefinition,
|
||||
view_in_kanban: newValue,
|
||||
view_in_cards: newValue,
|
||||
};
|
||||
this.props.onChange(propertyDefinition);
|
||||
this.state.propertyDefinition = propertyDefinition;
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
</label>
|
||||
<CheckBox
|
||||
id="getUniqueDomID('kanban')"
|
||||
value="props.propertyDefinition.view_in_kanban"
|
||||
value="props.propertyDefinition.view_in_cards"
|
||||
disabled="props.readonly"
|
||||
onChange.bind="onViewInKanbanChange"
|
||||
/>
|
||||
|
||||
@@ -4811,7 +4811,7 @@ QUnit.module("Views", ({ beforeEach }) => {
|
||||
string: "My Char",
|
||||
type: "char",
|
||||
value: "hello",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_2",
|
||||
@@ -4824,14 +4824,14 @@ QUnit.module("Views", ({ beforeEach }) => {
|
||||
],
|
||||
value: "b",
|
||||
default: "c",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_3",
|
||||
string: "Hidden Char",
|
||||
type: "char",
|
||||
value: "hidden",
|
||||
view_in_kanban: false,
|
||||
view_in_cards: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
string: "My Char",
|
||||
type: "char",
|
||||
value: "char value",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_2",
|
||||
@@ -187,7 +187,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
],
|
||||
value: "b",
|
||||
default: "c",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
],
|
||||
company_id: 37,
|
||||
@@ -201,7 +201,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
string: "My Char",
|
||||
type: "char",
|
||||
value: "char value",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_2",
|
||||
@@ -214,7 +214,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
],
|
||||
value: "c",
|
||||
default: "c",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_3",
|
||||
@@ -227,7 +227,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
string: "My Char 4",
|
||||
type: "char",
|
||||
value: "char value 4",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
],
|
||||
company_id: 37,
|
||||
@@ -264,7 +264,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
name: "property_1",
|
||||
string: "My Char",
|
||||
type: "char",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_2",
|
||||
@@ -276,7 +276,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
["c", "C"],
|
||||
],
|
||||
default: "c",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_3",
|
||||
@@ -287,7 +287,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
name: "property_4",
|
||||
string: "My Char 4",
|
||||
type: "char",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -1516,14 +1516,14 @@ QUnit.module("Fields", (hooks) => {
|
||||
string: "My Date",
|
||||
type: "date",
|
||||
value: "2019-01-01",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_2",
|
||||
string: "My DateTime",
|
||||
type: "datetime",
|
||||
value: "2019-01-01 10:00:00",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
],
|
||||
company_id: 37,
|
||||
@@ -1566,7 +1566,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
name: "property_integer",
|
||||
string: "My Integer",
|
||||
type: "integer",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
};
|
||||
serverData.models.company.records.push({
|
||||
id: 38,
|
||||
@@ -1633,35 +1633,35 @@ QUnit.module("Fields", (hooks) => {
|
||||
string: "My Integer",
|
||||
type: "integer",
|
||||
value: 12,
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_float",
|
||||
string: "My Float",
|
||||
type: "float",
|
||||
value: 12.2,
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_date",
|
||||
string: "My Date",
|
||||
type: "date",
|
||||
value: "2023-06-05",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_datetime",
|
||||
string: "My Datetime",
|
||||
type: "datetime",
|
||||
value: "2023-06-05 11:05:00",
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
{
|
||||
name: "property_checkbox",
|
||||
string: "My Checkbox",
|
||||
type: "boolean",
|
||||
value: true,
|
||||
view_in_kanban: true,
|
||||
view_in_cards: true,
|
||||
},
|
||||
],
|
||||
company_id: 37,
|
||||
|
||||
+1
-1
@@ -3803,7 +3803,7 @@ class PropertiesDefinition(Field):
|
||||
REQUIRED_KEYS = ('name', 'type')
|
||||
ALLOWED_KEYS = (
|
||||
'name', 'string', 'type', 'comodel', 'default',
|
||||
'selection', 'tags', 'domain', 'view_in_kanban',
|
||||
'selection', 'tags', 'domain', 'view_in_cards',
|
||||
)
|
||||
# those keys will be removed if the types does not match
|
||||
PROPERTY_PARAMETERS_MAP = {
|
||||
|
||||
Reference in New Issue
Block a user