diff --git a/models/baseModels/AccountingLedgerEntry/AccountingLedgerEntry.ts b/models/baseModels/AccountingLedgerEntry/AccountingLedgerEntry.ts index bfb0e0c9..634c56ec 100644 --- a/models/baseModels/AccountingLedgerEntry/AccountingLedgerEntry.ts +++ b/models/baseModels/AccountingLedgerEntry/AccountingLedgerEntry.ts @@ -41,12 +41,12 @@ export class AccountingLedgerEntry extends Doc { static getListViewSettings(): ListViewSettings { return { columns: [ + 'date', 'account', 'party', 'debit', 'credit', 'referenceName', - 'reverted', ], }; } diff --git a/models/baseModels/Address/Address.ts b/models/baseModels/Address/Address.ts index 583c8f9a..c021e0f9 100644 --- a/models/baseModels/Address/Address.ts +++ b/models/baseModels/Address/Address.ts @@ -1,6 +1,11 @@ -import { t } from 'fyo'; +import { Fyo, t } from 'fyo'; import { Doc } from 'fyo/model/doc'; -import { EmptyMessageMap, FormulaMap, ListsMap } from 'fyo/model/types'; +import { + EmptyMessageMap, + FormulaMap, + ListsMap, + ListViewSettings, +} from 'fyo/model/types'; import { codeStateMap } from 'regional/in'; import { getCountryInfo } from 'utils/misc'; @@ -54,4 +59,10 @@ export class Address extends Doc { return t`Enter Country to load States`; }, }; + + static override getListViewSettings(): ListViewSettings { + return { + columns: ['name', 'addressLine1', 'city', 'state', 'country'], + }; + } } diff --git a/models/inventory/StockLedgerEntry.ts b/models/inventory/StockLedgerEntry.ts index d64c6756..b3ede093 100644 --- a/models/inventory/StockLedgerEntry.ts +++ b/models/inventory/StockLedgerEntry.ts @@ -1,7 +1,7 @@ import { Doc } from 'fyo/model/doc'; +import { ListViewSettings } from 'fyo/model/types'; import { Money } from 'pesa'; - export class StockLedgerEntry extends Doc { date?: Date; item?: string; @@ -11,4 +11,17 @@ export class StockLedgerEntry extends Doc { referenceName?: string; referenceType?: string; batch?: string; + + static override getListViewSettings(): ListViewSettings { + return { + columns: [ + 'date', + 'item', + 'location', + 'rate', + 'quantity', + 'referenceName', + ], + }; + } } diff --git a/schemas/app/Address.json b/schemas/app/Address.json index c3a40516..5e252050 100644 --- a/schemas/app/Address.json +++ b/schemas/app/Address.json @@ -1,8 +1,15 @@ { "name": "Address", "label": "Address", + "naming": "manual", "isSingle": false, "fields": [ + { + "fieldname": "name", + "label": "Address Name", + "fieldtype": "Data", + "required": true + }, { "fieldname": "addressLine1", "label": "Address Line 1", @@ -69,6 +76,7 @@ } ], "quickEditFields": [ + "name", "addressLine1", "addressLine2", "city", @@ -76,5 +84,5 @@ "country", "postalCode" ], - "inlineEditDisplayField": "addressDisplay" + "linkDisplayField": "addressDisplay" } diff --git a/schemas/app/Party.json b/schemas/app/Party.json index 2ee7d547..93f41983 100644 --- a/schemas/app/Party.json +++ b/schemas/app/Party.json @@ -74,7 +74,7 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true + "create": true }, { "fieldname": "taxId", diff --git a/schemas/app/PrintSettings.json b/schemas/app/PrintSettings.json index cd671c4f..c65cebdc 100644 --- a/schemas/app/PrintSettings.json +++ b/schemas/app/PrintSettings.json @@ -34,7 +34,7 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true, + "create": true, "section": "Contacts" }, { diff --git a/schemas/app/inventory/Location.json b/schemas/app/inventory/Location.json index 45161032..2f257458 100644 --- a/schemas/app/inventory/Location.json +++ b/schemas/app/inventory/Location.json @@ -16,7 +16,7 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true + "create": true } ], "quickEditFields": ["item", "address"] diff --git a/schemas/index.ts b/schemas/index.ts index 46c8bb6a..eccd6b39 100644 --- a/schemas/index.ts +++ b/schemas/index.ts @@ -50,8 +50,8 @@ function removeFields(schemaMap: SchemaMap): SchemaMap { (fn) => fn !== fieldname ); - if (schema.inlineEditDisplayField === fieldname) { - delete schema.inlineEditDisplayField; + if (schema.linkDisplayField === fieldname) { + delete schema.linkDisplayField; } } diff --git a/schemas/regional/in/Address.json b/schemas/regional/in/Address.json index 376ae771..41ba5061 100644 --- a/schemas/regional/in/Address.json +++ b/schemas/regional/in/Address.json @@ -9,6 +9,7 @@ } ], "quickEditFields": [ + "name", "addressLine1", "addressLine2", "city", diff --git a/schemas/tests/Party.json b/schemas/tests/Party.json index b833ec4e..48726c81 100644 --- a/schemas/tests/Party.json +++ b/schemas/tests/Party.json @@ -72,8 +72,7 @@ "fieldname": "address", "label": "Address", "fieldtype": "Link", - "target": "Address", - "inline": true + "target": "Address" } ], "quickEditFields": [ diff --git a/schemas/types.ts b/schemas/types.ts index f542bdf3..7b505975 100644 --- a/schemas/types.ts +++ b/schemas/types.ts @@ -61,7 +61,6 @@ export interface BaseField { placeholder?: string; // UI Facing config, form field placeholder groupBy?: string; // UI Facing used in dropdowns fields meta?: boolean; // Field is a meta field, i.e. only for the db, not UI - inline?: boolean; // UI Facing config, whether to display doc inline. filter?: boolean; // UI Facing config, whether to be used to filter the List. computed?: boolean; // Computed values are not stored in the database. section?: string; // UI Facing config, for grouping by sections @@ -118,7 +117,7 @@ export interface Schema { isSubmittable?: boolean; // For transactional types, values considered only after submit keywordFields?: string[]; // Used to get fields that are to be used for search. quickEditFields?: string[]; // Used to get fields for the quickEditForm - inlineEditDisplayField?:string;// Display field if inline editable + linkDisplayField?:string;// Display field if inline editable naming?: Naming; // Used for assigning name, default is 'random' else 'numberSeries' if present titleField?: string; // Main display field removeFields?: string[]; // Used by the builder to remove fields. diff --git a/src/components/Controls/AutoComplete.vue b/src/components/Controls/AutoComplete.vue index ab65c594..58bc9e49 100644 --- a/src/components/Controls/AutoComplete.vue +++ b/src/components/Controls/AutoComplete.vue @@ -25,6 +25,7 @@ :placeholder="inputPlaceholder" :readonly="isReadOnly" @focus="(e) => !isReadOnly && onFocus(e, toggleDropdown)" + @click="(e) => !isReadOnly && onFocus(e, toggleDropdown)" @blur="(e) => !isReadOnly && onBlur(e.target.value)" @input="onInput" @keydown.up="highlightItemUp" @@ -55,7 +56,6 @@ -