/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ // contains the code for creating a class reflecting the standard window //jslint // tell the view manager what got loaded... OB.Layout.ViewManager.loadedWindowClassName = '_236_1306509592374'; isc.ClassFactory.defineClass('_236_1306509592374', isc.OBStandardWindow).addProperties({ windowId: '236', multiDocumentEnabled: false, viewProperties: { windowId: '236', /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ tabTitle: 'Resource', entity: 'Resource', tabId: '414', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/Resource', isAcctTab: false, isTrlTab: false, standardProperties:{ inpTabId: '414', inpwindowId: '236', inpTableId: '487', inpkeyColumnId: 'S_Resource_ID', inpKeyName: 'inpsResourceId' }, propertyToColumns:[ { property: 'description', inpColumn: 'inpdescription', dbColumn: 'Description', sessionProperty: false, type: '_id_10' }, { property: 'name', inpColumn: 'inpname', dbColumn: 'Name', sessionProperty: false, type: '_id_10' }, { property: 'searchKey', inpColumn: 'inpvalue', dbColumn: 'Value', sessionProperty: false, type: '_id_10' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'id', inpColumn: 'inpsResourceId', dbColumn: 'S_Resource_ID', sessionProperty: false, type: '_id_13' }, { property: 'available', inpColumn: 'inpisavailable', dbColumn: 'IsAvailable', sessionProperty: false, type: '_id_20' }, { property: 'warehouse', inpColumn: 'inpmWarehouseId', dbColumn: 'M_Warehouse_ID', sessionProperty: false, type: '_id_19' }, { property: 'resourceType', inpColumn: 'inpsResourcetypeId', dbColumn: 'S_ResourceType_ID', sessionProperty: false, type: '_id_19' }, { property: 'chargeableQuantity', inpColumn: 'inpchargeableqty', dbColumn: 'ChargeableQty', sessionProperty: false, type: '_id_29' }, { property: 'userContact', inpColumn: 'inpadUserId', dbColumn: 'AD_User_ID', sessionProperty: false, type: '_id_19' }, { property: 'id', inpColumn: 'S_Resource_ID', dbColumn: 'S_Resource_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], hasChildTabs: true, initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/Resource' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , canSave: false , title: 'id' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'searchKey', type: '_id_10', additional: false , required: true , length: 40 , title: 'searchKey' } , {name: 'name', type: '_id_10', additional: false , required: true , length: 60 , title: 'name' } , {name: 'description', type: '_id_10', additional: false , length: 255 , title: 'description' } , {name: 'resourceType', type: '_id_19', additional: false , required: true , title: 'resourceType' , hidden: true } , {name: 'resourceType._identifier' , type: 'text', hidden: true , title: 'resourceType' } , {name: 'warehouse', type: '_id_19', additional: false , required: true , title: 'warehouse' , hidden: true } , {name: 'warehouse._identifier' , type: 'text', hidden: true , title: 'warehouse' } , {name: 'available', type: '_id_20', additional: false , title: 'available' } , {name: 'userContact', type: '_id_19', additional: false , title: 'userContact' , hidden: true } , {name: 'userContact._identifier' , type: 'text', hidden: true , title: 'userContact' } , {name: 'chargeableQuantity', type: '_id_29', additional: false , title: 'chargeableQuantity' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ ], whereClause: '', orderByClause: '', sortField: '', filterClause: '', filterName: '', foreignKeyFieldNames:[ ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { this.addChildView( isc.OBStandardView.create({ tabTitle: 'Unavailability', entity: 'ResourceUnAvailable', parentProperty: 'resource', tabId: '416', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/Unavailability', isAcctTab: false, isTrlTab: false, standardProperties:{ inpTabId: '416', inpwindowId: '236', inpTableId: '482', inpkeyColumnId: 'S_ResourceUnAvailable_ID', inpKeyName: 'inpsResourceunavailableId' }, propertyToColumns:[ { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'id', inpColumn: 'inpsResourceunavailableId', dbColumn: 'S_ResourceUnAvailable_ID', sessionProperty: false, type: '_id_13' }, { property: 'startingDate', inpColumn: 'inpdatefrom', dbColumn: 'DateFrom', sessionProperty: false, type: '_id_15' }, { property: 'description', inpColumn: 'inpdescription', dbColumn: 'Description', sessionProperty: false, type: '_id_10' }, { property: 'endingDate', inpColumn: 'inpdateto', dbColumn: 'DateTo', sessionProperty: false, type: '_id_15' }, { property: 'resource', inpColumn: 'inpsResourceId', dbColumn: 'S_Resource_ID', sessionProperty: false, type: '_id_19' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'id', inpColumn: 'S_ResourceUnAvailable_ID', dbColumn: 'S_ResourceUnAvailable_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/ResourceUnAvailable' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , canSave: false , title: 'id' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'resource', type: '_id_19', additional: false , canSave: false , title: 'resource' , hidden: true } , {name: 'resource._identifier' , type: 'text', hidden: true , canSave: false , title: 'resource' } , {name: 'startingDate', type: '_id_15', additional: false , required: true , title: 'startingDate' } , {name: 'endingDate', type: '_id_15', additional: false , title: 'endingDate' } , {name: 'description', type: '_id_10', additional: false , length: 255 , title: 'description' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ ], whereClause: '', orderByClause: '', sortField: '', filterClause: '', filterName: '', foreignKeyFieldNames:[ ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { } }) ); this.addChildView( isc.OBStandardView.create({ tabTitle: 'Resource Product', entity: 'Product', parentProperty: 'resource', tabId: '417', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/ResourceProduct', isAcctTab: false, isTrlTab: false, standardProperties:{ inpTabId: '417', inpwindowId: '236', inpTableId: '208', inpkeyColumnId: 'M_Product_ID', inpKeyName: 'inpmProductId' }, propertyToColumns:[ { property: 'searchKey', inpColumn: 'inpvalue', dbColumn: 'Value', sessionProperty: true, type: '_id_10' }, { property: 'name', inpColumn: 'inpname', dbColumn: 'Name', sessionProperty: false, type: '_id_10' }, { property: 'description', inpColumn: 'inpdescription', dbColumn: 'Description', sessionProperty: false, type: '_id_10' }, { property: 'helpComment', inpColumn: 'inphelp', dbColumn: 'Help', sessionProperty: false, type: '_id_14' }, { property: 'comments', inpColumn: 'inpdocumentnote', dbColumn: 'DocumentNote', sessionProperty: false, type: '_id_14' }, { property: 'uPCEAN', inpColumn: 'inpupc', dbColumn: 'UPC', sessionProperty: false, type: '_id_10' }, { property: 'sKU', inpColumn: 'inpsku', dbColumn: 'SKU', sessionProperty: false, type: '_id_10' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'summaryLevel', inpColumn: 'inpissummary', dbColumn: 'IsSummary', sessionProperty: false, type: '_id_20' }, { property: 'productCategory', inpColumn: 'inpmProductCategoryId', dbColumn: 'M_Product_Category_ID', sessionProperty: false, type: '_id_19' }, { property: 'classification', inpColumn: 'inpclassification', dbColumn: 'Classification', sessionProperty: false, type: '_id_10' }, { property: 'taxCategory', inpColumn: 'inpcTaxcategoryId', dbColumn: 'C_TaxCategory_ID', sessionProperty: false, type: '_id_19' }, { property: 'uOM', inpColumn: 'inpcUomId', dbColumn: 'C_UOM_ID', sessionProperty: false, type: '_id_19' }, { property: 'salesRepresentative', inpColumn: 'inpsalesrepId', dbColumn: 'SalesRep_ID', sessionProperty: false, type: '_id_190' }, { property: 'productType', inpColumn: 'inpproducttype', dbColumn: 'ProductType', sessionProperty: false, type: '_id_270' }, { property: 'purchase', inpColumn: 'inpispurchased', dbColumn: 'IsPurchased', sessionProperty: false, type: '_id_20' }, { property: 'sale', inpColumn: 'inpissold', dbColumn: 'IsSold', sessionProperty: false, type: '_id_20' }, { property: 'discontinued', inpColumn: 'inpdiscontinued', dbColumn: 'Discontinued', sessionProperty: false, type: '_id_20' }, { property: 'discontinuedBy', inpColumn: 'inpdiscontinuedby', dbColumn: 'DiscontinuedBy', sessionProperty: false, type: '_id_15' }, { property: 'imageURL', inpColumn: 'inpimageurl', dbColumn: 'ImageURL', sessionProperty: false, type: '_id_10' }, { property: 'descriptionURL', inpColumn: 'inpdescriptionurl', dbColumn: 'DescriptionURL', sessionProperty: false, type: '_id_10' }, { property: 'attributeSet', inpColumn: 'inpmAttributesetId', dbColumn: 'M_AttributeSet_ID', sessionProperty: true, type: '_id_19' }, { property: 'attributeSetValue', inpColumn: 'inpmAttributesetinstanceId', dbColumn: 'M_AttributeSetInstance_ID', sessionProperty: true, type: '_id_35' }, { property: 'stocked', inpColumn: 'inpisstocked', dbColumn: 'IsStocked', sessionProperty: false, type: '_id_20' }, { property: 'volume', inpColumn: 'inpvolume', dbColumn: 'Volume', sessionProperty: false, type: '_id_22' }, { property: 'billOfMaterials', inpColumn: 'inpisbom', dbColumn: 'IsBOM', sessionProperty: true, type: '_id_20' }, { property: 'printDetailsOnInvoice', inpColumn: 'inpisinvoiceprintdetails', dbColumn: 'IsInvoicePrintDetails', sessionProperty: false, type: '_id_20' }, { property: 'printDetailsOnPickList', inpColumn: 'inpispicklistprintdetails', dbColumn: 'IsPickListPrintDetails', sessionProperty: false, type: '_id_20' }, { property: 'bOMVerified', inpColumn: 'inpisverified', dbColumn: 'IsVerified', sessionProperty: false, type: '_id_20' }, { property: 'processNow', inpColumn: 'inpprocessing', dbColumn: 'Processing', sessionProperty: false, type: '_id_28' }, { property: 'expenseType', inpColumn: 'inpsExpensetypeId', dbColumn: 'S_ExpenseType_ID', sessionProperty: false, type: '_id_19' }, { property: 'resource', inpColumn: 'inpsResourceId', dbColumn: 'S_Resource_ID', sessionProperty: false, type: '_id_19' }, { property: 'versionNo', inpColumn: 'inpversionno', dbColumn: 'VersionNo', sessionProperty: false, type: '_id_10' }, { property: 'guaranteedDays', inpColumn: 'inpguaranteedays', dbColumn: 'GuaranteeDays', sessionProperty: false, type: '_id_11' }, { property: 'id', inpColumn: 'inpmProductId', dbColumn: 'M_Product_ID', sessionProperty: true, type: '_id_13' }, { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'weight', inpColumn: 'inpweight', dbColumn: 'Weight', sessionProperty: false, type: '_id_22' }, { property: 'shelfWidth', inpColumn: 'inpshelfwidth', dbColumn: 'ShelfWidth', sessionProperty: false, type: '_id_22' }, { property: 'shelfHeight', inpColumn: 'inpshelfheight', dbColumn: 'ShelfHeight', sessionProperty: false, type: '_id_22' }, { property: 'shelfDepth', inpColumn: 'inpshelfdepth', dbColumn: 'ShelfDepth', sessionProperty: false, type: '_id_22' }, { property: 'unitsPerPallet', inpColumn: 'inpunitsperpallet', dbColumn: 'UnitsPerPallet', sessionProperty: false, type: '_id_11' }, { property: 'downloadURL', inpColumn: 'inpdownloadurl', dbColumn: 'DownloadURL', sessionProperty: false, type: '_id_10' }, { property: 'freightCategory', inpColumn: 'inpmFreightcategoryId', dbColumn: 'M_FreightCategory_ID', sessionProperty: false, type: '_id_19' }, { property: 'storageBin', inpColumn: 'inpmLocatorId', dbColumn: 'M_Locator_ID', sessionProperty: false, type: '_id_31' }, { property: 'id', inpColumn: 'M_Product_ID', dbColumn: 'M_Product_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], hasChildTabs: true, initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/Product' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , canSave: false , title: 'id' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'searchKey', type: '_id_10', additional: false , required: true , length: 40 , title: 'searchKey' } , {name: 'name', type: '_id_10', additional: false , required: true , length: 60 , title: 'name' } , {name: 'description', type: '_id_10', additional: false , length: 255 , title: 'description' } , {name: 'comments', type: '_id_14', additional: false , length: 2000 , title: 'comments' } , {name: 'helpComment', type: '_id_14', additional: false , length: 2000 , title: 'helpComment' } , {name: 'uPCEAN', type: '_id_10', additional: false , length: 30 , title: 'uPCEAN' } , {name: 'sKU', type: '_id_10', additional: false , length: 30 , title: 'sKU' } , {name: 'uOM', type: '_id_19', additional: false , required: true , title: 'uOM' , hidden: true } , {name: 'uOM._identifier' , type: 'text', hidden: true , title: 'uOM' } , {name: 'salesRepresentative', type: '_id_190', additional: false , title: 'salesRepresentative' , hidden: true } , {name: 'salesRepresentative._identifier' , type: 'text', hidden: true , title: 'salesRepresentative' } , {name: 'summaryLevel', type: '_id_20', additional: false , title: 'summaryLevel' } , {name: 'stocked', type: '_id_20', additional: false , title: 'stocked' } , {name: 'purchase', type: '_id_20', additional: false , title: 'purchase' } , {name: 'sale', type: '_id_20', additional: false , title: 'sale' } , {name: 'billOfMaterials', type: '_id_20', additional: false , title: 'billOfMaterials' } , {name: 'printDetailsOnInvoice', type: '_id_20', additional: false , title: 'printDetailsOnInvoice' } , {name: 'printDetailsOnPickList', type: '_id_20', additional: false , title: 'printDetailsOnPickList' } , {name: 'bOMVerified', type: '_id_20', additional: false , canSave: false , title: 'bOMVerified' } , {name: 'productCategory', type: '_id_19', additional: false , required: true , title: 'productCategory' , hidden: true } , {name: 'productCategory._identifier' , type: 'text', hidden: true , title: 'productCategory' } , {name: 'classification', type: '_id_10', additional: false , length: 1 , title: 'classification' } , {name: 'volume', type: '_id_22', additional: false , title: 'volume' } , {name: 'weight', type: '_id_22', additional: false , title: 'weight' } , {name: 'shelfWidth', type: '_id_22', additional: false , title: 'shelfWidth' } , {name: 'shelfHeight', type: '_id_22', additional: false , title: 'shelfHeight' } , {name: 'shelfDepth', type: '_id_22', additional: false , title: 'shelfDepth' } , {name: 'unitsPerPallet', type: '_id_11', additional: false , title: 'unitsPerPallet' } , {name: 'taxCategory', type: '_id_19', additional: false , required: true , title: 'taxCategory' , hidden: true } , {name: 'taxCategory._identifier' , type: 'text', hidden: true , title: 'taxCategory' } , {name: 'resource', type: '_id_19', additional: false , canSave: false , title: 'resource' , hidden: true } , {name: 'resource._identifier' , type: 'text', hidden: true , canSave: false , title: 'resource' } , {name: 'discontinued', type: '_id_20', additional: false , title: 'discontinued' } , {name: 'discontinuedBy', type: '_id_15', additional: false , title: 'discontinuedBy' } , {name: 'processNow', type: '_id_28', additional: false , title: 'processNow' } , {name: 'expenseType', type: '_id_19', additional: false , canSave: false , title: 'expenseType' , hidden: true } , {name: 'expenseType._identifier' , type: 'text', hidden: true , canSave: false , title: 'expenseType' } , {name: 'productType', type: '_id_270', additional: false , required: true , length: 60 , title: 'productType' , valueMap: { 'E': 'Expense type', 'I': 'Item', 'R': 'Resource', 'S': 'Service' } } , {name: 'imageURL', type: '_id_10', additional: false , length: 120 , title: 'imageURL' } , {name: 'descriptionURL', type: '_id_10', additional: false , length: 120 , title: 'descriptionURL' } , {name: 'guaranteedDays', type: '_id_11', additional: false , title: 'guaranteedDays' } , {name: 'versionNo', type: '_id_10', additional: false , length: 20 , title: 'versionNo' } , {name: 'attributeSet', type: '_id_19', additional: false , title: 'attributeSet' , hidden: true } , {name: 'attributeSet._identifier' , type: 'text', hidden: true , title: 'attributeSet' } , {name: 'attributeSetValue', type: '_id_35', additional: false , title: 'attributeSetValue' , hidden: true } , {name: 'attributeSetValue._identifier' , type: 'text', hidden: true , title: 'attributeSetValue' } , {name: 'downloadURL', type: '_id_10', additional: false , length: 120 , title: 'downloadURL' } , {name: 'freightCategory', type: '_id_19', additional: false , title: 'freightCategory' , hidden: true } , {name: 'freightCategory._identifier' , type: 'text', hidden: true , title: 'freightCategory' } , {name: 'storageBin', type: '_id_31', additional: false , title: 'storageBin' , hidden: true } , {name: 'storageBin._identifier' , type: 'text', hidden: true , title: 'storageBin' } , {name: 'image', type: '_id_32', additional: false , title: 'image' , hidden: true } , {name: 'image._identifier' , type: 'text', hidden: true , title: 'image' } , {name: 'businessPartner', type: '_id_800057', additional: false , title: 'businessPartner' , hidden: true } , {name: 'businessPartner._identifier' , type: 'text', hidden: true , title: 'businessPartner' } , {name: 'printPrice', type: '_id_20', additional: false , title: 'printPrice' } , {name: 'name2', type: '_id_10', additional: false , length: 60 , title: 'name2' } , {name: 'costType', type: '_id_800025', additional: false , length: 60 , title: 'costType' , valueMap: { 'AV': 'Average', 'ST': 'Standard' } } , {name: 'standardCost', type: '_id_22', additional: false , title: 'standardCost' } , {name: 'minimumStock', type: '_id_22', additional: false , title: 'minimumStock' } , {name: 'enforceAttribute', type: '_id_20', additional: false , title: 'enforceAttribute' } , {name: 'calculated', type: '_id_20', additional: false , title: 'calculated' } , {name: 'processPlan', type: '_id_19', additional: false , title: 'processPlan' , hidden: true } , {name: 'processPlan._identifier' , type: 'text', hidden: true , title: 'processPlan' } , {name: 'production', type: '_id_20', additional: false , title: 'production' } , {name: 'capacity', type: '_id_22', additional: false , title: 'capacity' } , {name: 'minimumLeadTime', type: '_id_22', additional: false , title: 'minimumLeadTime' } , {name: 'planner', type: '_id_19', additional: false , title: 'planner' , hidden: true } , {name: 'planner._identifier' , type: 'text', hidden: true , title: 'planner' } , {name: 'planningMethod', type: '_id_19', additional: false , title: 'planningMethod' , hidden: true } , {name: 'planningMethod._identifier' , type: 'text', hidden: true , title: 'planningMethod' } , {name: 'maxQuantity', type: '_id_29', additional: false , title: 'maxQuantity' } , {name: 'minQuantity', type: '_id_29', additional: false , title: 'minQuantity' } , {name: 'standardQuantity', type: '_id_29', additional: false , title: 'standardQuantity' } , {name: 'quantityType', type: '_id_20', additional: false , title: 'quantityType' } , {name: 'safetyStock', type: '_id_22', additional: false , title: 'safetyStock' } , {name: 'useAttributeSetValueAs', type: '_id_5AD08D5DF85549E0BCC0DEBDE4C0D340', additional: false , length: 60 , title: 'useAttributeSetValueAs' , valueMap: { 'D': 'Default', 'O': 'Overwrite Specification', 'F': 'Specification' } } , {name: 'businessPartner.name', type: '_id_10', additional: true , required: true , length: 60 , title: 'businessPartner.name' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: 'searchKey', title: 'Search Key', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'Value', inpColumnName: 'inpvalue', referencedKeyColumnName: '', targetEntity: '', required: true, width: '*', dummy: '' } , { name: 'name', title: 'Name', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'Name', inpColumnName: 'inpname', referencedKeyColumnName: '', targetEntity: '', required: true, width: '*', dummy: '' } , { name: 'description', title: 'Description', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'Description', inpColumnName: 'inpdescription', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: '', title: '', type: 'spacer', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, dummy: '' } , { name: 'helpComment', title: 'Help/Comment', type: '_id_14', disabled: false, updatable: true, parentProperty: false, colSpan: 2, rowSpan: 2, startRow: false, endRow: false, columnName: 'Help', inpColumnName: 'inphelp', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'comments', title: 'Comments', type: '_id_14', disabled: false, updatable: true, parentProperty: false, colSpan: 2, rowSpan: 2, startRow: false, endRow: false, columnName: 'DocumentNote', inpColumnName: 'inpdocumentnote', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'uPCEAN', title: 'UPC/EAN', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'UPC', inpColumnName: 'inpupc', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'sKU', title: 'SKU', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'SKU', inpColumnName: 'inpsku', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'active', title: 'Active', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsActive', inpColumnName: 'inpisactive', referencedKeyColumnName: '', targetEntity: '', required: false, "width":1,"overflow":"visible", dummy: '' } , { name: 'summaryLevel', title: 'Summary Level', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsSummary', inpColumnName: 'inpissummary', referencedKeyColumnName: '', targetEntity: '', required: false, redrawOnChange: true, changed: function(form, item, value) { this.Super('changed', arguments); form.onFieldChanged(form, item, value); }, "width":1,"overflow":"visible", dummy: '' } , { name: 'productCategory', title: 'Product Category', type: '_id_19', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'M_Product_Category_ID', inpColumnName: 'inpmProductCategoryId', referencedKeyColumnName: 'M_Product_Category_ID', targetEntity: 'ProductCategory', required: true, width: '*', dummy: '' } , { name: 'classification', title: 'Classification', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'Classification', inpColumnName: 'inpclassification', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'taxCategory', title: 'Tax Category', type: '_id_19', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'C_TaxCategory_ID', inpColumnName: 'inpcTaxcategoryId', referencedKeyColumnName: 'C_TaxCategory_ID', targetEntity: 'FinancialMgmtTaxCategory', required: true, showIf: function(item, value, form, values) { var context = form.view.getContextInfo(false, true, true), currentValues = values || form.view.getCurrentValues(); OB.Utilities.fixNull250(currentValues); return context && (currentValues.sale === true || currentValues.purchase === true && currentValues.summaryLevel === false); }, width: '*', dummy: '' } , { name: 'uOM', title: 'UOM', type: '_id_19', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'C_UOM_ID', inpColumnName: 'inpcUomId', referencedKeyColumnName: 'C_UOM_ID', targetEntity: 'UOM', required: true, width: '*', dummy: '' } , { name: 'salesRepresentative', title: 'Sales Representative', type: '_id_190', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'SalesRep_ID', inpColumnName: 'inpsalesrepId', referencedKeyColumnName: 'AD_User_ID', targetEntity: 'ADUser', required: false, width: '*', dummy: '' } , { name: 'productType', title: 'Product Type', type: '_id_270', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'ProductType', inpColumnName: 'inpproducttype', referencedKeyColumnName: '', targetEntity: '', required: true, redrawOnChange: true, changed: function(form, item, value) { this.Super('changed', arguments); form.onFieldChanged(form, item, value); }, width: '*', dummy: '' } , { name: 'purchase', title: 'Purchase', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsPurchased', inpColumnName: 'inpispurchased', referencedKeyColumnName: '', targetEntity: '', required: false, redrawOnChange: true, changed: function(form, item, value) { this.Super('changed', arguments); form.onFieldChanged(form, item, value); }, showIf: function(item, value, form, values) { var context = form.view.getContextInfo(false, true, true), currentValues = values || form.view.getCurrentValues(); OB.Utilities.fixNull250(currentValues); return context && (currentValues.summaryLevel === false); }, "width":1,"overflow":"visible", dummy: '' } , { name: 'sale', title: 'Sale', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsSold', inpColumnName: 'inpissold', referencedKeyColumnName: '', targetEntity: '', required: false, redrawOnChange: true, changed: function(form, item, value) { this.Super('changed', arguments); form.onFieldChanged(form, item, value); }, showIf: function(item, value, form, values) { var context = form.view.getContextInfo(false, true, true), currentValues = values || form.view.getCurrentValues(); OB.Utilities.fixNull250(currentValues); return context && (currentValues.summaryLevel === false); }, "width":1,"overflow":"visible", dummy: '' } , { name: 'discontinued', title: 'Discontinued', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'Discontinued', inpColumnName: 'inpdiscontinued', referencedKeyColumnName: '', targetEntity: '', required: false, redrawOnChange: true, changed: function(form, item, value) { this.Super('changed', arguments); form.onFieldChanged(form, item, value); }, showIf: function(item, value, form, values) { var context = form.view.getContextInfo(false, true, true), currentValues = values || form.view.getCurrentValues(); OB.Utilities.fixNull250(currentValues); return context && (currentValues.summaryLevel === false); }, "width":1,"overflow":"visible", dummy: '' } , { name: 'discontinuedBy', title: 'Discontinued by', type: '_id_15', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'DiscontinuedBy', inpColumnName: 'inpdiscontinuedby', referencedKeyColumnName: '', targetEntity: '', required: false, showIf: function(item, value, form, values) { var context = form.view.getContextInfo(false, true, true), currentValues = values || form.view.getCurrentValues(); OB.Utilities.fixNull250(currentValues); return context && (currentValues.summaryLevel === false && currentValues.discontinued === true); }, "width":"50%", dummy: '' } , { name: 'imageURL', title: 'Image URL', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'ImageURL', inpColumnName: 'inpimageurl', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: 'descriptionURL', title: 'Description URL', type: '_id_10', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'DescriptionURL', inpColumnName: 'inpdescriptionurl', referencedKeyColumnName: '', targetEntity: '', required: false, width: '*', dummy: '' } , { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'Value' , inpColumnName: 'inpvalue' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'searchKey')]", width: isc.OBGrid.getDefaultColumnWidth(20), name: 'searchKey', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Search Key' , prompt: 'Search Key' , escapeHTML: true , showIf: 'true' , columnName: 'Value' , inpColumnName: 'inpvalue' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'Name' , inpColumnName: 'inpname' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'name')]", width: isc.OBGrid.getDefaultColumnWidth(60), name: 'name', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Name' , prompt: 'Name' , escapeHTML: true , showIf: 'true' , columnName: 'Name' , inpColumnName: 'inpname' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'Description' , inpColumnName: 'inpdescription' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'description')]", width: isc.OBGrid.getDefaultColumnWidth(60), name: 'description', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Description' , prompt: 'Description' , escapeHTML: true , showIf: 'true' , columnName: 'Description' , inpColumnName: 'inpdescription' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_14', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'Help' , inpColumnName: 'inphelp' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'helpComment')]", width: isc.OBGrid.getDefaultColumnWidth(60), name: 'helpComment', canExport: true, canHide: true, editorType: 'OBPopUpTextAreaItem', canSort: false , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Help/Comment' , prompt: 'Help/Comment' , escapeHTML: true , showIf: 'true' , columnName: 'Help' , inpColumnName: 'inphelp' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_14', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'DocumentNote' , inpColumnName: 'inpdocumentnote' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'comments')]", width: isc.OBGrid.getDefaultColumnWidth(60), name: 'comments', canExport: true, canHide: true, editorType: 'OBPopUpTextAreaItem', canSort: false , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Comments' , prompt: 'Comments' , escapeHTML: true , showIf: 'true' , columnName: 'DocumentNote' , inpColumnName: 'inpdocumentnote' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'UPC' , inpColumnName: 'inpupc' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'uPCEAN')]", width: isc.OBGrid.getDefaultColumnWidth(29), name: 'uPCEAN', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'UPC/EAN' , prompt: 'UPC/EAN' , escapeHTML: true , showIf: 'true' , columnName: 'UPC' , inpColumnName: 'inpupc' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'SKU' , inpColumnName: 'inpsku' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'sKU')]", width: isc.OBGrid.getDefaultColumnWidth(29), name: 'sKU', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'SKU' , prompt: 'SKU' , escapeHTML: true , showIf: 'true' , columnName: 'SKU' , inpColumnName: 'inpsku' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'active', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Active' , prompt: 'Active' , escapeHTML: true , showIf: 'true' , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsSummary' , inpColumnName: 'inpissummary' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'summaryLevel', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Summary Level' , prompt: 'Summary Level' , escapeHTML: true , showIf: 'true' , columnName: 'IsSummary' , inpColumnName: 'inpissummary' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'M_Product_Category_ID' , inpColumnName: 'inpmProductCategoryId' , referencedKeyColumnName: 'M_Product_Category_ID' , targetEntity: 'ProductCategory' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'productCategory._identifier',valueField: 'productCategory', foreignKeyField: true, name: 'productCategory', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'productCategory')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Product Category' , prompt: 'Product Category' , escapeHTML: true , showIf: 'true' , columnName: 'M_Product_Category_ID' , inpColumnName: 'inpmProductCategoryId' , referencedKeyColumnName: 'M_Product_Category_ID' , targetEntity: 'ProductCategory' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'Classification' , inpColumnName: 'inpclassification' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'classification')]", width: isc.OBGrid.getDefaultColumnWidth(1), name: 'classification', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Classification' , prompt: 'Classification' , escapeHTML: true , showIf: 'true' , columnName: 'Classification' , inpColumnName: 'inpclassification' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'C_TaxCategory_ID' , inpColumnName: 'inpcTaxcategoryId' , referencedKeyColumnName: 'C_TaxCategory_ID' , targetEntity: 'FinancialMgmtTaxCategory' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'taxCategory._identifier',valueField: 'taxCategory', foreignKeyField: true, name: 'taxCategory', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'taxCategory')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Tax Category' , prompt: 'Tax Category' , escapeHTML: true , showIf: 'true' , columnName: 'C_TaxCategory_ID' , inpColumnName: 'inpcTaxcategoryId' , referencedKeyColumnName: 'C_TaxCategory_ID' , targetEntity: 'FinancialMgmtTaxCategory' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'C_UOM_ID' , inpColumnName: 'inpcUomId' , referencedKeyColumnName: 'C_UOM_ID' , targetEntity: 'UOM' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'uOM._identifier',valueField: 'uOM', foreignKeyField: true, name: 'uOM', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'uOM')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'UOM' , prompt: 'UOM' , escapeHTML: true , showIf: 'true' , columnName: 'C_UOM_ID' , inpColumnName: 'inpcUomId' , referencedKeyColumnName: 'C_UOM_ID' , targetEntity: 'UOM' } , { autoExpand: true, type: '_id_190', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'SalesRep_ID' , inpColumnName: 'inpsalesrepId' , referencedKeyColumnName: 'AD_User_ID' , targetEntity: 'ADUser' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'salesRepresentative._identifier',valueField: 'salesRepresentative', foreignKeyField: true, name: 'salesRepresentative', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'salesRepresentative')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Sales Representative' , prompt: 'Sales Representative' , escapeHTML: true , showIf: 'true' , columnName: 'SalesRep_ID' , inpColumnName: 'inpsalesrepId' , referencedKeyColumnName: 'AD_User_ID' , targetEntity: 'ADUser' } , { autoExpand: false, type: '_id_270', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'ProductType' , inpColumnName: 'inpproducttype' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'productType', canExport: true, canHide: true, editorType: 'OBListItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBListFilterItem' , title: 'Product Type' , prompt: 'Product Type' , escapeHTML: true , showIf: 'true' , columnName: 'ProductType' , inpColumnName: 'inpproducttype' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsPurchased' , inpColumnName: 'inpispurchased' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'purchase', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Purchase' , prompt: 'Purchase' , escapeHTML: true , showIf: 'true' , columnName: 'IsPurchased' , inpColumnName: 'inpispurchased' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsSold' , inpColumnName: 'inpissold' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'sale', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Sale' , prompt: 'Sale' , escapeHTML: true , showIf: 'true' , columnName: 'IsSold' , inpColumnName: 'inpissold' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'Discontinued' , inpColumnName: 'inpdiscontinued' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'discontinued', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Discontinued' , prompt: 'Discontinued' , escapeHTML: true , showIf: 'true' , columnName: 'Discontinued' , inpColumnName: 'inpdiscontinued' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_15', cellAlign: 'left', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'DiscontinuedBy' , inpColumnName: 'inpdiscontinuedby' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'discontinuedBy', canExport: true, canHide: true, editorType: 'OBDateItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBMiniDateRangeItem' , title: 'Discontinued by' , prompt: 'Discontinued by' , escapeHTML: true , showIf: 'true' , columnName: 'DiscontinuedBy' , inpColumnName: 'inpdiscontinuedby' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'ImageURL' , inpColumnName: 'inpimageurl' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'imageURL')]", width: isc.OBGrid.getDefaultColumnWidth(20), name: 'imageURL', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Image URL' , prompt: 'Image URL' , escapeHTML: true , showIf: 'true' , columnName: 'ImageURL' , inpColumnName: 'inpimageurl' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '*' // note need to be repeated for editor fields , columnName: 'DescriptionURL' , inpColumnName: 'inpdescriptionurl' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'descriptionURL')]", width: isc.OBGrid.getDefaultColumnWidth(20), name: 'descriptionURL', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Description URL' , prompt: 'Description URL' , escapeHTML: true , showIf: 'true' , columnName: 'DescriptionURL' , inpColumnName: 'inpdescriptionurl' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_35', editorProperties: { width: '' // note need to be repeated for editor fields , columnName: 'M_AttributeSetInstance_ID' , inpColumnName: 'inpmAttributesetinstanceId' , referencedKeyColumnName: 'M_AttributeSetInstance_ID' , targetEntity: 'AttributeSetInstance' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(14), displayField: 'attributeSetValue._identifier',valueField: 'attributeSetValue', foreignKeyField: true, name: 'attributeSetValue', canExport: true, canHide: true, editorType: 'OBPAttributeSearchItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'attributeSetValue')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Attribute Set Value' , prompt: 'Attribute Set Value' , escapeHTML: true , showIf: 'true' , columnName: 'M_AttributeSetInstance_ID' , inpColumnName: 'inpmAttributesetinstanceId' , referencedKeyColumnName: 'M_AttributeSetInstance_ID' , targetEntity: 'AttributeSetInstance' } , { autoExpand: false, type: '_id_22', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'Weight' , inpColumnName: 'inpweight' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'weight', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Weight' , prompt: 'Weight' , escapeHTML: true , showIf: 'true' , columnName: 'Weight' , inpColumnName: 'inpweight' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsStocked' , inpColumnName: 'inpisstocked' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'stocked', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Stocked' , prompt: 'Stocked' , escapeHTML: true , showIf: 'true' , columnName: 'IsStocked' , inpColumnName: 'inpisstocked' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_22', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'Volume' , inpColumnName: 'inpvolume' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'volume', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Volume' , prompt: 'Volume' , escapeHTML: true , showIf: 'true' , columnName: 'Volume' , inpColumnName: 'inpvolume' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_22', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'ShelfWidth' , inpColumnName: 'inpshelfwidth' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'shelfWidth', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Shelf Width' , prompt: 'Shelf Width' , escapeHTML: true , showIf: 'true' , columnName: 'ShelfWidth' , inpColumnName: 'inpshelfwidth' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_22', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'ShelfHeight' , inpColumnName: 'inpshelfheight' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'shelfHeight', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Shelf Height' , prompt: 'Shelf Height' , escapeHTML: true , showIf: 'true' , columnName: 'ShelfHeight' , inpColumnName: 'inpshelfheight' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_22', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'ShelfDepth' , inpColumnName: 'inpshelfdepth' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'shelfDepth', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Shelf Depth' , prompt: 'Shelf Depth' , escapeHTML: true , showIf: 'true' , columnName: 'ShelfDepth' , inpColumnName: 'inpshelfdepth' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_11', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'UnitsPerPallet' , inpColumnName: 'inpunitsperpallet' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'unitsPerPallet', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Units Per Pallet' , prompt: 'Units Per Pallet' , escapeHTML: true , showIf: 'true' , columnName: 'UnitsPerPallet' , inpColumnName: 'inpunitsperpallet' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_31', editorProperties: { "width":"","searchUrl":"\/info\/Locator.html","inFields":[{"columnName":"inpmWarehouseId","parameterName":"inpmWarehouseId"},{"columnName":"inpadOrgId","parameterName":"inpAD_Org_ID"}],"outFields":[] // note need to be repeated for editor fields , columnName: 'M_Locator_ID' , inpColumnName: 'inpmLocatorId' , referencedKeyColumnName: 'M_Locator_ID' , targetEntity: 'Locator' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'storageBin._identifier',valueField: 'storageBin', foreignKeyField: true, name: 'storageBin', canExport: true, canHide: true, editorType: 'OBSearchItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'storageBin')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Storage Bin' , prompt: 'Storage Bin' , escapeHTML: true , showIf: 'true' , columnName: 'M_Locator_ID' , inpColumnName: 'inpmLocatorId' , referencedKeyColumnName: 'M_Locator_ID' , targetEntity: 'Locator' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'M_FreightCategory_ID' , inpColumnName: 'inpmFreightcategoryId' , referencedKeyColumnName: 'M_FreightCategory_ID' , targetEntity: 'ShippingFreightCategory' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'freightCategory._identifier',valueField: 'freightCategory', foreignKeyField: true, name: 'freightCategory', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'freightCategory')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Freight Category' , prompt: 'Freight Category' , escapeHTML: true , showIf: 'true' , columnName: 'M_FreightCategory_ID' , inpColumnName: 'inpmFreightcategoryId' , referencedKeyColumnName: 'M_FreightCategory_ID' , targetEntity: 'ShippingFreightCategory' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'M_AttributeSet_ID' , inpColumnName: 'inpmAttributesetId' , referencedKeyColumnName: 'M_AttributeSet_ID' , targetEntity: 'AttributeSet' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'attributeSet._identifier',valueField: 'attributeSet', foreignKeyField: true, name: 'attributeSet', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'attributeSet')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Attribute Set' , prompt: 'Attribute Set' , escapeHTML: true , showIf: 'true' , columnName: 'M_AttributeSet_ID' , inpColumnName: 'inpmAttributesetId' , referencedKeyColumnName: 'M_AttributeSet_ID' , targetEntity: 'AttributeSet' } , { autoExpand: false, type: '_id_11', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'GuaranteeDays' , inpColumnName: 'inpguaranteedays' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'guaranteedDays', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Guaranteed Days' , prompt: 'Guaranteed Days' , escapeHTML: true , showIf: 'true' , columnName: 'GuaranteeDays' , inpColumnName: 'inpguaranteedays' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_10', editorProperties: { width: '' // note need to be repeated for editor fields , columnName: 'DownloadURL' , inpColumnName: 'inpdownloadurl' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'downloadURL')]", width: isc.OBGrid.getDefaultColumnWidth(60), name: 'downloadURL', canExport: true, canHide: true, editorType: 'OBTextItem' , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBTextItem' , title: 'Download URL' , prompt: 'Download URL' , escapeHTML: true , showIf: 'true' , columnName: 'DownloadURL' , inpColumnName: 'inpdownloadurl' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsVerified' , inpColumnName: 'inpisverified' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: false } , name: 'bOMVerified', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'BOM Verified' , prompt: 'BOM Verified' , escapeHTML: true , showIf: 'true' , columnName: 'IsVerified' , inpColumnName: 'inpisverified' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsPickListPrintDetails' , inpColumnName: 'inpispicklistprintdetails' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'printDetailsOnPickList', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Print Details on Pick List' , prompt: 'Print Details on Pick List' , escapeHTML: true , showIf: 'true' , columnName: 'IsPickListPrintDetails' , inpColumnName: 'inpispicklistprintdetails' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsBOM' , inpColumnName: 'inpisbom' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'billOfMaterials', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Bill of Materials' , prompt: 'Bill of Materials' , escapeHTML: true , showIf: 'true' , columnName: 'IsBOM' , inpColumnName: 'inpisbom' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsInvoicePrintDetails' , inpColumnName: 'inpisinvoiceprintdetails' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'printDetailsOnInvoice', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Print Details on Invoice' , prompt: 'Print Details on Invoice' , escapeHTML: true , showIf: 'true' , columnName: 'IsInvoicePrintDetails' , inpColumnName: 'inpisinvoiceprintdetails' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' , disabled: false , updatable: false } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'client._identifier',valueField: 'client', foreignKeyField: true, name: 'client', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'client')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Client' , prompt: 'Client' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'organization._identifier',valueField: 'organization', foreignKeyField: true, name: 'organization', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'organization')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Organization' , prompt: 'Organization' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ 'name', 'description', 'helpComment', 'comments', 'downloadURL', 'productCategory', 'taxCategory', 'uOM', 'salesRepresentative', 'storageBin', 'freightCategory', 'attributeSet', 'client', 'organization', 'uPCEAN', 'sKU', 'searchKey', 'imageURL', 'descriptionURL', 'attributeSetValue', 'classification' ], whereClause: '', orderByClause: '', sortField: 'searchKey', filterClause: '', filterName: '', foreignKeyFieldNames:[ 'productCategory', 'taxCategory', 'uOM', 'salesRepresentative', 'attributeSetValue', 'storageBin', 'freightCategory', 'attributeSet', 'client', 'organization' ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { this.addChildView( isc.OBStandardView.create({ tabTitle: 'Price', entity: 'PricingProductPrice', parentProperty: 'product', tabId: '421', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/Price', isAcctTab: false, isTrlTab: false, standardProperties:{ inpTabId: '421', inpwindowId: '236', inpTableId: '251', inpkeyColumnId: 'M_ProductPrice_ID', inpKeyName: 'inpmProductpriceId' }, propertyToColumns:[ { property: 'priceListVersion', inpColumn: 'inpmPricelistVersionId', dbColumn: 'M_PriceList_Version_ID', sessionProperty: false, type: '_id_19' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'listPrice', inpColumn: 'inppricelist', dbColumn: 'PriceList', sessionProperty: false, type: '_id_800008' }, { property: 'standardPrice', inpColumn: 'inppricestd', dbColumn: 'PriceStd', sessionProperty: false, type: '_id_800008' }, { property: 'priceLimit', inpColumn: 'inppricelimit', dbColumn: 'PriceLimit', sessionProperty: false, type: '_id_800008' }, { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'product', inpColumn: 'inpmProductId', dbColumn: 'M_Product_ID', sessionProperty: true, type: '_id_800011' }, { property: 'id', inpColumn: 'inpmProductpriceId', dbColumn: 'M_ProductPrice_ID', sessionProperty: false, type: '_id_13' }, { property: 'id', inpColumn: 'M_ProductPrice_ID', dbColumn: 'M_ProductPrice_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/PricingProductPrice' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , required: true , title: 'id' } , {name: 'priceListVersion', type: '_id_19', additional: false , canSave: false , title: 'priceListVersion' , hidden: true } , {name: 'priceListVersion._identifier' , type: 'text', hidden: true , canSave: false , title: 'priceListVersion' } , {name: 'product', type: '_id_800011', additional: false , required: true , title: 'product' , hidden: true } , {name: 'product._identifier' , type: 'text', hidden: true , title: 'product' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'listPrice', type: '_id_800008', additional: false , required: true , title: 'listPrice' } , {name: 'standardPrice', type: '_id_800008', additional: false , required: true , title: 'standardPrice' } , {name: 'priceLimit', type: '_id_800008', additional: false , required: true , title: 'priceLimit' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: 'priceListVersion', title: 'Price List Version', type: '_id_19', disabled: false, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'M_PriceList_Version_ID', inpColumnName: 'inpmPricelistVersionId', referencedKeyColumnName: 'M_PriceList_Version_ID', targetEntity: 'PricingPriceListVersion', required: true, width: '*', dummy: '' } , { name: 'active', title: 'Active', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsActive', inpColumnName: 'inpisactive', referencedKeyColumnName: '', targetEntity: '', required: false, "width":1,"overflow":"visible", dummy: '' } , { name: 'listPrice', title: 'Net List Price', type: '_id_800008', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'PriceList', inpColumnName: 'inppricelist', referencedKeyColumnName: '', targetEntity: '', required: true, "width":"50%", dummy: '' } , { name: 'standardPrice', title: 'Net Unit Price', type: '_id_800008', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'PriceStd', inpColumnName: 'inppricestd', referencedKeyColumnName: '', targetEntity: '', required: true, "width":"50%", dummy: '' } , { name: 'priceLimit', title: 'Net Price Limit', type: '_id_800008', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'PriceLimit', inpColumnName: 'inppricelimit', referencedKeyColumnName: '', targetEntity: '', required: true, "width":"50%", dummy: '' } , { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'M_PriceList_Version_ID' , inpColumnName: 'inpmPricelistVersionId' , referencedKeyColumnName: 'M_PriceList_Version_ID' , targetEntity: 'PricingPriceListVersion' , disabled: false , updatable: false } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'priceListVersion._identifier',valueField: 'priceListVersion', foreignKeyField: true, name: 'priceListVersion', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'priceListVersion')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Price List Version' , prompt: 'Price List Version' , escapeHTML: true , showIf: 'true' , columnName: 'M_PriceList_Version_ID' , inpColumnName: 'inpmPricelistVersionId' , referencedKeyColumnName: 'M_PriceList_Version_ID' , targetEntity: 'PricingPriceListVersion' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'active', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Active' , prompt: 'Active' , escapeHTML: true , showIf: 'true' , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_800008', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'PriceList' , inpColumnName: 'inppricelist' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'listPrice', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Net List Price' , prompt: 'Net List Price' , escapeHTML: true , showIf: 'true' , columnName: 'PriceList' , inpColumnName: 'inppricelist' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_800008', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'PriceStd' , inpColumnName: 'inppricestd' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'standardPrice', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Net Unit Price' , prompt: 'Net Unit Price' , escapeHTML: true , showIf: 'true' , columnName: 'PriceStd' , inpColumnName: 'inppricestd' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_800008', editorProperties: { "width":"50%" // note need to be repeated for editor fields , columnName: 'PriceLimit' , inpColumnName: 'inppricelimit' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'priceLimit', canExport: true, canHide: true, editorType: 'OBNumberItem' , canFilter:true, required: false, filterEditorType: 'OBNumberItem' , title: 'Net Price Limit' , prompt: 'Net Price Limit' , escapeHTML: true , showIf: 'true' , columnName: 'PriceLimit' , inpColumnName: 'inppricelimit' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' , disabled: false , updatable: false } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'client._identifier',valueField: 'client', foreignKeyField: true, name: 'client', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'client')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Client' , prompt: 'Client' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'organization._identifier',valueField: 'organization', foreignKeyField: true, name: 'organization', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'organization')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Organization' , prompt: 'Organization' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ 'priceListVersion', 'client', 'organization' ], whereClause: '', orderByClause: '', sortField: 'priceListVersion', filterClause: '', filterName: '', foreignKeyFieldNames:[ 'priceListVersion', 'client', 'organization' ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { } }) ); this.addChildView( isc.OBStandardView.create({ tabTitle: 'Accounting', entity: 'ProductAccounts', parentProperty: 'product', tabId: '422', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/Accounting', isAcctTab: true, isTrlTab: false, standardProperties:{ inpTabId: '422', inpwindowId: '236', inpTableId: '273', inpkeyColumnId: 'M_Product_Acct_ID', inpKeyName: 'inpmProductAcctId' }, propertyToColumns:[ { property: 'accountingSchema', inpColumn: 'inpcAcctschemaId', dbColumn: 'C_AcctSchema_ID', sessionProperty: false, type: '_id_19' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'productExpense', inpColumn: 'inppExpenseAcct', dbColumn: 'P_Expense_Acct', sessionProperty: false, type: '_id_25' }, { property: 'productRevenue', inpColumn: 'inppRevenueAcct', dbColumn: 'P_Revenue_Acct', sessionProperty: false, type: '_id_25' }, { property: 'fixedAsset', inpColumn: 'inppAssetAcct', dbColumn: 'P_Asset_Acct', sessionProperty: false, type: '_id_25' }, { property: 'productCOGS', inpColumn: 'inppCogsAcct', dbColumn: 'P_Cogs_Acct', sessionProperty: false, type: '_id_25' }, { property: 'purchasePriceVariance', inpColumn: 'inppPurchasepricevarianceAcct', dbColumn: 'P_PurchasePriceVariance_Acct', sessionProperty: false, type: '_id_25' }, { property: 'invoicePriceVariance', inpColumn: 'inppInvoicepricevarianceAcct', dbColumn: 'P_InvoicePriceVariance_Acct', sessionProperty: false, type: '_id_25' }, { property: 'tradeDiscountReceived', inpColumn: 'inppTradediscountrecAcct', dbColumn: 'P_TradeDiscountRec_Acct', sessionProperty: false, type: '_id_25' }, { property: 'tradeDiscountGranted', inpColumn: 'inppTradediscountgrantAcct', dbColumn: 'P_TradeDiscountGrant_Acct', sessionProperty: false, type: '_id_25' }, { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'product', inpColumn: 'inpmProductId', dbColumn: 'M_Product_ID', sessionProperty: true, type: '_id_30' }, { property: 'id', inpColumn: 'inpmProductAcctId', dbColumn: 'M_Product_Acct_ID', sessionProperty: false, type: '_id_13' }, { property: 'id', inpColumn: 'M_Product_Acct_ID', dbColumn: 'M_Product_Acct_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/ProductAccounts' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , required: true , title: 'id' } , {name: 'product', type: '_id_30', additional: false , canSave: false , title: 'product' , hidden: true } , {name: 'product._identifier' , type: 'text', hidden: true , canSave: false , title: 'product' } , {name: 'accountingSchema', type: '_id_19', additional: false , canSave: false , title: 'accountingSchema' , hidden: true } , {name: 'accountingSchema._identifier' , type: 'text', hidden: true , canSave: false , title: 'accountingSchema' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'productRevenue', type: '_id_25', additional: false , required: true , title: 'productRevenue' , hidden: true } , {name: 'productRevenue._identifier' , type: 'text', hidden: true , title: 'productRevenue' } , {name: 'productExpense', type: '_id_25', additional: false , required: true , title: 'productExpense' , hidden: true } , {name: 'productExpense._identifier' , type: 'text', hidden: true , title: 'productExpense' } , {name: 'fixedAsset', type: '_id_25', additional: false , title: 'fixedAsset' , hidden: true } , {name: 'fixedAsset._identifier' , type: 'text', hidden: true , title: 'fixedAsset' } , {name: 'purchasePriceVariance', type: '_id_25', additional: false , title: 'purchasePriceVariance' , hidden: true } , {name: 'purchasePriceVariance._identifier' , type: 'text', hidden: true , title: 'purchasePriceVariance' } , {name: 'invoicePriceVariance', type: '_id_25', additional: false , title: 'invoicePriceVariance' , hidden: true } , {name: 'invoicePriceVariance._identifier' , type: 'text', hidden: true , title: 'invoicePriceVariance' } , {name: 'productCOGS', type: '_id_25', additional: false , title: 'productCOGS' , hidden: true } , {name: 'productCOGS._identifier' , type: 'text', hidden: true , title: 'productCOGS' } , {name: 'tradeDiscountReceived', type: '_id_25', additional: false , title: 'tradeDiscountReceived' , hidden: true } , {name: 'tradeDiscountReceived._identifier' , type: 'text', hidden: true , title: 'tradeDiscountReceived' } , {name: 'tradeDiscountGranted', type: '_id_25', additional: false , title: 'tradeDiscountGranted' , hidden: true } , {name: 'tradeDiscountGranted._identifier' , type: 'text', hidden: true , title: 'tradeDiscountGranted' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: 'accountingSchema', title: 'Accounting Schema', type: '_id_19', disabled: false, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'C_AcctSchema_ID', inpColumnName: 'inpcAcctschemaId', referencedKeyColumnName: 'C_AcctSchema_ID', targetEntity: 'FinancialMgmtAcctSchema', required: true, width: '*', dummy: '' } , { name: 'active', title: 'Active', type: '_id_20', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'IsActive', inpColumnName: 'inpisactive', referencedKeyColumnName: '', targetEntity: '', required: false, "width":1,"overflow":"visible", dummy: '' } , { name: 'productExpense', title: 'Product Expense', type: '_id_25', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'P_Expense_Acct', inpColumnName: 'inppExpenseAcct', referencedKeyColumnName: 'C_ValidCombination_ID', targetEntity: 'FinancialMgmtAccountingCombination', required: true, displayField: 'productExpense._identifier', valueField: 'productExpense', showPickerIcon: true, "width":"*","searchUrl":"\/info\/Account.html","inFields":[{"columnName":"inpcAcctschemaId","parameterName":"inpAcctSchema"},{"columnName":"inpadOrgId","parameterName":"inpAD_Org_ID"}],"outFields":[], dummy: '' } , { name: 'productRevenue', title: 'Product Revenue', type: '_id_25', disabled: false, updatable: true, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: 'P_Revenue_Acct', inpColumnName: 'inppRevenueAcct', referencedKeyColumnName: 'C_ValidCombination_ID', targetEntity: 'FinancialMgmtAccountingCombination', required: true, displayField: 'productRevenue._identifier', valueField: 'productRevenue', showPickerIcon: true, "width":"*","searchUrl":"\/info\/Account.html","inFields":[{"columnName":"inpcAcctschemaId","parameterName":"inpAcctSchema"},{"columnName":"inpadOrgId","parameterName":"inpAD_Org_ID"}],"outFields":[], dummy: '' } , { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'C_AcctSchema_ID' , inpColumnName: 'inpcAcctschemaId' , referencedKeyColumnName: 'C_AcctSchema_ID' , targetEntity: 'FinancialMgmtAcctSchema' , disabled: false , updatable: false } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'accountingSchema._identifier',valueField: 'accountingSchema', foreignKeyField: true, name: 'accountingSchema', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'accountingSchema')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Accounting Schema' , prompt: 'Accounting Schema' , escapeHTML: true , showIf: 'true' , columnName: 'C_AcctSchema_ID' , inpColumnName: 'inpcAcctschemaId' , referencedKeyColumnName: 'C_AcctSchema_ID' , targetEntity: 'FinancialMgmtAcctSchema' } , { autoExpand: false, type: '_id_20', editorProperties: { "width":1,"overflow":"visible","showTitle":false,"showLabel":false // note need to be repeated for editor fields , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' , disabled: false , updatable: true } , name: 'active', canExport: true, canHide: true, editorType: 'OBCheckboxItem', width: 50, autoFitWidth: false, formatCellValue: function(value, record, rowNum, colNum, grid){return OB.Utilities.getYesNoDisplayValue(value);} , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBYesNoItem' , title: 'Active' , prompt: 'Active' , escapeHTML: true , showIf: 'true' , columnName: 'IsActive' , inpColumnName: 'inpisactive' , referencedKeyColumnName: '' , targetEntity: '' } , { autoExpand: true, type: '_id_25', editorProperties: { "width":"*","searchUrl":"\/info\/Account.html","inFields":[{"columnName":"inpcAcctschemaId","parameterName":"inpAcctSchema"},{"columnName":"inpadOrgId","parameterName":"inpAD_Org_ID"}],"outFields":[] // note need to be repeated for editor fields , columnName: 'P_Expense_Acct' , inpColumnName: 'inppExpenseAcct' , referencedKeyColumnName: 'C_ValidCombination_ID' , targetEntity: 'FinancialMgmtAccountingCombination' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'productExpense._identifier',valueField: 'productExpense', foreignKeyField: true, name: 'productExpense', canExport: true, canHide: true, editorType: 'OBSearchItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'productExpense')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Product Expense' , prompt: 'Product Expense' , escapeHTML: true , showIf: 'true' , columnName: 'P_Expense_Acct' , inpColumnName: 'inppExpenseAcct' , referencedKeyColumnName: 'C_ValidCombination_ID' , targetEntity: 'FinancialMgmtAccountingCombination' } , { autoExpand: true, type: '_id_25', editorProperties: { "width":"*","searchUrl":"\/info\/Account.html","inFields":[{"columnName":"inpcAcctschemaId","parameterName":"inpAcctSchema"},{"columnName":"inpadOrgId","parameterName":"inpAD_Org_ID"}],"outFields":[] // note need to be repeated for editor fields , columnName: 'P_Revenue_Acct' , inpColumnName: 'inppRevenueAcct' , referencedKeyColumnName: 'C_ValidCombination_ID' , targetEntity: 'FinancialMgmtAccountingCombination' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'productRevenue._identifier',valueField: 'productRevenue', foreignKeyField: true, name: 'productRevenue', canExport: true, canHide: true, editorType: 'OBSearchItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'productRevenue')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Product Revenue' , prompt: 'Product Revenue' , escapeHTML: true , showIf: 'true' , columnName: 'P_Revenue_Acct' , inpColumnName: 'inppRevenueAcct' , referencedKeyColumnName: 'C_ValidCombination_ID' , targetEntity: 'FinancialMgmtAccountingCombination' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' , disabled: false , updatable: false } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'client._identifier',valueField: 'client', foreignKeyField: true, name: 'client', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'client')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Client' , prompt: 'Client' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Client_ID' , inpColumnName: 'inpadClientId' , referencedKeyColumnName: 'AD_Client_ID' , targetEntity: 'ADClient' } , { autoExpand: true, type: '_id_19', editorProperties: { displayField: null, valueField: null // note need to be repeated for editor fields , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' , disabled: false , updatable: true } , width: isc.OBGrid.getDefaultColumnWidth(44), displayField: 'organization._identifier',valueField: 'organization', foreignKeyField: true, name: 'organization', canExport: true, canHide: true, editorType: 'OBFKItem', showHover: true, hoverHTML:"return record[(this.displayField ? this.displayField : 'organization')]" , filterOnKeypress: true, canFilter:true, required: false, filterEditorType: 'OBFKFilterTextItem' , title: 'Organization' , prompt: 'Organization' , escapeHTML: true , showIf: 'false' , columnName: 'AD_Org_ID' , inpColumnName: 'inpadOrgId' , referencedKeyColumnName: 'AD_Org_ID' , targetEntity: 'Organization' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ 'accountingSchema', 'productExpense', 'productRevenue', 'client', 'organization' ], whereClause: '', orderByClause: '', sortField: 'accountingSchema', filterClause: '', filterName: '', foreignKeyFieldNames:[ 'accountingSchema', 'productExpense', 'productRevenue', 'client', 'organization' ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { } }) ); } }) ); this.addChildView( isc.OBStandardView.create({ tabTitle: 'Assignment', entity: 'ResourceAssignment', parentProperty: 'resource', tabId: '415', moduleId: '0', defaultEditMode: false, mapping250: '/Resource/Assignment', isAcctTab: false, isTrlTab: false, standardProperties:{ inpTabId: '415', inpwindowId: '236', inpTableId: '485', inpkeyColumnId: 'S_ResourceAssignment_ID', inpKeyName: 'inpsResourceassignmentId' }, propertyToColumns:[ { property: 'name', inpColumn: 'inpname', dbColumn: 'Name', sessionProperty: false, type: '_id_10' }, { property: 'description', inpColumn: 'inpdescription', dbColumn: 'Description', sessionProperty: false, type: '_id_10' }, { property: 'confirmed', inpColumn: 'inpisconfirmed', dbColumn: 'IsConfirmed', sessionProperty: false, type: '_id_20' }, { property: 'quantity', inpColumn: 'inpqty', dbColumn: 'Qty', sessionProperty: false, type: '_id_29' }, { property: 'assignTo', inpColumn: 'inpassigndateto', dbColumn: 'AssignDateTo', sessionProperty: false, type: '_id_16' }, { property: 'assignFrom', inpColumn: 'inpassigndatefrom', dbColumn: 'AssignDateFrom', sessionProperty: false, type: '_id_16' }, { property: 'resource', inpColumn: 'inpsResourceId', dbColumn: 'S_Resource_ID', sessionProperty: false, type: '_id_19' }, { property: 'active', inpColumn: 'inpisactive', dbColumn: 'IsActive', sessionProperty: false, type: '_id_20' }, { property: 'organization', inpColumn: 'inpadOrgId', dbColumn: 'AD_Org_ID', sessionProperty: true, type: '_id_19' }, { property: 'client', inpColumn: 'inpadClientId', dbColumn: 'AD_Client_ID', sessionProperty: true, type: '_id_19' }, { property: 'id', inpColumn: 'inpsResourceassignmentId', dbColumn: 'S_ResourceAssignment_ID', sessionProperty: false, type: '_id_13' }, { property: 'id', inpColumn: 'S_ResourceAssignment_ID', dbColumn: 'S_ResourceAssignment_ID', sessionProperty: true, type: '_id_13' } ], actionToolbarButtons: [ ], showParentButtons: true, buttonsHaveSessionLogic: false, iconToolbarButtons: [ ], initWidget: function() { this.dataSource = /* jslint */ OB.Datasource.create({ createClassName: 'OBViewDataSource', titleField: OB.Constants.IDENTIFIER , dataURL:'/openbravo/org.openbravo.service.datasource/ResourceAssignment' , recordXPath: '/response/data', dataFormat: 'json' , operationBindings: [{operationType: 'fetch', dataProtocol: 'postParams', requestProperties:{httpMethod: 'POST'}} , {operationType: 'add', dataProtocol: 'postMessage'} , {operationType: 'remove', dataProtocol: 'postParams', requestProperties:{httpMethod: 'DELETE'}} , {operationType: 'update', dataProtocol: 'postMessage', requestProperties:{httpMethod: 'PUT'}} ], requestProperties : { params : { _className : 'OBViewDataSource' } }, fields:[ {name: 'id', type: '_id_13', additional: false , hidden: true, primaryKey: true , canSave: false , title: 'id' } , {name: 'client', type: '_id_19', additional: false , canSave: false , title: 'client' , hidden: true } , {name: 'client._identifier' , type: 'text', hidden: true , canSave: false , title: 'client' } , {name: 'organization', type: '_id_19', additional: false , required: true , title: 'organization' , hidden: true } , {name: 'organization._identifier' , type: 'text', hidden: true , title: 'organization' } , {name: 'active', type: '_id_20', additional: false , canSave: false , title: 'active' } , {name: 'creationDate', type: '_id_16', additional: false , canSave: false , title: 'creationDate' } , {name: 'createdBy', type: '_id_30', additional: false , canSave: false , title: 'createdBy' , hidden: true } , {name: 'createdBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'createdBy' } , {name: 'updated', type: '_id_16', additional: false , canSave: false , title: 'updated' } , {name: 'updatedBy', type: '_id_30', additional: false , canSave: false , title: 'updatedBy' , hidden: true } , {name: 'updatedBy._identifier' , type: 'text', hidden: true , canSave: false , title: 'updatedBy' } , {name: 'resource', type: '_id_19', additional: false , canSave: false , title: 'resource' , hidden: true } , {name: 'resource._identifier' , type: 'text', hidden: true , canSave: false , title: 'resource' } , {name: 'name', type: '_id_10', additional: false , required: true , length: 60 , title: 'name' } , {name: 'description', type: '_id_10', additional: false , length: 255 , title: 'description' } , {name: 'assignFrom', type: '_id_16', additional: false , canSave: false , title: 'assignFrom' } , {name: 'assignTo', type: '_id_16', additional: false , canSave: false , title: 'assignTo' } , {name: 'quantity', type: '_id_29', additional: false , canSave: false , title: 'quantity' } , {name: 'confirmed', type: '_id_20', additional: false , canSave: false , title: 'confirmed' } ]}) ; this.viewForm = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewForm.create({ fields: [ { name: '1000100001', title: 'Audit', type: 'OBAuditSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'Audit', itemIds: [ 'creationDate', 'createdBy', 'updated', 'updatedBy' ], dummy: '' } , { name: 'creationDate', title: 'Creation Date', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'createdBy', title: 'Created By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'createdBy._identifier', valueField: 'createdBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: 'updated', title: 'Updated', type: '_id_16', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: '', required: false, 'width': '*', dummy: '' } , { name: 'updatedBy', title: 'Updated By', type: '_id_30', disabled: true, updatable: false, parentProperty: false, colSpan: 1, rowSpan: 1, startRow: false, endRow: false, columnName: '', inpColumnName: '', referencedKeyColumnName: '', targetEntity: 'User', required: false, displayField: 'updatedBy._identifier', valueField: 'updatedBy', showPickerIcon: true, 'width': '*', dummy: '' } , { name: '_notes_', title: 'dummy', type: 'OBNoteSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_notes_Canvas' ], dummy: '' } , { name: '_notes_Canvas', title: 'dummy', type: 'OBNoteCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_linkedItems_', title: 'dummy', type: 'OBLinkedItemSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_linkedItems_Canvas' ], dummy: '' } , { name: '_linkedItems_Canvas', title: 'dummy', type: 'OBLinkedItemCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } , { name: '_attachments_', title: 'dummy', type: 'OBAttachmentsSectionItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, sectionExpanded: false, defaultValue: 'dummy', itemIds: [ '_attachments_Canvas' ], dummy: '' } , { name: '_attachments_Canvas', title: '', type: 'OBAttachmentCanvasItem', disabled: false, updatable: true, parentProperty: false, colSpan: 4, rowSpan: 1, startRow: true, endRow: true, dummy: '' } ], statusBarFields: [ ], // except for the fields all other form properties should be added to the formProperties // the formProperties are re-used for inline grid editing obFormProperties: { onFieldChanged: function(form, item, value) { var f = form || this, context = this.view.getContextInfo(false, true), currentValues = f.view.getCurrentValues(), otherItem; } } }) ; this.viewGrid = /* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2010-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ isc.OBViewGrid.create({ fields:[ , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'creationDate' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'creationDate', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Creation Date' , prompt: 'Creation Date' , escapeHTML: true , showIf: 'false' , columnName: 'creationDate' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'createdBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'createdBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'createdBy._identifier',valueField: 'createdBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Created By' , prompt: 'Created By' , escapeHTML: true , showIf: 'false' , columnName: 'createdBy' , inpColumnName: '' , targetEntity: 'User' } , { autoExpand: false, type: '_id_16', editorProperties: { width: '*' , columnName: 'updated' , targetEntity: '' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updated', canExport: true, canHide: true, editorType: 'OBDateItem', filterEditorType: 'OBMiniDateRangeItem', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated' , prompt: 'Updated' , escapeHTML: true , showIf: 'false' , columnName: 'updated' , inpColumnName: '' , targetEntity: '' } , { autoExpand: false, type: '_id_30', editorProperties: { width: '*' , columnName: 'updatedBy' , targetEntity: 'User' , disabled: true , updatable: false } , showHover: false, width: isc.OBGrid.getDefaultColumnWidth(30), name: 'updatedBy', canExport: true, canHide: true, editorType: 'OBSearchItem', filterEditorType: 'OBFKFilterTextItem', displayField: 'updatedBy._identifier',valueField: 'updatedBy', filterOnKeypress: true, canFilter:true, required: false , title: 'Updated By' , prompt: 'Updated By' , escapeHTML: true , showIf: 'false' , columnName: 'updatedBy' , inpColumnName: '' , targetEntity: 'User' } ], autoExpandFieldNames:[ ], whereClause: '', orderByClause: '', sortField: '', filterClause: '', filterName: '', foreignKeyFieldNames:[ ] }) ; this.Super('initWidget', arguments); }, createViewStructure: function() { } }) ); } } });