Wed, 03 Jun 2015 09:43:20 +0200Fixes issue 29745: Add on the renderJr method the option to print on plain text
Carlos Aristu <carlos.aristu@openbravo.com> [Wed, 03 Jun 2015 09:43:20 +0200] rev 26835
Fixes issue 29745: Add on the renderJr method the option to print on plain text

Tue, 02 Jun 2015 19:07:56 +0200Relate to issue 29266. Removes log.info from test
Eduardo Argal Guibert <eduardo.argal@openbravo.com> [Tue, 02 Jun 2015 19:07:56 +0200] rev 26834
Relate to issue 29266. Removes log.info from test

Tue, 02 Jun 2015 16:40:25 +0000CI: merge back from main
RM packaging bot <staff.rm@openbravo.com> [Tue, 02 Jun 2015 16:40:25 +0000] rev 26833
CI: merge back from main

Tue, 02 Jun 2015 16:22:11 +0000CI: update AD_MODULE to version 26822
RM packaging bot <staff.rm@openbravo.com> [Tue, 02 Jun 2015 16:22:11 +0000] rev 26832
CI: update AD_MODULE to version 26822

Tue, 02 Jun 2015 18:13:05 +0200Related to issue 30070: code review improvements
Víctor Martínez Romanos <victor.martinez@openbravo.com> [Tue, 02 Jun 2015 18:13:05 +0200] rev 26831
Related to issue 30070: code review improvements

Improved exception message with a bit of context.
Set Document No. related fields as centrally maintained = N and renamed to Invoice No. and Order No.

Tue, 02 Jun 2015 11:59:51 +0200Fixes issue 30070: NPE when navigating from Payment In/Out Lines tab
Alvaro Ferraz <alvaro.ferraz@openbravo.com> [Tue, 02 Jun 2015 11:59:51 +0200] rev 26830
Fixes issue 30070: NPE when navigating from Payment In/Out Lines tab

ReferencedLink was checking reference record when navigating from Order Payment Schedule or Invoice Payment Schedule fields from Payment In Lines or Payment Out Lines tab; in order to know where the record had to navigate to.
When the value of this field was empty, a Null Pointer Exception was raised. Now, in this case, a "Record empty" exception will be raised.
Also, those fields will be now not displayed if their value is empty.
Duplicated Order Payment Schedule and Invoice Payment Schedule fields have been removed also in those tabs, what was causing an error in int-full-oracle-compile-all job.

Wed, 20 May 2015 16:30:14 +0200Fixed bug 29664: Create Price List performance
Víctor Martínez Romanos <victor.martinez@openbravo.com> [Wed, 20 May 2015 16:30:14 +0200] rev 26829
Fixed bug 29664: Create Price List performance

The patch contains the following changes that improve the process performance (in my local environment the performance is increased an average of 80%):
1. count(*) inside M_GET_NO_TRX_PRODUCT_COST has been rewritten to use exists clause
2. Added 2 indices to M_Product_PO table on M_PRODUCT_ID and C_BPARTNER_ID columns to reduce seq. scans on this table
3. M_PRICELIST_CREATE: Force to analyze C_TEMP_Selection table in Postgres
According to PostgreSQL documentation, the autovacuum daemon cannot access and therefore cannot vacuum or analyze temporary tables. So it's recommended to run ANALYZE after the table is populated to improve performance.
Oracle doesn't seem to be affected by this problem, so the analyze is only executed for postgres
4. M_PRICELIST_CREATE: Complex queries that fill the C_TEMP_Selection has been rewritten using a dynamic SQL run through the EXECUTE command.
Although these queries are in general fast, they are executed as many times as records to be inserted into the Price List. So, the bigger amount of records the slower the process is.
It has been detected that the execution plan created for these queries can be improved a lot if we remove useless parts in the where clause (OR stuff). That's why we dynamically build the sql based on the parameters, which drastically improves the execution plan performance.
5. M_PRICELIST_CREATE: Removed useless join to ad_client table to calculate the client's currency. Instead we get it at the beginning of the process just one time.
6. M_PRICELIST_CREATE: Removed code included into the IF (v_Costbased = 'N'AND (v_PriceList_Version_Base_ID IS NULL)). This code is never executed, because there is a validation at the beginning of the process to avoid that situation.

Other changes not included that could improve performance:
1. Changing the db functions ad_isorgincluded and ad_org_isinnaturaltree from VOLATILE to STABLE reduces execution time for cost based price lists.
Right now the DBSM doesn't support this flag, so a feature request #29943 has been created

Wed, 27 May 2015 01:29:05 +0530Fixes Issue 29962:Wrong storage bin can be selected in Pending Goods Receipt
Atul Gaware <atul.gaware@openbravo.com> [Wed, 27 May 2015 01:29:05 +0530] rev 26828
Fixes Issue 29962:Wrong storage bin can be selected in Pending Goods Receipt
window

inpadOrgId is passed as a input parameter to filter locator in onloadfunctions
method. Session variable Locator.adorgid is set to this parameter value.

Tue, 02 Jun 2015 14:39:07 +0200Related to issue 27262: Run direct update query to improve performance
Víctor Martínez Romanos <victor.martinez@openbravo.com> [Tue, 02 Jun 2015 14:39:07 +0200] rev 26827
Related to issue 27262: Run direct update query to improve performance

Instead of getting all the sales order lines to update the reference line, we have replaced by a direct Update HQL, which improves performance and reduces the memory usage

Wed, 27 May 2015 11:59:32 +0530Fixes Issue 27262:After using copy from order the old order can not be removed
Atul Gaware <atul.gaware@openbravo.com> [Wed, 27 May 2015 11:59:32 +0530] rev 26826
Fixes Issue 27262:After using copy from order the old order can not be removed

A event handler is implemented to achieve the functionality.

Tue, 02 Jun 2015 14:38:36 +0200Related with issue 27445: Update the copyright year
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 02 Jun 2015 14:38:36 +0200] rev 26825
Related with issue 27445: Update the copyright year

The year of the copyright has been updated.

Tue, 02 Jun 2015 14:18:15 +0200Fixed issue 27445:ad_table_import function has two lines with wrong datatype.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 02 Jun 2015 14:18:15 +0200] rev 26824
Fixed issue 27445:ad_table_import function has two lines with wrong datatype.

In the AD_TABLE_IMPORT.xml, there were two values assigned with wrong type of data.
These were integer and should be varchar.

To fix this, those two values have been changed to varchar.
To test this after the change, a new table has been created, and the "Create Columns from DB"
process has been executed. It works correctly.

Tue, 02 Jun 2015 12:46:43 +0200Related to issue 29766: Retail Operations Buffer: store all transactions in operations table before processing
Martin Taal <martin.taal@openbravo.com> [Tue, 02 Jun 2015 12:46:43 +0200] rev 26823
Related to issue 29766: Retail Operations Buffer: store all transactions in operations table before processing
- Don't queue complete entry but only needed id's to recreate obcontext and reload entry
- Only load maxBatchSize per type of data, handling each type of data separately makes them less influence eachother, the order of the type of data is based on sequence of list reference, order makes business sense also
- Added process to reprocess entries which are in error
- added several configuration parameters which allow controlling number of threads, queue size and task queue size from properties, sensible defaults have been set, also prevention mechanism for 'crazy' values has been implemented
- centralized the threadpool, so all processors share the same queue together with the main thread
- the main thread now uses a scroll method, importentries are removed from the session right after assigning to the processor to decrease memory foot print
- the main thread now processes entries by type of data, in order of the sequence number of the type of data, this gives better predictable results and also gives a better change that different types of data don't block eachother
- replaced the stored column with the created column, to make table smaller, revisited the index
- added role to the import entry table, so that it is stored with the entry, as it is needed to rebuild the obcontext when processing the entry, as the role of the user can have changed or the default role is not suited for the entry to be handled.
- made field length of json and errorinfo columns to 10 million, added testcase to proof that 10million characters can be saved in the json/errorinfo columns
- let the ImportEntryManager thread start when mobile core starts in the application, using a context listener
- when adding a new import entry check both in the import entry as well as in the import entry archive table if it was already passed in
- don't wait anymore after waking up from the managerWaitTime
- when saving import entry as error, make sure that the obcontext is only temporarily replaced with the admin context, restore the previous context
- set the thread name in the threadfactory

Tue, 02 Jun 2015 10:46:21 +0200Related with 29946: Some tests have been performed.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 02 Jun 2015 10:46:21 +0200] rev 26822
Related with 29946: Some tests have been performed.

Some test cases have been performed for testing the correct behaviour of apllying the
"_noActiveFilter" to the dal and JSON WebServices.
There are four tests. Two per WebService, one of them is putting the "_noActiveFilter" to true,
it works if it gets the inactive records in the JSON WebServices and also in dal WebServices.
The other test is putting the "_noActiveFilter" to false, it works if it don't get the inactive
records.

Tue, 02 Jun 2015 10:37:44 +0200Related with 29946: Update the copyright date.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 02 Jun 2015 10:37:44 +0200] rev 26821
Related with 29946: Update the copyright date.

The date of the copyright has been updated.

Tue, 02 Jun 2015 10:30:04 +0200Fixed issue 29946: Inactive records cannot be retrieved using dal WebServices.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Tue, 02 Jun 2015 10:30:04 +0200] rev 26820
Fixed issue 29946: Inactive records cannot be retrieved using dal WebServices.

It is possible to get the inactive records using JSON WebServices for example, as:

http://localhost:8080/openbravo/org.openbravo.service.json.jsonrest/Country?_noActiveFilter=true

But it is not possible to get the inactive records using dal WebServices.
As it would be interesting to have the choice of showing the inactive records too, as it is possible in the
JSON WebServices, a condition which checks if the "_noActiveFilter" has been included in the "DalWebService"
class.
Now it is possible to chose if one wants to get the inactive fields or not, as in the JSON WebServices:

http://localhost:8080/openbravo/ws/dal/Country?_noActiveFilter=false // The inactive records are not shown.

http://localhost:8080/openbravo/ws/dal/Country?_noActiveFilter=true //The inactive records are shown.

Tue, 02 Jun 2015 01:40:11 +0000CI: merge back from main
RM packaging bot <staff.rm@openbravo.com> [Tue, 02 Jun 2015 01:40:11 +0000] rev 26819
CI: merge back from main

Tue, 02 Jun 2015 01:23:10 +0000CI: update AD_MODULE to version 26817
RM packaging bot <staff.rm@openbravo.com> [Tue, 02 Jun 2015 01:23:10 +0000] rev 26818
CI: update AD_MODULE to version 26817

Mon, 01 Jun 2015 17:30:38 +0200Related issue 29602:wrong position of parenthesis in a condition
Inigo Sanchez <inigo.sanchez@openbravo.com> [Mon, 01 Jun 2015 17:30:38 +0200] rev 26817
Related issue 29602:wrong position of parenthesis in a condition

The problem was the wrong position of parenthesis in a condicion. Now it has been solved
by updating position of parenthesis properly,

Mon, 01 Jun 2015 13:16:02 +0200Fixed issue 29602: tab to check shouldn't be obtained from table's window
Inigo Sanchez <inigo.sanchez@openbravo.com> [Mon, 01 Jun 2015 13:16:02 +0200] rev 26816
Fixed issue 29602: tab to check shouldn't be obtained from table's window

The problem was that tab to check shouldn't be obtained from table's window
but directly from the current window. Now it is taking into account.

Mon, 01 Jun 2015 13:08:42 +0200Fixes Issue 29992. Fixes HQL Where Clause in OBUISEL_Selector definition.
David Miguelez <david.miguelez@openbravo.com> [Mon, 01 Jun 2015 13:08:42 +0200] rev 26815
Fixes Issue 29992. Fixes HQL Where Clause in OBUISEL_Selector definition.
It now filters by Products that are Stocked based on the Product definition
rather than the Stocked flag in the Storage Detail.

Sun, 31 May 2015 15:43:59 +0200Fixed 30056: Cleanup all warnings in src-wad
Stefan Hühner <stefan.huehner@openbravo.com> [Sun, 31 May 2015 15:43:59 +0200] rev 26814
Fixed 30056: Cleanup all warnings in src-wad

XX
- Remove String or int parameter assignment by copying into local variable.
- in Wad#processSelCol use Vector.toArray function to avoid needing to
replace reference in parameter. Note: .toArray will auto-resize itself
to correct size as param is 0-length array
- Fix 2 possible NPE. As code to treat null as empty value was only
called after .debug triggering NPE as param of log4j.debug will be evaluated
even without log level set to debug.
- Wad#getVectorElementsNotRepeated function had parameter which was new empty
Vector in all its 3 callers. As we do not expect more callers (was is
deprecated) just remove the param completely and create new Vector inside
the function removing param assignment.
- in WadUtility instead of assigning to text-param and immediately returning
that value just return it directly as the rest of that function already did.
- in WadNumber. Confusion between non-static function param name + field
inherited from superclass. As those seem to be very clearly utility
functions which should use the param (and not some inherited field) ->
just make them static to remove that confusion.
- WadValidator gets 'friendlyWarnings' flag on construction but does not
currently use it. However we may want to add it (and keep api stable now)
so just supress that unused warning.

Sun, 31 May 2015 14:06:56 +0200Fixed 30055. Fix all warnings in src-trl
Stefan Hühner <stefan.huehner@openbravo.com> [Sun, 31 May 2015 14:06:56 +0200] rev 26813
Fixed 30055. Fix all warnings in src-trl

Two types of changes:
- Remove variables which are never read
- Do not assign to parameters, copy to local var instead
References of parameters cannot be modified in java
Content of objects passed in can be, however in all this
cases object are String which are immutable
Same fix always: Copy of local variable keeping name
of old param as new variable name to reduce diff to review.
- That avoid any developer confusing maybe thinking change
of param would be visible in caller.

Sun, 31 May 2015 13:33:21 +0200Fixed 30054: Cleanup warnings in wad-generated code
Stefan Hühner <stefan.huehner@openbravo.com> [Sun, 31 May 2015 13:33:21 +0200] rev 26812
Fixed 30054: Cleanup warnings in wad-generated code

Goal is not to make wad-generated code nicer (as it should go away).
But instead to reduce the big number of eclipse warnings in it.
So they get out of the way when looking at warning in other code

Changes:
- remove java.util.Arrays & java.util.List imports and covered by existing
java.util.* import
- The other 'unused' code warnings are not so easy to fix so in context of wad
supress all 'unused' warnings in the srcAD files on class level.
As secondary change remove to existing more specific unused annotation
as they triggered warnings themselves (and are covered by the new one anyway)
- Remove private log4j Logger declaration. It shadows a similar one coming
inherited from HttpBaseServer. That one is defined as non-static via
this.getClass so is already of the instance we want (the concrete window-
servlet). That means logger functionally works as before (you can still
set i.e. debug level logging for individual servlet as before).
- in printPageEdit function a parameter was being assigned to in the function
quite often. Apparently those cannot be surpressed. After checking easy to fix
- All caller use just simple constant on every call.
- So add local variable on top of function and copy param value.
- Keep existing param name as variable name to reduce diff of generated code.

Together those reduce number of warnings in srcAD from hundreds down to just 14.

Sat, 30 May 2015 20:59:23 +0200Issue 30053. Part 3: Delete local unused variables (easy cases)
Stefan Hühner <stefan.huehner@openbravo.com> [Sat, 30 May 2015 20:59:23 +0200] rev 26811
Issue 30053. Part 3: Delete local unused variables (easy cases)

This removes unused local variables / fields for all the easy cases.
Where there is no user besides the variables declaration/init and
where it is clear that just deleting it is the right thing to do (so
no doubt it should be used instead of deleting it)

Sat, 30 May 2015 20:29:02 +0200Issue 30053. Part 2: Cleanup unnecessary slf4j / log4j loggers
Stefan Hühner <stefan.huehner@openbravo.com> [Sat, 30 May 2015 20:29:02 +0200] rev 26810
Issue 30053. Part 2: Cleanup unnecessary slf4j / log4j loggers

Remove those where they are private and never used in the file.

Sat, 30 May 2015 20:07:50 +0200Issue 30053. Part 1: Cleanup unnecessary serialVersionUID variables.
Stefan Hühner <stefan.huehner@openbravo.com> [Sat, 30 May 2015 20:07:50 +0200] rev 26809
Issue 30053. Part 1: Cleanup unnecessary serialVersionUID variables.

Those definitions are not useful in this cases and the classes they are in
are not serializable.

So instead of special feature related to Serialization in this cases just a
local unused variable.

Sat, 30 May 2015 19:57:13 +0200Fixed 30052. Cleanup all 'Unnecessary cast' warnings from Eclipse.
Stefan Hühner <stefan.huehner@openbravo.com> [Sat, 30 May 2015 19:57:13 +0200] rev 26808
Fixed 30052. Cleanup all 'Unnecessary cast' warnings from Eclipse.

As those extra casts are not useful and make the code harder to read/understand
-> Remove all those

Fri, 29 May 2015 09:52:37 +0200Fixes issue 30017: Landed Cost must not be applied to negative receipt lines
Alvaro Ferraz <alvaro.ferraz@openbravo.com> [Fri, 29 May 2015 09:52:37 +0200] rev 26807
Fixes issue 30017: Landed Cost must not be applied to negative receipt lines

Goods Receipt selector in Landed Cost window - Receipt tab, will not show receipts which does not have any positive line.
Goods Receipt Line selector in Landed Cost window - Receipt tab, will not show negative receipts lines.
Landed Cost process will not consider negative receipt lines to distribute the amount of the landed cost.

Wed, 27 May 2015 16:27:00 +0200Fixed issue 29602: window with table defined as view should be RO
Inigo Sanchez <inigo.sanchez@openbravo.com> [Wed, 27 May 2015 16:27:00 +0200] rev 26806
Fixed issue 29602: window with table defined as view should be RO

The problem was that if you had a window that was assigned with a
table defined as view you could edited.

Now, it is taking into account this condition by checking windows
(Type window "M" and "T").