details: https://code.openbravo.com/erp/devel/main/rev/45c65c777ccf changeset: 20069:45c65c777ccf user: RM packaging bot <staff.rm <at> openbravo.com> date: Tue Apr 09 11:34:18 2013 +0200 summary: CI: merge back from main
details: https://code.openbravo.com/erp/devel/main/rev/d3651e2ab4bd changeset: 20070:d3651e2ab4bd user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Thu Apr 04 12:33:39 2013 +0200 summary: fixed bug 23482: Alert Management fails in ORA having more than 1000 alerts if those alerts belong to Alert Rules with a Filter Clause details: https://code.openbravo.com/erp/devel/main/rev/c0e933f438dc changeset: 20071:c0e933f438dc user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Mon Apr 08 14:01:36 2013 +0200 summary: Fixes issue 23011: Enables using simple functions in HQL order by clause Now it is possible to use one argument functions (i.e. abs(), max(), min(), etc) as part of the HQL order by clauses. A regular expression is used to check if the orderByParam matches the pattern functionName + '(' + property + ')' + 'desc' (optional). If so, it retrieves the function name and the property name, and resolves the property name. After doing it, it wrappes the resolved property name in its function and adds ' desc' if the function was meant to be sorted in descending order. details: https://code.openbravo.com/erp/devel/main/rev/34d65cbdfce2 changeset: 20072:34d65cbdfce2 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Fri Apr 05 11:09:03 2013 +0200 summary: Fixes bug 22997: Manual processes are not always disabled using SecuredProcess When the SecuredProcess preference was set to 'Y', all manual processes were being disabled, and only the defined processes (new ones) that the user has explicit access to were enabled. This has been fixed, so the manual processes that the user has been given access to will also be enabled. details: https://code.openbravo.com/erp/devel/main/rev/2954f1342025 changeset: 20073:2954f1342025 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Tue Apr 09 15:57:15 2013 +0200 summary: Fixes issue 23492: Fixed definition of the OBUIAPP_Process_Access.Role column The Role column of the OBUIAPP_Process_Access table was not defined as IsParent. That meant that when the context info is sent to the datasource, the value of the AD_ROLE_ID property is the ID of the role the user has logged in, instead of the id of the role selected in the Role tab. details: https://code.openbravo.com/erp/devel/main/rev/1644bef3264b changeset: 20074:1644bef3264b user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Thu Apr 04 13:51:18 2013 +0200 summary: Fixes issue 23294: Parameter windows show messages with title and text The function handleResponse was not showing the messages properly. At that point, the severity and the message text are available, and the message was being displayed like this: messageBar.setMessage(message.severity, message.text). The first argument of the function is the severity, the second the message title and the third one (not used here), the message text. The way it was being called, the message text was shown in the message bar title. To fix this problem, the function is now used like this: messageBar.setMessage(message.severity, null, message.text); This way, the message title is retrieved using the severity, and the message text is shown in its place. details: https://code.openbravo.com/erp/devel/main/rev/4779f4c26f1b changeset: 20075:4779f4c26f1b user: David Baz Fayos <david.baz <at> openbravo.com> date: Tue Apr 09 16:04:50 2013 +0200 summary: [calendar] Added filterOnReadableOrgs/Clients capabilities to DataEntityQueryService details: https://code.openbravo.com/erp/devel/main/rev/40e52e08c85c changeset: 20076:40e52e08c85c user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Tue Apr 09 16:17:49 2013 +0200 summary: Fixes bug 23474: Selectors work with identifiers that contains carriage return Before this fix, if the identifier of a record provided by a selector contained a carriage return, the selector was not able to obtain the record id using its identifier. This happened because the identifier was stored in the valuemap with its carriage returns, but then the identifier passed to retrieve the record ID did not contain the carriage return, so there was n o match. This has been fixed by removing the carriage returns before storing the identifiers in the value map. details: https://code.openbravo.com/erp/devel/main/rev/34bd5703caa2 changeset: 20077:34bd5703caa2 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Tue Apr 09 16:31:11 2013 +0200 summary: Fixes issue 23331: Proper value is stored into System.properties Originally, all the properties of Openbravo.properties are stored as Strings, so when a property is retrieved using the System.getProperties.get(keyValue) method, the user can assume that a String is returned. The problem described in this issue is that in the HttpsUtils class a boolean property is being stored as boolean (System.getProperties().put("proxySet"), false), when it should be stored as a string (System.getProperties().put("proxySet"), "false"); details: https://code.openbravo.com/erp/devel/main/rev/6b34ef9b837f changeset: 20078:6b34ef9b837f user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Tue Apr 09 16:38:21 2013 +0200 summary: Fixes issue 23431: It is possible to send several emails at the same time The pocData attribute of the PrintController class stores the email attachments. The problem was that this property was global and shared among all threads, so it was not possible to send several emails at the same time, because in that case the attachment sent in the concurrent emails was the one generated the last time the Send Email button was pushed. This has been fixed by storing the pocData of each email as a session attribute, using as a key the document number and the table name. This way pocData is no longer shared among threads, each thread has its own instance of pocData stored as a session attribute. Once the email is sent, the pocData is removed from the session. details: https://code.openbravo.com/erp/devel/main/rev/84a2a4d680e1 changeset: 20079:84a2a4d680e1 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Wed Apr 10 07:32:00 2013 +0530 summary: Fixes Issue 23124, Related to Issue 23267 : Selectors as Identifiers When comparing selector columns in ComboData the column name in the table was used to compare with the selector table. This results in exception when the column names are different. In case the selector has the column field, that column is used for comparison avoiding this error. details: https://code.openbravo.com/erp/devel/main/rev/acc7b1648fdf changeset: 20080:acc7b1648fdf user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Mon Apr 08 11:55:43 2013 +0530 summary: Fixes Issue 0023500 : Added missing fields in Copy Fields and Copy Window Tabs. details: https://code.openbravo.com/erp/devel/main/rev/8a61ab52b20b changeset: 20081:8a61ab52b20b user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Sun Apr 07 13:56:44 2013 +0530 summary: Fixes Issue 0022304: Ignoring computed columns for foreign key validation Computed columns are ignored when columns are checked for foreign key constraints details: https://code.openbravo.com/erp/devel/main/rev/f01340771e75 changeset: 20082:f01340771e75 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Wed Apr 10 08:08:20 2013 +0530 summary: Fixes Issue 0022528: Field Categories can be collapsed by default Added a new field collapse in Field Category that will allow the field category to be collapsed by default. details: https://code.openbravo.com/erp/devel/main/rev/5105fc28007c changeset: 20083:5105fc28007c user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Tue Apr 09 13:46:43 2013 +0200 summary: 22823: In sales order window, at lines tab, line details are not in sequence details: https://code.openbravo.com/erp/devel/main/rev/7998ac1a0708 changeset: 20084:7998ac1a0708 user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Tue Apr 09 16:06:16 2013 +0200 summary: Related to issue 22823 details: https://code.openbravo.com/erp/devel/main/rev/2000ebef0b54 changeset: 20085:2000ebef0b54 user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Tue Apr 09 16:58:21 2013 +0200 summary: Fixes issue 23499: Wrong Balance Sheet when year is closed. details: https://code.openbravo.com/erp/devel/main/rev/d36079a788dd changeset: 20086:d36079a788dd user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Wed Apr 10 11:05:37 2013 +0200 summary: Fixes issue 22246, fixes issue 22073: Prevents false validation error When a new line is created while another line is being edited, the function hideInlineEditor of ob-view-grid is called. In this method the values of the form are cleared. The root cause of this problem is that even though the values of the fields are cleared, the property _editorEnterValue of selectors and fk items is not cleared. This results that the value of those fields is different than the value of its _editorEnterValue property, so the validation is done, and in this particular case it fails because the field is mandatory and its value is null. This has been fixed by clearing the _editorEnterValue property of selectors and fk fields when their values are being cleared. details: https://code.openbravo.com/erp/devel/main/rev/c64b432fa5ab changeset: 20087:c64b432fa5ab user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Wed Apr 10 16:32:33 2013 +0530 summary: Fixes Issue 0023270: Disallow printing more than one business partner The Business partner print button provides statistics about the business partner transactions in a pop up and so handling multiple records are not allowed. details: https://code.openbravo.com/erp/devel/main/rev/98618b94c5c2 changeset: 20088:98618b94c5c2 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Wed Apr 10 17:17:12 2013 +0530 summary: Related to Issue 23270 : Code Refactoring details: https://code.openbravo.com/erp/devel/main/rev/ba3def3d6afd changeset: 20089:ba3def3d6afd user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Wed Apr 10 15:49:11 2013 +0200 summary: Fixed bug 23527 Reset accounting is not work properly with filter dates details: https://code.openbravo.com/erp/devel/main/rev/e20a1ba38e32 changeset: 20090:e20a1ba38e32 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Wed Apr 10 17:22:29 2013 +0200 summary: Related to issue 23294: Enables specifying both text and title for messages The fix has been changed, so instead of using always a default title, it will only do it when no title is provided. Otherwise, it will use the provided title. details: https://code.openbravo.com/erp/devel/main/rev/57cbb59b1aca changeset: 20091:57cbb59b1aca user: David Miguelez <david.miguelez <at> openbravo.com> date: Wed Apr 10 19:32:57 2013 +0200 summary: Fixes Issue 23528. Adds ModuleScript for updating the column that sets the button names. details: https://code.openbravo.com/erp/devel/main/rev/b7ba003bc841 changeset: 20092:b7ba003bc841 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Tue Apr 09 10:56:16 2013 +0200 summary: Fixes issue 23408: avoid a_amortizationline_trg trigger error details: https://code.openbravo.com/erp/devel/main/rev/158818c4f91e changeset: 20093:158818c4f91e user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Thu Apr 11 21:29:59 2013 +0530 summary: Related to Issue 0022528 : Added check constraint for iscollapsed field details: https://code.openbravo.com/erp/devel/main/rev/66ccc861d1d5 changeset: 20094:66ccc861d1d5 user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Fri Apr 12 07:03:47 2013 +0530 summary: Related to Issue 22528 : Backed out changeset 158818c4f91e Backed out the changeset as it adds the check constraint to isActive column instead of isCollapsed. Fails API Tests. details: https://code.openbravo.com/erp/devel/main/rev/8f1178c8535a changeset: 20095:8f1178c8535a user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Fri Apr 12 07:23:33 2013 +0530 summary: Related to issue 22528 : Added check constraint for iscollapsed column. details: https://code.openbravo.com/erp/devel/main/rev/c1e602ffd4dd changeset: 20096:c1e602ffd4dd user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Thu Apr 11 16:58:35 2013 +0200 summary: Fixes issue 22820: Inactive price list can be selected in product selector. details: https://code.openbravo.com/erp/devel/main/rev/a85c6b9c9d5a changeset: 20097:a85c6b9c9d5a user: Ioritz Cia <ioritz.cia <at> openbravo.com> date: Thu Apr 11 17:00:11 2013 +0200 summary: Fixes issue 23239: Work requirement window can not be filtered by status. details: https://code.openbravo.com/erp/devel/main/rev/c7d8b83ebf26 changeset: 20098:c7d8b83ebf26 user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Fri Apr 12 11:38:40 2013 +0200 summary: Related to issue 23148 details: https://code.openbravo.com/erp/devel/main/rev/af8bd60362ce changeset: 20099:af8bd60362ce user: David Miguelez <david.miguelez <at> openbravo.com> date: Fri Apr 12 12:31:11 2013 +0200 summary: Fixes Issue 23176. Updates ModuleScript to set the Accounting Entries of the Divide Up Accounting group to Divide Up Acctype. details: https://code.openbravo.com/erp/devel/main/rev/b9b325f20af8 changeset: 20100:b9b325f20af8 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Tue Apr 09 14:22:51 2013 +0530 summary: Fixes Issue 22533 : hide Accounting Dimension section from Initial client setup details: https://code.openbravo.com/erp/devel/main/rev/8914bb588a56 changeset: 20101:8914bb588a56 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Mon Apr 15 10:40:37 2013 +0200 summary: Related to issue 22997: Replace hardcoded ID with parameter details: https://code.openbravo.com/erp/devel/main/rev/9e3e972eb6d8 changeset: 20102:9e3e972eb6d8 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Mon Apr 15 11:15:53 2013 +0200 summary: Fixes issue 23433: Modified date autocompletion to support MM-DD-YYYY format The date autocompletion has been modified. Before this fix, If only one or two digits were entered, they represented the first date part of the format (number of days in DD-MM-YYYY format, number of months in MM-DD-YYYY format). Now, if only one or two digits are entered they will represent the number of days, regardless of the date format being used. The rest of the date parts will be autocompleted as usual, using the current month and year. details: https://code.openbravo.com/erp/devel/main/rev/b96b3181a12a changeset: 20103:b96b3181a12a user: Shankar Balachandran <shankar.balachandran <at> openbravo.com> date: Mon Apr 15 16:58:55 2013 +0530 summary: Fixes Issue 0023545: Window field filters are not translated in Menu Resolves translation of the all fields in the filter. details: https://code.openbravo.com/erp/devel/main/rev/466f47a126b4 changeset: 20104:466f47a126b4 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Mon Apr 15 13:39:38 2013 +0200 summary: Fixes issue 23549: Added missing indexes details: https://code.openbravo.com/erp/devel/main/rev/46bf40360c73 changeset: 20105:46bf40360c73 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Tue Apr 09 17:45:00 2013 +0200 summary: fixed issue 23518: Restrict Access to Portal sessions -Web Services: json and xml webservices shouldn't be accessible to portal sessions -ActionHandlers: only the ones that are explicitly set to be accessible by portal should be executable -Datasources: only the ones that are explicitly set to be accessible by portal should be executable. Specially default one used to retrieve grid data shouldn't be accessible -Query List widget datasources: They should be accessible details: https://code.openbravo.com/erp/devel/main/rev/08d5a13b722b changeset: 20106:08d5a13b722b user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Wed Apr 10 10:01:55 2013 +0200 summary: fixed issue 23520: Restrict access to query list widgets details: https://code.openbravo.com/erp/devel/main/rev/896e36129e9a changeset: 20107:896e36129e9a user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Mon Apr 15 08:17:58 2013 +0200 summary: related to issue 23518: added missing file details: https://code.openbravo.com/erp/devel/main/rev/b69625663ccc changeset: 20108:b69625663ccc user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Mon Apr 15 13:49:03 2013 +0200 summary: fixed issue 23550: improved MenuManager resources consumption Now GlobalMenu is application scoped sharing a "global generic" menu among different sessions, preventing menu computation for each of them. details: https://code.openbravo.com/erp/devel/main/rev/cfde329684a2 changeset: 20109:cfde329684a2 user: David Miguelez <david.miguelez <at> openbravo.com> date: Thu Apr 11 17:47:12 2013 +0200 summary: Fixes Issue 23365. Checks if Accounting Date belongs to the Period set by the User. details: https://code.openbravo.com/erp/devel/main/rev/43ef7faccea0 changeset: 20110:43ef7faccea0 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Mon Apr 15 14:37:12 2013 +0530 summary: Fixes issue 23472: Accounting standard in general ledger configuration should be hidden details: https://code.openbravo.com/erp/devel/main/rev/cc93df75113f changeset: 20111:cc93df75113f user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Mon Apr 15 16:53:17 2013 +0200 summary: Fixes issue 23040: Removed 'GLOBAL' from postgresql prescript. As stated here [1] the use of GLOBAL has been deprecated in postgresql. [1] http://www.postgresql.org/message-id/[email protected] details: https://code.openbravo.com/erp/devel/main/rev/ef38b251364b changeset: 20112:ef38b251364b user: RM packaging bot <staff.rm <at> openbravo.com> date: Mon Apr 15 20:59:01 2013 +0200 summary: Merge back from main details: https://code.openbravo.com/erp/devel/main/rev/4cd1496d2fca changeset: 20113:4cd1496d2fca user: David Baz Fayos <david.baz <at> openbravo.com> date: Mon Apr 15 22:28:48 2013 +0200 summary: [calendar] Added 'doPreFilterData' method to OBCalendar details: https://code.openbravo.com/erp/devel/main/rev/8df08bea850d changeset: 20114:8df08bea850d user: RM packaging bot <staff.rm <at> openbravo.com> date: Tue Apr 16 19:00:11 2013 +0200 summary: CI: update AD_MODULE to version 20113 diffstat: .hgsigs | 1 + .hgtags | 1 + modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 4 +- modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 8 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java | 3 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java | 289 ++++++ modules/org.openbravo.client.application/src/org/openbravo/client/application/HeartBeatPopupActionHandler.java | 3 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/LogOutActionHandler.java | 5 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java | 439 +++------ modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java | 3 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/StorePropertyActionHandler.java | 3 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java | 21 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/event/MenuCacheHandler.java | 104 ++ modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java | 3 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ImagesActionHandler.java | 5 +- modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java | 7 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js | 33 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js | 8 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js | 12 + modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk.js | 7 + modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js | 12 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js | 7 + modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 6 +- modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java | 13 + modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 4 +- modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoActionHandler.java | 3 +- modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml | 12 + modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java | 34 +- modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 10 +- modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java | 12 +- modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 4 +- modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java | 33 +- modules/org.openbravo.service.json/src/org/openbravo/service/json/DataEntityQueryService.java | 28 +- modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java | 2 +- modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonRestServlet.java | 8 + modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 12 +- modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/SelectorUIReference.java | 11 +- modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js | 8 +- modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 6 +- modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 6 +- modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 24 +- modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 18 +- src-db/database/model/functions/AD_TAB_COPY.xml | 8 +- src-db/database/model/functions/AD_WINDOW_COPY.xml | 8 +- src-db/database/model/functions/GL_JOURNAL_POST.xml | 12 + src-db/database/model/prescript-PostgreSql.sql | 4 +- src-db/database/model/tables/AD_ALERT.xml | 3 + src-db/database/model/tables/AD_FIELDGROUP.xml | 5 + src-db/database/model/tables/AD_PROCESS_RUN.xml | 3 + src-db/database/model/tables/M_PRODUCT_UOM.xml | 3 + src-db/database/model/tables/M_STORAGE_DETAIL.xml | 3 + src-db/database/sourcedata/AD_COLUMN.xml | 68 + src-db/database/sourcedata/AD_ELEMENT.xml | 26 + src-db/database/sourcedata/AD_FIELD.xml | 60 +- src-db/database/sourcedata/AD_FIELDGROUP.xml | 2 + src-db/database/sourcedata/AD_MODULE.xml | 2 +- src-db/database/sourcedata/AD_TAB.xml | 46 +- src-db/database/sourcedata/AD_TEXTINTERFACES.xml | 11 - src-db/database/sourcedata/OBUISEL_SELECTOR.xml | 2 +- src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateOpenClosePeriodsButton.class | 0 src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateOpenClosePeriodsButtonData.class | 0 src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton.java | 51 + src-util/modulescript/src/org/openbravo/modulescript/UpdateOpenClosePeriodsButton_data.xsql | 92 ++ src/org/openbravo/base/structure/BaseOBObject.java | 20 +- src/org/openbravo/dal/core/OBContext.java | 7 + src/org/openbravo/erpCommon/ad_forms/InitialClientSetup.html | 35 +- src/org/openbravo/erpCommon/ad_forms/InitialClientSetup.java | 8 +- src/org/openbravo/erpCommon/ad_process/assets/AssetLinearDepreciationMethodProcess.java | 21 +- src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java | 25 +- src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports_data.xsql | 43 + src/org/openbravo/erpCommon/utility/HttpsUtils.java | 2 +- src/org/openbravo/erpCommon/utility/Utility.java | 18 + src/org/openbravo/erpCommon/utility/WindowTree.java | 14 +- src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java | 25 +- src/org/openbravo/financial/ResetAccounting.java | 35 +- src/org/openbravo/portal/PortalAccessible.java | 31 + src/org/openbravo/service/system/DatabaseValidator.java | 6 + src/org/openbravo/service/web/BaseWebServiceServlet.java | 7 + 108 files changed, 1482 insertions(+), 516 deletions(-) diffs (truncated from 4192 to 300 lines): diff -r 905aa948183a -r 8df08bea850d .hgsigs --- a/.hgsigs Tue Apr 09 02:36:00 2013 +0200 +++ b/.hgsigs Tue Apr 16 19:00:11 2013 +0200 @@ -106,3 +106,4 @@ cd9fe4727ba89b6fc108d9e7e48cc222c24016e4 0 iEYEABECAAYFAlEkZrgACgkQCX/oGf+2qkNMEgCfVeNFe/nvgxNXwEUvbbIp6tqdAJ0AoK+83WD/fS6bRKK2xEgc5gwYlFJP 2eb40756a1ed20c690c9158cd84aa62ea34ac339 0 iEYEABECAAYFAlEjW+AACgkQCX/oGf+2qkNupQCgz0W/xoRPzBsfhdSFgcD+vJy9aPAAoNfJeFhJ+psPdkmsZmz8fYvRg8DT 1983af93019a75c0f0b130181b3ed8bb7d83bd8c 0 iEYEABECAAYFAlE42u0ACgkQCX/oGf+2qkNZQgCeKbV0dJ/m8Mcri1w7Xw3bB2dzAU0An02XW44EzaErkug0oKK6bkYmDmRA +d7e04c9b010fd0b52464f9b846278b415ff066cc 0 iEYEABECAAYFAlFrxIQACgkQCX/oGf+2qkPu7ACgofS8PV7CLsmpDNO8nNMkrs++JIcAoL69XxrlYHRfCM6aue8q5srbLm/R diff -r 905aa948183a -r 8df08bea850d .hgtags --- a/.hgtags Tue Apr 09 02:36:00 2013 +0200 +++ b/.hgtags Tue Apr 16 19:00:11 2013 +0200 @@ -117,3 +117,4 @@ 42352a2a7b5be48801784583817c082e2ec11af2 3.0MP19.4 60f345bac02b65b2e09ad4e540c70875197ce76f 3.0MP20 79ef7f4b625d71d1c8a6520648e528f9a722ab60 3.0MP21 +383173cf8e316d135eb0d216ab091602955b1daf 3.0MP22 diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 16 19:00:11 2013 +0200 @@ -6,7 +6,7 @@ <!--A918E3331C404B889D69AA9BFAFB23AC--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--A918E3331C404B889D69AA9BFAFB23AC--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--A918E3331C404B889D69AA9BFAFB23AC--> <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME> -<!--A918E3331C404B889D69AA9BFAFB23AC--> <VERSION><![CDATA[3.0.20061]]></VERSION> +<!--A918E3331C404B889D69AA9BFAFB23AC--> <VERSION><![CDATA[3.0.20113]]></VERSION> <!--A918E3331C404B889D69AA9BFAFB23AC--> <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION> <!--A918E3331C404B889D69AA9BFAFB23AC--> <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements. If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 16 19:00:11 2013 +0200 @@ -7,7 +7,7 @@ <!--89326AE95DAD449D85DFAB2C5B1C6683--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--89326AE95DAD449D85DFAB2C5B1C6683--> <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID> <!--89326AE95DAD449D85DFAB2C5B1C6683--> <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID> -<!--89326AE95DAD449D85DFAB2C5B1C6683--> <STARTVERSION><![CDATA[2.1.20061]]></STARTVERSION> +<!--89326AE95DAD449D85DFAB2C5B1C6683--> <STARTVERSION><![CDATA[2.1.20113]]></STARTVERSION> <!--89326AE95DAD449D85DFAB2C5B1C6683--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--89326AE95DAD449D85DFAB2C5B1C6683--> <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME> <!--89326AE95DAD449D85DFAB2C5B1C6683--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> @@ -21,7 +21,7 @@ <!--B97FC854C6DD41E692161585645A900F--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--B97FC854C6DD41E692161585645A900F--> <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID> <!--B97FC854C6DD41E692161585645A900F--> <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID> -<!--B97FC854C6DD41E692161585645A900F--> <STARTVERSION><![CDATA[3.0.20061]]></STARTVERSION> +<!--B97FC854C6DD41E692161585645A900F--> <STARTVERSION><![CDATA[3.0.20113]]></STARTVERSION> <!--B97FC854C6DD41E692161585645A900F--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--B97FC854C6DD41E692161585645A900F--> <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME> <!--B97FC854C6DD41E692161585645A900F--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml --- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 16 19:00:11 2013 +0200 @@ -6,7 +6,7 @@ <!--C70732EA90A14EC0916078B85CC33D2D--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--C70732EA90A14EC0916078B85CC33D2D--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--C70732EA90A14EC0916078B85CC33D2D--> <NAME><![CDATA[JBoss Weld]]></NAME> -<!--C70732EA90A14EC0916078B85CC33D2D--> <VERSION><![CDATA[1.1.20061]]></VERSION> +<!--C70732EA90A14EC0916078B85CC33D2D--> <VERSION><![CDATA[1.1.20113]]></VERSION> <!--C70732EA90A14EC0916078B85CC33D2D--> <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION> <!--C70732EA90A14EC0916078B85CC33D2D--> <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP> <!--C70732EA90A14EC0916078B85CC33D2D--> <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml --- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 16 19:00:11 2013 +0200 @@ -7,7 +7,7 @@ <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID> <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID> -<!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <STARTVERSION><![CDATA[3.0.20061]]></STARTVERSION> +<!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <STARTVERSION><![CDATA[3.0.20113]]></STARTVERSION> <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME> <!--8BDE81545C1A43EAAC4BA3C5ED754DC8--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml --- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml Tue Apr 16 19:00:11 2013 +0200 @@ -622,7 +622,7 @@ <!--178D324AD10947149B7F79F140AA6832--> <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID> <!--178D324AD10947149B7F79F140AA6832--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> <!--178D324AD10947149B7F79F140AA6832--> <ISKEY><![CDATA[N]]></ISKEY> -<!--178D324AD10947149B7F79F140AA6832--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--178D324AD10947149B7F79F140AA6832--> <ISPARENT><![CDATA[Y]]></ISPARENT> <!--178D324AD10947149B7F79F140AA6832--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> <!--178D324AD10947149B7F79F140AA6832--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> <!--178D324AD10947149B7F79F140AA6832--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml --- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml Tue Apr 16 19:00:11 2013 +0200 @@ -6,7 +6,7 @@ <!--9BA0836A3CD74EE4AB48753A47211BCC--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--9BA0836A3CD74EE4AB48753A47211BCC--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--9BA0836A3CD74EE4AB48753A47211BCC--> <NAME><![CDATA[User Interface Application]]></NAME> -<!--9BA0836A3CD74EE4AB48753A47211BCC--> <VERSION><![CDATA[2.1.20061]]></VERSION> +<!--9BA0836A3CD74EE4AB48753A47211BCC--> <VERSION><![CDATA[2.1.20113]]></VERSION> <!--9BA0836A3CD74EE4AB48753A47211BCC--> <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION> <!--9BA0836A3CD74EE4AB48753A47211BCC--> <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP> <!--9BA0836A3CD74EE4AB48753A47211BCC--> <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml --- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml Tue Apr 16 19:00:11 2013 +0200 @@ -7,7 +7,7 @@ <!--15D7CE8D95D043189162DBABA54A1F61--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--15D7CE8D95D043189162DBABA54A1F61--> <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID> <!--15D7CE8D95D043189162DBABA54A1F61--> <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID> -<!--15D7CE8D95D043189162DBABA54A1F61--> <STARTVERSION><![CDATA[2.1.20061]]></STARTVERSION> +<!--15D7CE8D95D043189162DBABA54A1F61--> <STARTVERSION><![CDATA[2.1.20113]]></STARTVERSION> <!--15D7CE8D95D043189162DBABA54A1F61--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--15D7CE8D95D043189162DBABA54A1F61--> <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME> <!--15D7CE8D95D043189162DBABA54A1F61--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> @@ -21,7 +21,7 @@ <!--60A170212F36499D83B8AD38D01F46B3--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--60A170212F36499D83B8AD38D01F46B3--> <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID> <!--60A170212F36499D83B8AD38D01F46B3--> <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID> -<!--60A170212F36499D83B8AD38D01F46B3--> <STARTVERSION><![CDATA[2.1.20061]]></STARTVERSION> +<!--60A170212F36499D83B8AD38D01F46B3--> <STARTVERSION><![CDATA[2.1.20113]]></STARTVERSION> <!--60A170212F36499D83B8AD38D01F46B3--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--60A170212F36499D83B8AD38D01F46B3--> <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME> <!--60A170212F36499D83B8AD38D01F46B3--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> @@ -35,7 +35,7 @@ <!--824D60CB352E4099B1D8C903CA139DAE--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--824D60CB352E4099B1D8C903CA139DAE--> <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID> <!--824D60CB352E4099B1D8C903CA139DAE--> <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID> -<!--824D60CB352E4099B1D8C903CA139DAE--> <STARTVERSION><![CDATA[3.0.20061]]></STARTVERSION> +<!--824D60CB352E4099B1D8C903CA139DAE--> <STARTVERSION><![CDATA[3.0.20113]]></STARTVERSION> <!--824D60CB352E4099B1D8C903CA139DAE--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--824D60CB352E4099B1D8C903CA139DAE--> <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME> <!--824D60CB352E4099B1D8C903CA139DAE--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> @@ -49,7 +49,7 @@ <!--E8FD820AFE3D4FE08C02FC47769026AD--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--E8FD820AFE3D4FE08C02FC47769026AD--> <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID> <!--E8FD820AFE3D4FE08C02FC47769026AD--> <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID> -<!--E8FD820AFE3D4FE08C02FC47769026AD--> <STARTVERSION><![CDATA[8.1.20061]]></STARTVERSION> +<!--E8FD820AFE3D4FE08C02FC47769026AD--> <STARTVERSION><![CDATA[8.1.20113]]></STARTVERSION> <!--E8FD820AFE3D4FE08C02FC47769026AD--> <ISINCLUDED><![CDATA[N]]></ISINCLUDED> <!--E8FD820AFE3D4FE08C02FC47769026AD--> <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME> <!--E8FD820AFE3D4FE08C02FC47769026AD--> <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT> diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java --- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java Tue Apr 09 02:36:00 2013 +0200 +++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java Tue Apr 16 19:00:11 2013 +0200 @@ -40,6 +40,7 @@ import org.openbravo.erpCommon.utility.UsedByLink; import org.openbravo.model.ad.alert.AlertRecipient; import org.openbravo.model.ad.alert.AlertRule; +import org.openbravo.portal.PortalAccessible; import org.openbravo.service.db.DalConnectionProvider; import org.openbravo.service.json.JsonConstants; @@ -52,7 +53,7 @@ * @see StaticResourceComponent */ @ApplicationScoped -public class AlertActionHandler extends BaseActionHandler { +public class AlertActionHandler extends BaseActionHandler implements PortalAccessible { private static final Logger log4j = Logger.getLogger(AlertActionHandler.class); /* diff -r 905aa948183a -r 8df08bea850d modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java Tue Apr 16 19:00:11 2013 +0200 @@ -0,0 +1,289 @@ +/* + ************************************************************************* + * 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) 2013 Openbravo SLU + * All Rights Reserved. + * Contributor(s): ______________________________________. + ************************************************************************ + */ + +package org.openbravo.client.application; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.enterprise.context.ApplicationScoped; + +import org.hibernate.Query; +import org.hibernate.criterion.Restrictions; +import org.openbravo.client.application.MenuManager.MenuEntryType; +import org.openbravo.client.application.MenuManager.MenuOption; +import org.openbravo.dal.service.OBCriteria; +import org.openbravo.dal.service.OBDal; +import org.openbravo.model.ad.access.Role; +import org.openbravo.model.ad.domain.ModelImplementation; +import org.openbravo.model.ad.domain.ModelImplementationMapping; +import org.openbravo.model.ad.ui.Menu; +import org.openbravo.model.ad.ui.Process; +import org.openbravo.model.ad.ui.Tab; +import org.openbravo.model.ad.utility.Tree; +import org.openbravo.model.ad.utility.TreeNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + * Caches in memory generic global menus per language and tree to be consumed by {@link MenuManager} + * + * @author alostale + * + */ +@ApplicationScoped +public class GlobalMenu { + private static final Logger log = LoggerFactory.getLogger(GlobalMenu.class); + + private Map<String, List<MenuOption>> menuOptionsByLangAndTree = null; + + private long cacheTimeStamp = 0; + + /** + * Returns the menu for current role's tree and language looking in the application scoped cached + * ones. If it is not present there, it is generated and cached. + * + */ + synchronized List<MenuOption> getMenuOptions(String roleId, String language) { + long t = System.currentTimeMillis(); + + if (menuOptionsByLangAndTree == null) { + invalidateCache(); + } + + Role role = OBDal.getInstance().get(Role.class, roleId); + final Tree tree; + if (role.getPrimaryTreeMenu() != null) { + tree = role.getPrimaryTreeMenu(); + } else { + tree = OBDal.getInstance().get(Tree.class, "10"); + } + + String menuKey = language + tree.getId(); + if (menuOptionsByLangAndTree.get(menuKey) == null) { + menuOptionsByLangAndTree.put(menuKey, createInitialMenuList(tree, language)); + log.info("Generating menu took " + (System.currentTimeMillis() - t)); + t = System.currentTimeMillis(); + } else { + log.debug("Using cached menu for tree and language"); + } + + ArrayList<MenuOption> newOptions = new ArrayList<MenuOption>(); + final Map<String, MenuOption> menuOptionsByMenuId = new HashMap<String, MenuOption>(); + for (MenuOption option : menuOptionsByLangAndTree.get(menuKey)) { + final MenuOption clonedMenuOption = new MenuOption(option); + + if (clonedMenuOption.getMenu() != null) { + menuOptionsByMenuId.put(clonedMenuOption.getMenu().getId(), clonedMenuOption); + } + newOptions.add(clonedMenuOption); + } + + // Tree is generated in the cloned instances to refer to itself and not to the pristine one + for (MenuOption menuOption : newOptions) { + menuOption.setParentMenuOption(menuOptionsByMenuId); + } + + log.debug("Getting a copy of globally cached menu took {} ms", System.currentTimeMillis()); + return newOptions; + } + + private List<MenuOption> createInitialMenuList(Tree tree, String language) { + List<MenuOption> menuOptions = new ArrayList<MenuOption>(); + OBCriteria<TreeNode> treeNodes = OBDal.getInstance().createCriteria(TreeNode.class); + treeNodes.add(Restrictions.eq(TreeNode.PROPERTY_TREE, tree)); + treeNodes.setFilterOnActive(false); + + // Cache in DAL session all menu entries in a single query, so no need to query one by one + // afterwards + final String menuHql = "select m from ADMenu m left join fetch m.aDMenuTrlList where m.module.enabled=true"; + final Query menuQry = OBDal.getInstance().getSession().createQuery(menuHql); + @SuppressWarnings("unchecked") + List<Menu> menus = (List<Menu>) menuQry.list(); + + List<TreeNode> nodes = treeNodes.list(); + + for (TreeNode treeNode : nodes) { + boolean addOption = treeNode.isActive(); + + if (!addOption) { + Menu menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode()); + if (menuEntry != null) { + addOption = menuEntry.isSummaryLevel(); + } + } + + if (addOption) { + final MenuOption menuOption = new MenuOption(); + menuOption.setTreeNode(treeNode); + menuOption.setDbId(treeNode.getId()); ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
