[OpenbravoERP-commits] devel/pi: 2 new changesets
details: https://code.openbravo.com/erp/devel/pi/rev/97008b02fc55 changeset: 30003:97008b02fc55 user: RM packaging bot openbravo.com> date: Wed Sep 07 17:42:45 2016 + summary: CI: update AD_MODULE to version 30002 details: https://code.openbravo.com/erp/devel/pi/rev/6fc35759c9c7 changeset: 30004:6fc35759c9c7 user: RM packaging bot openbravo.com> date: Wed Sep 07 17:56:33 2016 + summary: CI: merge back from main diffstat: 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.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- 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_MODULE.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 8 +- 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.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.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.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.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.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.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.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +-
[OpenbravoERP-commits] devel/main: 6 new changesets
details: https://code.openbravo.com/erp/devel/main/rev/e46e66b4f219 changeset: 29998:e46e66b4f219 user: Gorka Ion Damián openbravo.com> date: Tue Sep 06 12:25:45 2016 +0200 summary: Fixes issue 33909. Add null check on closeSession On some very specific scenarios it is possible to execute 2 commitAndClose or rollbacks on the same SessionHandler instance. As both methods calls the setSession(null) and closeSession() methods a NPE is thrown on the second execution. details: https://code.openbravo.com/erp/devel/main/rev/076cf96db902 changeset: 2:076cf96db902 user: Asier Lostalé openbravo.com> date: Fri Aug 05 10:03:10 2016 +0200 summary: fixed bug 33629: slow order/invoice grid population in Add Payment Description In evironments with big volumes it was slow because it performed a Seq Scan on FIN_Payment_ScheduleDetail table. It has been fixed for the cases when BP is preset by: - Removing left joins to get BP from order/invoice to retrieve it directly from FIN_Payment_ScheduleDetail - Adding an index on FIN_Payment_ScheduleDetail.BP so that previous query does not require of a Seq Scan details: https://code.openbravo.com/erp/devel/main/rev/077bc1244bc0 changeset: 3:077bc1244bc0 user: Alvaro Ferraz openbravo.com> date: Tue Sep 06 12:04:58 2016 +0200 summary: Related to issue 33629: Code review improvements Group by bp.id and bp.name instead of by bp to avoid errors in Oracle. details: https://code.openbravo.com/erp/devel/main/rev/3b4758dcc61a changeset: 30001:3b4758dcc61a user: RM packaging bot openbravo.com> date: Wed Sep 07 12:18:54 2016 + summary: CI: merge back from main details: https://code.openbravo.com/erp/devel/main/rev/3886c94b14d9 changeset: 30002:3886c94b14d9 user: Mark gmail.com> date: Fri Sep 02 12:10:01 2016 -0400 summary: Fixes issue 33752: Can be closed an order with reserved stock If the stock was reserved and the associated goods shipment voided, the order was raising an error when trying to close it. When reservations are retrieved, C_ORDER_POST1 trigger doesn't takes into account the status of previously released reservations. To make this validation works homogeneously just like is now in other areas where this validation is executed (C_ORDER_POST1, M_INOUT_CREATE, M_INOUT_POST, M_RESERVATION_POST) the query that retrieves the count of reservations of the line also takes into account those lines with status different than 'CL'. Also validates that is created a new reservation for the line only if doesn't exists any reservation for it. details: https://code.openbravo.com/erp/devel/main/rev/97008b02fc55 changeset: 30003:97008b02fc55 user: RM packaging bot openbravo.com> date: Wed Sep 07 17:42:45 2016 + summary: CI: update AD_MODULE to version 30002 diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- 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.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml | 3 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java | 38 ++--- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- 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_MODULE.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 8 +- 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.myob/src-db/database/sourcedata/AD_MODULE.xml
[OpenbravoERP-commits] devel/pi: Fixes issue 33752: Can be closed an order with reserve...
details: https://code.openbravo.com/erp/devel/pi/rev/3886c94b14d9 changeset: 30002:3886c94b14d9 user: Mark gmail.com> date: Fri Sep 02 12:10:01 2016 -0400 summary: Fixes issue 33752: Can be closed an order with reserved stock If the stock was reserved and the associated goods shipment voided, the order was raising an error when trying to close it. When reservations are retrieved, C_ORDER_POST1 trigger doesn't takes into account the status of previously released reservations. To make this validation works homogeneously just like is now in other areas where this validation is executed (C_ORDER_POST1, M_INOUT_CREATE, M_INOUT_POST, M_RESERVATION_POST) the query that retrieves the count of reservations of the line also takes into account those lines with status different than 'CL'. Also validates that is created a new reservation for the line only if doesn't exists any reservation for it. diffstat: src-db/database/model/functions/C_ORDER_POST1.xml | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diffs (41 lines): diff -r 3b4758dcc61a -r 3886c94b14d9 src-db/database/model/functions/C_ORDER_POST1.xml --- a/src-db/database/model/functions/C_ORDER_POST1.xml Wed Sep 07 12:18:54 2016 + +++ b/src-db/database/model/functions/C_ORDER_POST1.xml Fri Sep 02 12:10:01 2016 -0400 @@ -1265,9 +1265,10 @@ ) ) LOOP SELECT count(*), max(m_reservation_id) -INTO v_aux, v_reservation_id + INTO v_aux, v_reservation_id FROM m_reservation - WHERE c_orderline_id = cur_orderline.c_orderline_id; + WHERE c_orderline_id = cur_orderline.c_orderline_id + AND res_status <> 'CL'; -- Initialize so_res_status UPDATE c_orderline SET so_res_status = 'NR' @@ -1342,10 +1343,20 @@ END WHERE c_orderline_id = cur_orderline.c_orderline_id; END IF; - ELSIF (cur_orderline.create_reservation = 'CRP') THEN -M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'Y', v_user, v_reservation_id); - ELSIF (cur_orderline.create_reservation = 'CR') THEN -M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'N', v_user, v_reservation_id); + ELSE +SELECT count(*) +INTO v_aux +FROM dual +WHERE EXISTS ( + SELECT 1 + FROM m_reservation + WHERE c_orderline_id = cur_orderline.c_orderline_id +); +IF (v_aux = 0 AND cur_orderline.create_reservation = 'CRP') THEN + M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'Y', v_user, v_reservation_id); +ELSIF (v_aux = 0 AND cur_orderline.create_reservation = 'CR') THEN + M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'N', v_user, v_reservation_id); +END IF; END IF; END LOOP; SELECT COUNT(*), SUM(CASE ol.so_res_status WHEN 'CR' THEN 1 ELSE 0 END), SUM(CASE ol.so_res_status WHEN 'PR' THEN 1 ELSE 0 END) -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: 2 new changesets
details: https://code.openbravo.com/erp/devel/pi/rev/f6f6845fdec4 changeset: 3:f6f6845fdec4 user: RM packaging bot openbravo.com> date: Wed Sep 07 12:04:51 2016 + summary: CI: update AD_MODULE to version 29996 details: https://code.openbravo.com/erp/devel/pi/rev/3b4758dcc61a changeset: 30001:3b4758dcc61a user: RM packaging bot openbravo.com> date: Wed Sep 07 12:18:54 2016 + summary: CI: merge back from main diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- 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.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml | 3 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java | 38 ++--- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- 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_MODULE.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 8 +- 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.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.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.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.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 +-
[OpenbravoERP-commits] devel/main: 4 new changesets
details: https://code.openbravo.com/erp/devel/main/rev/7a6f2a5786c1 changeset: 29994:7a6f2a5786c1 user: Alvaro Ferraz openbravo.com> date: Tue Sep 06 10:17:03 2016 +0200 summary: Related to issue 33776: Update PSD in QA client sampledata Update c_bpartner_id of PSD in QA client sampledata, updated by UpdateBpPaymentLine modulescript. c_bpartner_id column was null due to issue 33776. details: https://code.openbravo.com/erp/devel/main/rev/7ec80b84a711 changeset: 29995:7ec80b84a711 user: RM packaging bot openbravo.com> date: Tue Sep 06 12:40:38 2016 + summary: CI: merge back from main details: https://code.openbravo.com/erp/devel/main/rev/89eaadd3beda changeset: 29996:89eaadd3beda user: Carlos Aristu openbravo.com> date: Wed Sep 07 09:23:12 2016 +0200 summary: fixes issue 33900: Wrong decimal default value having ',' as decimal separator When using a decimal value as default for a numeric column, this very same value is a String passed to the createFromClassicString of NumberUIDefinition which is used by the FIC to retrieve the column value. The default values are part of the code, so in case of decimal values, they must me defined as a valid Java decimal number. But the createFromClassicString expects a value formatted according to the Format.xml file. For this reason, now the decimal default values are formatted properly. Although this value will be converted again in the createFromClassicString, this is the cleanest solution because for the rest of the flows within the FIC, the createFromClassicString method receives a value formatted according to the to the Format.xml file. details: https://code.openbravo.com/erp/devel/main/rev/f6f6845fdec4 changeset: 29997:f6f6845fdec4 user: RM packaging bot openbravo.com> date: Wed Sep 07 12:04:51 2016 + summary: CI: update AD_MODULE to version 29996 diffstat: 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.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml | 2 +- modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 2 +- 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_MODULE.xml | 2 +- modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml | 8 +- 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/reference/NumberUIDefinition.java | 20 modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java | 24 +- 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.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.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 ++--
[OpenbravoERP-commits] devel/pi: 2 new changesets
details: https://code.openbravo.com/erp/devel/pi/rev/076cf96db902 changeset: 29998:076cf96db902 user: Asier Lostalé openbravo.com> date: Fri Aug 05 10:03:10 2016 +0200 summary: fixed bug 33629: slow order/invoice grid population in Add Payment Description In evironments with big volumes it was slow because it performed a Seq Scan on FIN_Payment_ScheduleDetail table. It has been fixed for the cases when BP is preset by: - Removing left joins to get BP from order/invoice to retrieve it directly from FIN_Payment_ScheduleDetail - Adding an index on FIN_Payment_ScheduleDetail.BP so that previous query does not require of a Seq Scan details: https://code.openbravo.com/erp/devel/pi/rev/077bc1244bc0 changeset: 2:077bc1244bc0 user: Alvaro Ferraz openbravo.com> date: Tue Sep 06 12:04:58 2016 +0200 summary: Related to issue 33629: Code review improvements Group by bp.id and bp.name instead of by bp to avoid errors in Oracle. diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml | 2 +- modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml | 3 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java | 38 ++--- src-db/database/model/tables/FIN_PAYMENT_SCHEDULEDETAIL.xml | 3 + 4 files changed, 15 insertions(+), 31 deletions(-) diffs (144 lines): diff -r e46e66b4f219 -r 077bc1244bc0 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml Tue Sep 06 12:25:45 2016 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml Tue Sep 06 12:04:58 2016 +0200 @@ -1022,7 +1022,7 @@ - + diff -r e46e66b4f219 -r 077bc1244bc0 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml Tue Sep 06 12:25:45 2016 +0200 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml Tue Sep 06 12:04:58 2016 +0200 @@ -69,14 +69,13 @@
[OpenbravoERP-commits] devel/pi: Fixes issue 33909. Add null check on closeSession
details: https://code.openbravo.com/erp/devel/pi/rev/e46e66b4f219 changeset: 29997:e46e66b4f219 user: Gorka Ion Damián openbravo.com> date: Tue Sep 06 12:25:45 2016 +0200 summary: Fixes issue 33909. Add null check on closeSession On some very specific scenarios it is possible to execute 2 commitAndClose or rollbacks on the same SessionHandler instance. As both methods calls the setSession(null) and closeSession() methods a NPE is thrown on the second execution. diffstat: src/org/openbravo/dal/core/SessionHandler.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (14 lines): diff -r 89eaadd3beda -r e46e66b4f219 src/org/openbravo/dal/core/SessionHandler.java --- a/src/org/openbravo/dal/core/SessionHandler.javaWed Sep 07 09:23:12 2016 +0200 +++ b/src/org/openbravo/dal/core/SessionHandler.javaTue Sep 06 12:25:45 2016 +0200 @@ -208,7 +208,9 @@ } protected void closeSession() { -session.close(); +if (session != null && session.isOpen()) { + session.close(); +} } /** -- ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/pi: fixes issue 33900: Wrong decimal default value having ...
details: https://code.openbravo.com/erp/devel/pi/rev/89eaadd3beda changeset: 29996:89eaadd3beda user: Carlos Aristu openbravo.com> date: Wed Sep 07 09:23:12 2016 +0200 summary: fixes issue 33900: Wrong decimal default value having ',' as decimal separator When using a decimal value as default for a numeric column, this very same value is a String passed to the createFromClassicString of NumberUIDefinition which is used by the FIC to retrieve the column value. The default values are part of the code, so in case of decimal values, they must me defined as a valid Java decimal number. But the createFromClassicString expects a value formatted according to the Format.xml file. For this reason, now the decimal default values are formatted properly. Although this value will be converted again in the createFromClassicString, this is the cleanest solution because for the rest of the flows within the FIC, the createFromClassicString method receives a value formatted according to the to the Format.xml file. diffstat: modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java | 20 modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java | 24 +- 2 files changed, 42 insertions(+), 2 deletions(-) diffs (85 lines): diff -r 7ec80b84a711 -r 89eaadd3beda modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java --- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java Tue Sep 06 12:40:38 2016 + +++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java Wed Sep 07 09:23:12 2016 +0200 @@ -19,6 +19,7 @@ package org.openbravo.client.kernel.reference; import java.math.BigDecimal; +import java.text.DecimalFormat; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; @@ -27,6 +28,7 @@ import org.openbravo.base.secureApp.VariablesSecureApp; import org.openbravo.client.kernel.RequestContext; import org.openbravo.client.kernel.reference.UIDefinitionController.FormatDefinition; +import org.openbravo.erpCommon.utility.Utility; import org.openbravo.model.ad.ui.Field; /** @@ -153,6 +155,24 @@ } @Override + public String getDefaultValue(VariablesSecureApp vars, String columnName, + String defaultValueExpression, String windowId) { +String defaultValue = super.getDefaultValue(vars, columnName, defaultValueExpression, windowId); +if (defaultValue == null || defaultValue.length() == 0) { + return defaultValue; +} +try { + // Format the numeric default value + DecimalFormat df = Utility.getFormat(vars, getFormat()); + BigDecimal numericDefaultValue = new BigDecimal(defaultValue); + return df.format(numericDefaultValue); +} catch (Exception ex) { + throw new OBException("Invalid numeric default value (" + defaultValueExpression + + ") defined for column " + columnName, ex); +} + } + + @Override public Object createFromClassicString(String value) { if (value == null || value.length() == 0) { return null; diff -r 7ec80b84a711 -r 89eaadd3beda modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java --- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java Tue Sep 06 12:40:38 2016 + +++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java Wed Sep 07 09:23:12 2016 +0200 @@ -211,8 +211,7 @@ if (defaultS.equalsIgnoreCase("@#Date@")) { return setNOWDefault(); } else if (!defaultS.startsWith("@SQL=")) { - columnValue = Utility.getDefault(new DalConnectionProvider(false), - rq.getVariablesSecureApp(), colName, defaultS, windowId, ""); + columnValue = getDefaultValue(rq.getVariablesSecureApp(), colName, defaultS, windowId); } else { ArrayList params = new ArrayList(); String sql = parseSQL(defaultS, params); @@ -269,6 +268,27 @@ } /** + * Returns the value for a default value expression which represents a session value or a fixed + * value. This method is not used to calculate SQL based expressions (those that start with + * '@SQL=') and NOW expression ('@#Date@'). + * + * @param vars + * Handler for the session info. + * @param columnName + * String with the name of the column that has the default value. + * @param defaultValueExpression + * String with the default value expression. + * @param window + * String with the window id. + * @return String with the calculated default value. + */ + public String getDefaultValue(VariablesSecureApp vars, String columnName, + String defaultValueExpression,