Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016494Openbravo ERPA. Platformpublic2011-03-25 15:542011-04-07 00:00
marvintm 
marvintm 
normalmajorhave not tried
closedfixed 
5
 
3.0RC6 
Core
No
0016494: If a column has a default which starts with @SQL and has parameters, it will not be correctly computed
If a column has a default value, which is an SQL expression (and therefore, it starts with @SQL), which contains parameters, the UIDefinition will not set the parameters with the correct value, and therefore the result will not be the expected one.
Set the following default for the C_BPARTNER_Id column of the C_Order table:

@SQL=SELECT c_bpartner_id FROM ad_user WHERE ad_user_id=@AD_USER_ID@

Define a business partner for a user. Log with this user, and try to create a sales order. Verify that the business partner you defined for the user is not choosen automatically in your new order.
The getContext() method should be used if there is no value for a parameter in the request.
No tags attached.
Issue History
2011-03-25 15:54marvintmNew Issue
2011-03-25 15:54marvintmAssigned To => marvintm
2011-03-25 15:54marvintmModules => Core
2011-03-25 16:03hgbotCheckin
2011-03-25 16:03hgbotNote Added: 0035254
2011-03-25 16:03hgbotStatusnew => resolved
2011-03-25 16:03hgbotResolutionopen => fixed
2011-03-25 16:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3021389f1857ffb6437f74a546b0b7a688bdaac1 [^]
2011-04-06 13:49iperdomoNote Added: 0035658
2011-04-06 13:49iperdomoStatusresolved => closed
2011-04-07 00:00anonymoussf_bug_id0 => 3278054

Notes
(0035254)
hgbot   
2011-03-25 16:03   
Repository: erp/devel/pi
Changeset: 3021389f1857ffb6437f74a546b0b7a688bdaac1
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Mar 25 16:01:23 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3021389f1857ffb6437f74a546b0b7a688bdaac1 [^]

Fixed issue 16494. Parameter values for @SQL parameters will be computed with getContext if they are not in the request

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
---
(0035658)
iperdomo   
2011-04-06 13:49   
Tested on pi @ rev a8d8d76948f2