Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025754Openbravo ERPA. Platformpublic2014-02-18 06:312014-03-25 19:47
iperdomo 
shankarb 
normalmajoralways
closedfixed 
30Oracle Linux 3.8.13-26.1.1.el6ue
3.0MP29.1 
3.0PR14Q2 
AugustoMauch
Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
Core
No
0025754: Wrong behavior when calculating the value of a property field for a new record (FIC)
When a child tab uses a field based on a property from a parent entity, the current behavior for calculating the value for the field on *NEW* record is wrong.
* Add a new property based field to Lines tab on Sales Order window
* The field will show the currency of the price list: order.priceList.currency
* http://wiki.openbravo.com/wiki/How_to_use_property_fields [^]

When testing:

* Pick a organization with *no* default currency, or pick a price list with a different currency than the default for the organization
* Create a new line, and you'll see that the currency field uses some default that is not the one selected in the header.

Current behavior:

* On 'NEW' mode, FIC will try to calculate a *default* value for that field, trying to pick a currency from the Organization or just the first one in the list of currencies, and *not* the actual value for the property in the header

* If you save, you'll find that the value of the currency gets fixed to the one selected in the header
No tags attached.
related to defect 0025359 closed shankarb Invalid currency in invoice plan master for service contract 
related to defect 0031305 closed platform NullPointerException when creating a new record on the header having a property field 
related to defect 0028977 closed caristu NPE if property field can not reach the complete path 
related to defect 0055060 new Triage Platform Base Property fields show wrong values under some circumstances 
png property-field.png (100,045) 2014-02-18 06:31
https://issues.openbravo.com/file_download.php?file_id=6705&type=bug
png

png property-field2.png (109,516) 2014-02-18 06:31
https://issues.openbravo.com/file_download.php?file_id=6706&type=bug
png

diff AD_FIELD.xml.diff (3,021) 2014-02-18 06:31
https://issues.openbravo.com/file_download.php?file_id=6707&type=bug
Issue History
2014-02-18 06:31iperdomoNew Issue
2014-02-18 06:31iperdomoAssigned To => AugustoMauch
2014-02-18 06:31iperdomoFile Added: property-field.png
2014-02-18 06:31iperdomoWeb browser => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-02-18 06:31iperdomoModules => Core
2014-02-18 06:31iperdomoTriggers an Emergency Pack => No
2014-02-18 06:31iperdomoFile Added: property-field2.png
2014-02-18 06:31iperdomoFile Added: AD_FIELD.xml.diff
2014-02-18 06:33iperdomoNote Added: 0064305
2014-03-17 08:21alostaleWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-17 08:21alostaleTarget Version => PR14Q2
2014-03-17 09:25jonalegriaesarteWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-17 09:25jonalegriaesarteResolution time => 1395961200
2014-03-19 05:25shankarbAssigned ToAugustoMauch => shankarb
2014-03-24 08:13shankarbRelationship addedrelated to 0025359
2014-03-24 08:26shankarbStatusnew => scheduled
2014-03-24 08:26shankarbfix_in_branch => pi
2014-03-24 12:04shankarbReview Assigned To => AugustoMauch
2014-03-24 12:04shankarbWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-24 12:04shankarbfix_in_branchpi =>
2014-03-24 12:05shankarbIssue Monitored: AugustoMauch
2014-03-24 12:06hgbotCheckin
2014-03-24 12:06hgbotNote Added: 0065387
2014-03-24 12:06hgbotStatusscheduled => resolved
2014-03-24 12:06hgbotResolutionopen => fixed
2014-03-24 12:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8780b04632631f7512582fcb3e6b74faf1a749de [^]
2014-03-24 15:45AugustoMauchNote Added: 0065399
2014-03-24 15:45AugustoMauchStatusresolved => closed
2014-03-25 19:47hudsonbotCheckin
2014-03-25 19:47hudsonbotNote Added: 0065445
2015-10-30 09:31caristuRelationship addedrelated to 0031305
2015-11-13 08:48caristuRelationship addedrelated to 0028977
2024-03-26 18:36caristuRelationship addedrelated to 0055060

Notes
(0064305)
iperdomo   
2014-02-18 06:33   
The issue can be easily reproduced by installing the examples module [1], and applying the attached AD_FIELD.xml.diff patch.

[1] https://code.openbravo.com/erp/mods/org.openbravo.client.application.examples [^]
(0065387)
hgbot   
2014-03-24 12:06   
Repository: erp/devel/pi
Changeset: 8780b04632631f7512582fcb3e6b74faf1a749de
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Mon Mar 24 16:33:35 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/8780b04632631f7512582fcb3e6b74faf1a749de [^]

Fixes Issue 0025754, Fixes Issue 25359: Property fields are evaluated on NEW request

When a new record is created, property fields were not evaluated and default values were sent.
Now the property fields are tried to be evaluated, if value is not found, null is returned.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0065399)
AugustoMauch   
2014-03-24 15:45   
Code reviewed and verified in pi@8780b0463263
(0065445)
hudsonbot   
2014-03-25 19:47   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/05169b1f5a79 [^]
Maturity status: Test