Mon, 27 Feb 2017 13:05:01 -0500Fixes issue 24905: Sales Order relation is not updated in Shipment
Miguel <martencobasmiguel@gmail.com> [Mon, 27 Feb 2017 13:05:01 -0500] rev 31951
Fixes issue 24905: Sales Order relation is not updated in Shipment
header in some cases.

When a line was deleted was not verified if there was other
invoice lines associated to orders distinct than the header's Sales/Purchase
Order field and it was not updated rightly. Also when inserting a line from the
create lines process, there being two or more lines already inserted related to
different orders, the Sales Order field related with the header was updated
with the last one.

To get the sales order field updated correctly depending on the previous cases,
the following logic was added to the CreateFrom_Shipment_data.xsql and M_InOut
function.

Each time a line is inserted, the shipment's order line field will be updated
with NULL if there are not any line created from an order or if there are more
than one line created from different orders. In the case that lines were created
from an unique sales order then it will be fullfilled with it, otherwise it will
be left empty.

When the line is deleted, the logic explained above needs to be checked inside
a trigger, but it is not possible because the table is in a mutant status in
Oracle, due this reason it is not possible to update the shipment's header at
line's deletion time. As solution to this situation, this field is updated when
the shipment is completed.

Tue, 28 Feb 2017 10:29:36 +0100related to bug 35370: updated dbsourcemanager library
Carlos Aristu <carlos.aristu@openbravo.com> [Tue, 28 Feb 2017 10:29:36 +0100] rev 31950
related to bug 35370: updated dbsourcemanager library

Mon, 27 Feb 2017 18:52:27 +0100Fixed issue 35335. Reenable automatic discounts in purchase flows.
Antonio Moreno <antonio.moreno@openbravo.com> [Mon, 27 Feb 2017 18:52:27 +0100] rev 31949
Fixed issue 35335. Reenable automatic discounts in purchase flows.

Mon, 27 Feb 2017 18:52:09 +0100Fixed issue 35335. Reenable automatic discounts in purchase flows.
Antonio Moreno <antonio.moreno@openbravo.com> [Mon, 27 Feb 2017 18:52:09 +0100] rev 31948
Fixed issue 35335. Reenable automatic discounts in purchase flows.

Mon, 27 Feb 2017 10:50:16 +0100fixes bug 35356: print & attach doc logs error using (old) commons jdbc pool
Carlos Aristu <carlos.aristu@openbravo.com> [Mon, 27 Feb 2017 10:50:16 +0100] rev 31947
fixes bug 35356: print & attach doc logs error using (old) commons jdbc pool

After closing a connection retrieved from the Hibernate pool, it is marked as not usable. It is not possible to check the status of such connections because a HibernateException is thrown.

After printing a report which makes use of the getCountryNumberFormat and applyCountryDateFormat methods of the Utility class, the connection is closed to prevent possible connection leaks. Therefore, when using the Hibernate pool, the connection is marked as not usable causing the HibernateException when checking the status of the connection after printing the report.

To fix the problem now we are handling the HibernateException and initializing the connection properly.

Mon, 27 Feb 2017 10:40:30 +0100Fixed issue 35334:Callout problem when working with comma as decimal separator
Inigo Sanchez <inigo.sanchez@openbravo.com> [Mon, 27 Feb 2017 10:40:30 +0100] rev 31946
Fixed issue 35334:Callout problem when working with comma as decimal separator

The problem was raised when a default format were switched, it means, when
decimal and group separator were switched. In this situation, when
SimpleCalloutInformationProvider class was used to obtain the current element
value and this current element was a BigDecimal, the format was not managed
properly. This occurred because getCurrentElementValue method always retrieved
a String element instead of Object element, in tyhis case BigDecimal.

In this situation, managesUpdatedValuesForCallout method of FIC class compare
if element is a String or not. If a BigDecimal is retrieved as String element,
in this part of the code the format is not managed properly when decimal separator
is comma. The code manage the comma separator as group separator and removed it.

When the decimal separator is dot (.) the format is managed as expected although
this method retrieves a String object (e.g. "1.23"). When decimal separator is
comma (,) this BigDecimal (e.g. 1,24) is retrieved by getCurrentElementValue method
as String value and the format is missed.

This problem has been fixed by take into account type of current element inside
getCurrentElementValue method. Now this method retrieves an object value. In this
case, a BigDecimal is retrieved. Now the format is managed properly.

Fri, 24 Feb 2017 14:36:27 +0100Fixed bug 35287: Slow behavior in Financial Account | Accounting tab
Víctor Martínez Romanos <victor.martinez@openbravo.com> [Fri, 24 Feb 2017 14:36:27 +0100] rev 31945
Fixed bug 35287: Slow behavior in Financial Account | Accounting tab

Added new index to improve query performance.
In the customer environment the total cost has been reduced from 6581196 to 1310605, and the query time from 18 seconds to 1.2 seconds.

The index is declared as partial index because, although the null ratio is going to be low (around 10% in real instances), it is very unlikely to search by "is null" in this column. So we can have a (small) benefit in declaring as partial index (faster inserts/deletes/updates when the column is null).

Fri, 24 Feb 2017 13:26:11 +0100fixed issue 31674: don't show stack trace in log on failed login
Asier Lostalé <asier.lostale@openbravo.com> [Fri, 24 Feb 2017 13:26:11 +0100] rev 31944
fixed issue 31674: don't show stack trace in log on failed login

Removed log with error level for invalid logins. It was already logged
with debug level which is enough.

Fri, 24 Feb 2017 13:15:05 +0100related to bug 31674: apply proper java formatting
Asier Lostalé <asier.lostale@openbravo.com> [Fri, 24 Feb 2017 13:15:05 +0100] rev 31943
related to bug 31674: apply proper java formatting

Fri, 24 Feb 2017 13:07:53 +0100fixed bug 35346: can't save grid record with multi field pick list selector
Asier Lostalé <asier.lostale@openbravo.com> [Fri, 24 Feb 2017 13:07:53 +0100] rev 31942
fixed bug 35346: can't save grid record with multi field pick list selector

Records in tabs with a column having a selector with multiple fields in pick
list couldn't be saved in grid after opening form view.

The problem was casued becasue this kind of selectors require to calculate the
size for the picking list, but when saving it is already closed so it failed
assuming it has a grid.

Fixed by checking if grid is present which indirectly checks if it is visible.