details: https://code.openbravo.com/erp/devel/main/rev/e34e15764357 changeset: 21411:e34e15764357 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Thu Nov 07 22:01:27 2013 +0530 summary: Fixes Issue 0025104: Error when trying to personalize form
Proper comparison is done on getValue before fetching focus item value. details: https://code.openbravo.com/erp/devel/main/rev/cd9fd2e25fc5 changeset: 21412:cd9fd2e25fc5 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Fri Nov 08 15:43:00 2013 +0530 summary: Related to Issue 0025104:Remove unnecessary check details: https://code.openbravo.com/erp/devel/main/rev/619ea1931529 changeset: 21413:619ea1931529 user: Victor Villar <victor.villar <at> openbravo.com> date: Fri Nov 08 15:43:58 2013 +0100 summary: Fixed issue 25100:Production cost is not calculated in instances with the old cost engine details: https://code.openbravo.com/erp/devel/main/rev/759b6aeb8161 changeset: 21414:759b6aeb8161 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Wed Nov 13 14:01:03 2013 +0530 summary: Fixes Issue 0025131: Not possible to enter numeric values in some fields if they are used in a display logic There may be cases if the value is an number within 10 digits, it is identified as an UUID. In that case check is done to confirm whether it is indeed UUID by checking if it is available in the valueMap. details: https://code.openbravo.com/erp/devel/main/rev/04976ad96632 changeset: 21415:04976ad96632 user: Martin Taal <martin.taal <at> openbravo.com> date: Tue Nov 05 17:42:51 2013 +0100 summary: Fixes issue 25015: Many instances of WidgetClass consuming tomcat memory The ComponentProviders are applicationscoped, this ment that the member instances and its references were maintained throughout the lifetime of the application. Causing each time a new component being created and stored there. The change creates a new instance dynamically all the time. details: https://code.openbravo.com/erp/devel/main/rev/ebd9cde2e5d8 changeset: 21416:ebd9cde2e5d8 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Nov 15 09:47:05 2013 +0100 summary: fixed bug 25119: problem with grid configuration and field grouping Don't apply grouping grid configuration till dataset callback as grouping is done in client side with grid's data it expects data to be present details: https://code.openbravo.com/erp/devel/main/rev/32b7d585b886 changeset: 21417:32b7d585b886 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Nov 15 10:52:43 2013 +0100 summary: fixed bug 25119: problem with grid configuration and field grouping Remove grouping when deleting filters in case of filter clause details: https://code.openbravo.com/erp/devel/main/rev/22144d58fbc0 changeset: 21418:22144d58fbc0 user: RM packaging bot <staff.rm <at> openbravo.com> date: Fri Nov 15 10:31:00 2013 +0000 summary: dummy commit to update obx version details: https://code.openbravo.com/erp/devel/main/rev/973658ab4d1b changeset: 21419:973658ab4d1b user: RM packaging bot <staff.rm <at> openbravo.com> date: Fri Nov 15 10:31:23 2013 +0000 summary: dummy commit to update obx version diffstat: lib/README | 4 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js | 3 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js | 6 ++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js | 18 ++++++++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js | 11 +++++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js | 2 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js | 13 ++++++- modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java | 11 +----- src-db/database/model/functions/MA_PRODUCTION_COST.xml | 12 +++--- 9 files changed, 53 insertions(+), 27 deletions(-) diffs (221 lines): diff -r 2d6c59f6dc4a -r 973658ab4d1b lib/README --- a/lib/README Fri Nov 01 00:47:21 2013 +0100 +++ b/lib/README Fri Nov 15 10:31:23 2013 +0000 @@ -1,3 +1,3 @@ -When adding or removing libraries to Openbravo ERP please update this page -with your changes: +When adding or removing libraries to Openbravo ERP please update this page +with your changes: http://wiki.openbravo.com/wiki/Openbravo_Libraries diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js Fri Nov 15 10:31:23 2013 +0000 @@ -193,7 +193,8 @@ this.valueMap = {}; this.valueMap[value] = ''; return ''; - } else if (!this.valueMap[value] && OB.Utilities.isUUID(value)) { + } //there may be cases if the value is an number within 10 digits, it is identified as an UUID. In that case check is done to confirm whether it is indeed UUID by checking if it is available in the valueMap. + else if (!this.valueMap[value] && OB.Utilities.isUUID(value) && this.valueMap.hasOwnProperty(value)) { return ''; } } diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Fri Nov 15 10:31:23 2013 +0000 @@ -1944,11 +1944,13 @@ var focusItemValue; this._isRedrawing = true; //fetch the focus item value as it is lost sometimes during reflow. Refer issue https://issues.openbravo.com/view.php?id=24960 - focusItemValue = this.getFocusItem() !== null ? this.getFocusItem().getValue() : null; + if (this.getFocusItem()) { + focusItemValue = this.getFocusItem().getValue(); + } this.Super('redraw', arguments); delete this._isRedrawing; //reset focus item value if lost - if (focusItemValue !== null && this.getFocusItem() !== null && this.getFocusItem().getValue() !== focusItemValue) { + if (focusItemValue && this.getFocusItem() && this.getFocusItem().getValue() !== focusItemValue) { this.getFocusItem().setValue(focusItemValue); } if (this.selectOnFocusStored) { diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js Fri Nov 15 10:31:23 2013 +0000 @@ -579,13 +579,25 @@ clearFilter: function (keepFilterClause, noPerformAction) { var i = 0, - fld, length; + fld, length, groupState, forceRefresh; if (!keepFilterClause) { // forcing fetch from server in case default filters are removed, in other // cases adaptive filtering can be used if possible if (this.data) { - this.data.forceRefresh = this.filterClause || this.sqlFilterClause; - delete this.data.context.params._where; + forceRefresh = this.filterClause || this.sqlFilterClause; + + groupState = this.getGroupState(); + if (forceRefresh && groupState && groupState.groupByFields) { + // in case of field grouping and filter clause, remove filter grouping + // because when filter clause is removed data could be bigger than the + // amount allowed by grouping + this.setGroupState(null); + } + + this.data.forceRefresh = forceRefresh; + if (this.data.context && this.data.context.params) { + delete this.data.context.params._where; + } } delete this.filterClause; diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Fri Nov 15 10:31:23 2013 +0000 @@ -991,7 +991,7 @@ return '(' + isc.Comm.serialize(state, false) + ')'; }, - setViewState: function (state) { + setViewState: function (state, settingDefault) { var localState, i, fld, hasSummaryFunction; localState = this.evalViewState(state, 'viewState'); @@ -1038,6 +1038,15 @@ this.deleteSelectedParentRecordFilter(localState); + if (settingDefault && localState.group && localState.group.groupByFields) { + // Setting default view, at this point fetch data is not already performed, + // confings as field group are done in local with data, so not applying them + // till fetch callback. Marking now grid to reaply state afterwards + // see issue #25119 + this.requiredReapplyViewState = true; + localState.group.groupByFields = ''; + } + this.Super('setViewState', ['(' + isc.Comm.serialize(localState, false) + ')']); // Focus on the first filterable item diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js Fri Nov 15 10:31:23 2013 +0000 @@ -297,7 +297,7 @@ // -Grid is not rendered twice (one for the standard confing and another // one for the saved config) if (this.standardWindow && this.standardWindow.viewState && this.standardWindow.viewState[this.tabId]) { - this.viewGrid.setViewState(this.standardWindow.viewState[this.tabId]); + this.viewGrid.setViewState(this.standardWindow.viewState[this.tabId], true); // lastViewApplied is set because there are modifications in grid, so not // marking "Standard View" in view's menu this.standardWindow.lastViewApplied = true; diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js Fri Nov 15 10:31:23 2013 +0000 @@ -99,7 +99,8 @@ // Apply a selected view definition to a window OB.Personalization.applyViewDefinition = function (persId, viewDefinition, standardWindow) { var i, view, viewTabDefinition, length = standardWindow.views.length, - windowDefinition = viewDefinition.window; + windowDefinition = viewDefinition.window, + fetchCallback; // delete the current form personalization // as these will be overwritten by the new settings @@ -144,6 +145,14 @@ } } + fetchCallback = function () { + if (view.viewGrid.requiredReapplyViewState && standardWindow.viewState[view.tabId]) { + // personalization requires to be reapplied for this view in data fetch callback + view.viewGrid.setViewState(standardWindow.viewState[view.tabId]); + delete view.viewGrid.requiredReapplyViewState; + } + }; + // the viewdefinition contains both the global info (form, canDelete, personalizationid) // set the view state for each tab for (i = 0; i < length; i++) { @@ -164,7 +173,7 @@ //clear grouping, will be applied later view.viewGrid.clearGroupBy(); view.viewGrid.setViewState(viewTabDefinition.grid); - view.viewGrid.refreshContents(); + view.viewGrid.refreshContents(fetchCallback); } if (viewTabDefinition.form) { OB.Personalization.personalizeForm(viewTabDefinition, view.viewForm); diff -r 2d6c59f6dc4a -r 973658ab4d1b modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java --- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java Fri Nov 01 00:47:21 2013 +0100 +++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java Fri Nov 15 10:31:23 2013 +0000 @@ -25,10 +25,7 @@ import java.util.List; import java.util.Map; -import javax.enterprise.inject.Any; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; - +import org.openbravo.base.weld.WeldUtils; import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource.ComponentResourceType; import org.openbravo.model.ad.module.Module; @@ -43,10 +40,6 @@ private static Map<String, List<String>> appDependencies = new HashMap<String, List<String>>(); - @Inject - @Any - private Instance<Component> components; - /** * Return a component of the correct implementation using Weld. * @@ -55,7 +48,7 @@ * @return an instance of clz */ protected <U extends Component> U getComponent(Class<U> clz) { - return (U) components.select(clz).get(); + return (U) WeldUtils.getInstanceFromStaticBeanManager(clz); } public Module getModule() { diff -r 2d6c59f6dc4a -r 973658ab4d1b src-db/database/model/functions/MA_PRODUCTION_COST.xml --- a/src-db/database/model/functions/MA_PRODUCTION_COST.xml Fri Nov 01 00:47:21 2013 +0100 +++ b/src-db/database/model/functions/MA_PRODUCTION_COST.xml Fri Nov 15 10:31:23 2013 +0000 @@ -198,8 +198,8 @@ AND ppl.PRODUCTIONTYPE = '-' AND ppl.M_PRODUCTIONPLAN_ID = Cur_ProductionPlan.M_PRODUCTIONPLAN_ID AND c.ISPRODUCTION='Y' - AND c.COSTTYPE = 'AVA' - AND v_iscostmigrated = 'Y') LOOP + AND ((c.COSTTYPE = 'AVA' AND v_iscostmigrated = 'Y') + OR (c.COSTTYPE = 'AV' AND v_iscostmigrated = 'N'))) LOOP v_ProductionCost_Tmp := v_ProductionCost_Tmp + COALESCE(Cur_WIP.cost,0); UPDATE M_PRODUCTIONLINE SET calccost = COALESCE(Cur_WIP.cost, 0) @@ -217,8 +217,8 @@ AND ppl.PRODUCTIONTYPE = '-' AND ppl.M_PRODUCTIONPLAN_ID = Cur_ProductionPlan.M_PRODUCTIONPLAN_ID AND c.ISPRODUCTION='N' - AND c.COSTTYPE = 'AVA' - AND v_iscostmigrated = 'Y' + AND ((c.COSTTYPE = 'AVA' AND v_iscostmigrated = 'Y') + OR (c.COSTTYPE = 'AV' AND v_iscostmigrated = 'N')) AND NOT EXISTS (SELECT 1 FROM M_COSTING, M_PRODUCTIONLINE WHERE M_COSTING.M_PRODUCT_ID = M_PRODUCTIONLINE.M_PRODUCT_ID @@ -227,8 +227,8 @@ AND M_PRODUCTIONLINE.PRODUCTIONTYPE = '-' AND M_PRODUCTIONLINE.M_PRODUCT_ID = c.M_Product_ID AND M_COSTING.ISPRODUCTION='Y' - AND c.COSTTYPE = 'AVA' - AND v_iscostmigrated = 'Y')) LOOP + AND ((M_COSTING.COSTTYPE = 'AVA' AND v_iscostmigrated = 'Y') + OR (M_COSTING.COSTTYPE = 'AV' AND v_iscostmigrated = 'N')))) LOOP v_ProductionCost_Tmp := v_ProductionCost_Tmp + COALESCE(Cur_RawMaterial.cost,0); UPDATE M_PRODUCTIONLINE SET calccost = COALESCE(Cur_RawMaterial.cost, 0) ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits