Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminoralways2012-12-19 18:272013-03-04 12:08
ReporterVictorVillarView Statuspublic 
Assigned ToAugustoMauch 
PriorityhighResolutionfixedFixed in Version3.0MP21
StatusclosedFix in branchFixed in SCM revision6549f19a33f2
ProjectionnoneETAnoneTarget Version3.0MP21
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Tomarvintm
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0022638: Configure the Selector Display Field, of a selector based on a view, does not work

DescriptionConfigure the Selector Display Field, of a selector based on a view, does not work
Steps To ReproduceAs System Administrator

 create a new module in development.
 Create a new reference:
 Search as parent reference (because OBUISEL_Selector Reference as parent does not work)
     Defined the selector based on m_product_price_warehouse_v view
     Defined the fields of the selector (copy the Product reference, as a guide) and the as the value field, and Name as Display field.

Assign this reference to the m_product_id column of the c_orderline table

It is not necessary to compile if you have your module in development.

Check it in Purchase/Sales order,
 The product name is OK in grid view, but is not in Form view.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 00225233.0MP22 closedAugustoMauch It is not possible to use the OBUISEL_Selector Reference as parent reference for selectors based on views. 

-  Notes
shankarb (developer)
2013-02-04 10:07

The issue is, reference with Parent Reference as Selector with a view in defined selector does not work. Eg., m_product_price_warehouse_v.

I created a simple view in pi and mapped it to the reference and I was able to save the row properly. Here is the code of the view.

CREATE OR REPLACE VIEW m_product_simple AS
 SELECT m_product.m_product_id AS id, AS product
   FROM m_product
 LIMIT 10;

The view m_product_price_warehouse_v has more than one row for each product id and I think that is causing the issue.
AugustoMauch (developer)
2013-02-06 18:12

I think this issue is not reproducible.

To test it, set the field Name as the Display Field in the Product search reference, restart tomcat, and check that the reference works properly in the Sales Order window.
VictorVillar (developer)
2013-02-19 09:42

After creating the selector and navigating to Purchase/Sales order, if you create a new register(Header and Line) the problem is not reproducible.
But if you log out and log in, you navigate to Purchase/Sales order window and check one register created you will be able to reproduce it.
hgbot (developer)
2013-02-27 13:47

Repository: erp/devel/pi
Changeset: 6549f19a33f28ea6804b8c18b26ae2dbc800ea61
Author: Augusto Mauch <augusto.mauch <at>>
Date: Wed Feb 27 13:46:25 2013 +0100
URL: [^]

Fixes issue 22638: Enables using display fields in selectors based on views

The root problem was in the implementation of DalUtil.getValueFromPath. Two parameters are passed to that function, a BOB and a propertyPath. In selectors based on tables, the property always belongs to the BOB, but this is not always true for selectors based on views. I.e., in the Product selector, if the Product field is selected as value field and the Name field as display field, the following call will be made:

DalUtil.getValueFromPath(productBOB, "").

The product BOB does not have a product (first part of property, but the view has. This has been solved by making recursive calls to getValueFromPath, stripping each time the first part of the propertyPath. This would be the execution for the previous example:
DalUtil.getValueFromPath(productBOB, "")
   - The productBOB does not have a product property
   - return DalUtil.getValueFromPath(productBOB, "name")
      * The productBOB does have a name property, it returns its value

M src/org/openbravo/dal/core/
hudsonbot (developer)
2013-03-02 05:48

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2012-12-19 18:27 VictorVillar New Issue
2012-12-19 18:27 VictorVillar Assigned To => AugustoMauch
2012-12-19 18:27 VictorVillar Modules => Core
2012-12-19 18:27 VictorVillar Triggers an Emergency Pack => No
2012-12-19 18:27 VictorVillar Relationship added depends on 0022523
2012-12-19 18:27 VictorVillar Issue Monitored: networkb
2013-01-29 18:42 AugustoMauch Assigned To AugustoMauch => shankarb
2013-01-31 15:27 AugustoMauch Status new => feedback
2013-02-04 10:07 shankarb Note Added: 0056118
2013-02-04 17:07 VictorVillar Status feedback => scheduled
2013-02-04 17:07 VictorVillar fix_in_branch => pi
2013-02-05 17:50 jonalegriaesarte Target Version 3.0MP20 => 3.0MP21
2013-02-05 17:50 jonalegriaesarte fix_in_branch pi =>
2013-02-06 10:34 AugustoMauch Status scheduled => acknowledged
2013-02-06 10:34 AugustoMauch Assigned To shankarb => AugustoMauch
2013-02-06 18:11 AugustoMauch Status acknowledged => scheduled
2013-02-06 18:11 AugustoMauch fix_in_branch => pi
2013-02-06 18:12 AugustoMauch Note Added: 0056234
2013-02-06 18:12 AugustoMauch Status scheduled => feedback
2013-02-19 09:42 VictorVillar Status feedback => scheduled
2013-02-19 09:42 VictorVillar Note Added: 0056539
2013-02-27 13:38 AugustoMauch Issue Monitored: marvintm
2013-02-27 13:38 AugustoMauch Review Assigned To => marvintm
2013-02-27 13:38 AugustoMauch fix_in_branch pi =>
2013-02-27 13:47 hgbot Checkin
2013-02-27 13:47 hgbot Note Added: 0056813
2013-02-27 13:47 hgbot Status scheduled => resolved
2013-02-27 13:47 hgbot Resolution open => fixed
2013-02-27 13:47 hgbot Fixed in SCM revision => [^]
2013-03-02 05:48 hudsonbot Checkin
2013-03-02 05:48 hudsonbot Note Added: 0056921
2013-03-04 12:08 marvintm Status resolved => closed
2013-03-04 12:08 marvintm Fixed in Version => 3.0MP21

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker