2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

Fix Address naming

This commit is contained in:
Prssanna Desai 2019-02-21 12:15:29 +05:30
parent 5bae1a54ec
commit a91b4a274c

View File

@ -2,17 +2,16 @@ module.exports = {
"name": "Address", "name": "Address",
"doctype": "DocType", "doctype": "DocType",
"isSingle": 0, "isSingle": 0,
"titleField": "addressTitle",
"keywordFields": [ "keywordFields": [
"addressTitle" "name"
], ],
pageSettings: { pageSettings: {
hideTitle: true hideTitle: true
}, },
"naming": "autoincrement", // "naming": "autoincrement",
"fields": [ "fields": [
{ {
"fieldname": "addressTitle", "fieldname": "name",
"label": "Address Title", "label": "Address Title",
"fieldtype": "Data", "fieldtype": "Data",
"required": 1 "required": 1
@ -96,7 +95,7 @@ module.exports = {
listSettings: { listSettings: {
getFields(list) { getFields(list) {
return ['addressTitle', 'addressType']; return ['name', 'addressType'];
}, },
getRowHTML(list, data) { getRowHTML(list, data) {
return `<div class="col-11">${list.getNameHTML(data)} (${data.addressType})</div>`; return `<div class="col-11">${list.getNameHTML(data)} (${data.addressType})</div>`;
@ -109,7 +108,7 @@ module.exports = {
columns: [ columns: [
{ {
fields: [ fields: [
"addressTitle", "addressType", "addressLine1", "name", "addressType", "addressLine1",
"addressLine2", "city", "country", "state", "addressLine2", "city", "country", "state",
"postalCode" "postalCode"
] ]