Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0022523 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 00. Application dictionary | minor | always | 2012-12-12 10:30 | 2013-03-22 09:35 | |||
Reporter | VictorVillar | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0MP22 | |||
Status | closed | Fix in branch | pi | Fixed in SCM revision | ad1497b9b864 | |||
Projection | none | ETA | none | Target Version | 3.0MP22 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 15579 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0022523: It is not possible to use the OBUISEL_Selector Reference as parent reference for selectors based on views. | |||||||
Description | It is not possible to use the OBUISEL_Selector Reference as parent reference for selectors based on views. | |||||||
Steps To Reproduce | As System Administrator create a new module in development. Create a new reference: OBUISEL_Selector Reference as parent reference Defined the selector based on m_product_price_warehouse_v view Defined the fields of the selector and the product.id as the value field. Assign this reference to the m_product_id column of the c_orderline table Compile, restart tomcat. Check it in Purchase/Sales order, Not possible to save a line, error: "La acción de guardado falló. New object ProductByPriceAndWarehouse(null) (key: 1000310_ProductByPriceAndWarehouse) refered to but not present in the import set" Also, it is not possible to navigate to the product window from the green arrow of the top of the selector field. | |||||||
Proposed Solution | If the reference created has "Search" as parent reference, owrks fine. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0056117) shankarb (viewer) 2013-02-04 10:06 |
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, m_product.name 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. |
(0056832) AugustoMauch (administrator) 2013-02-28 12:04 |
A patch for this issue has been attached. It will not be pushed to pi yet because a change has been in a very central component and it must be tested carefully. |
(0056834) AugustoMauch (administrator) 2013-02-28 12:26 |
Steps to reproduce: - Install the obx that is attached to this issue. It contains a selector based on a view. Check the selector, it is called ProductBasedOnView, and its column field has been set to product, which is the entity whose id is used in the value field of the selector. - Assign this selector to the Product column in the C_order table. - Create a new Sales Order and check that it is possible to add lines the same way that using the old reference (a Search based on a view). |
(0057001) jonalegriaesarte (viewer) 2013-03-04 13:17 |
Patch attached but, push will be included in MP22, because it has to be tested in depth |
(0057132) hgbot (developer) 2013-03-07 12:54 |
Repository: erp/devel/pi Changeset: ad1497b9b8641d58cebafce70b58c88e675e86df Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Thu Feb 28 11:58:13 2013 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/ad1497b9b8641d58cebafce70b58c88e675e86df [^] Fixes issue 22523: It is possible to use a selector reference based on a view The problem was that the referenced property of the column that used a selector reference based on a view was wrong. I.e. if a selector is created using the view m_product_price_warehouse_v, if the value field used is its product.id property, it would not be possible to save an order line using this selector because DAL would not be able to retrieve the product, it wo uld try to fetch a record from the m_product_price_warehouse_v view using the product id, which is not the same as the view primary key. To fix this, the user must set the column field of the defined selector so that it points to the entity used in the value field. A change has been done in SelectorDomainType.getForeignKeyColumn to ensure that this works with views. --- M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/model/domaintype/SelectorDomainType.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2012-12-12 10:30 | VictorVillar | New Issue | |
2012-12-12 10:30 | VictorVillar | Assigned To | => AugustoMauch |
2012-12-12 10:30 | VictorVillar | Modules | => Core |
2012-12-12 10:30 | VictorVillar | OBNetwork customer | => Yes |
2012-12-12 10:30 | VictorVillar | Support ticket | => 15579 |
2012-12-12 10:30 | VictorVillar | Resolution time | => 1360710000 |
2012-12-12 10:30 | VictorVillar | Triggers an Emergency Pack | => No |
2012-12-12 10:30 | VictorVillar | Issue Monitored: networkb | |
2012-12-19 18:27 | VictorVillar | Relationship added | blocks 0022638 |
2013-01-29 18:42 | AugustoMauch | Assigned To | AugustoMauch => shankarb |
2013-01-31 15:27 | AugustoMauch | Status | new => feedback |
2013-02-04 10:06 | shankarb | Note Added: 0056117 | |
2013-02-04 17:06 | VictorVillar | Status | feedback => scheduled |
2013-02-04 17:06 | 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:35 | AugustoMauch | Assigned To | shankarb => AugustoMauch |
2013-02-28 11:59 | AugustoMauch | File Added: issue22523.export | |
2013-02-28 11:59 | AugustoMauch | Status | acknowledged => scheduled |
2013-02-28 11:59 | AugustoMauch | fix_in_branch | => pi |
2013-02-28 12:04 | AugustoMauch | Note Added: 0056832 | |
2013-02-28 12:09 | AugustoMauch | File Added: org.openbravo.issue22523-1.0.0.obx | |
2013-02-28 12:26 | AugustoMauch | Note Added: 0056834 | |
2013-03-04 13:17 | jonalegriaesarte | Note Added: 0057001 | |
2013-03-04 13:17 | jonalegriaesarte | Target Version | 3.0MP21 => 3.0MP22 |
2013-03-04 13:17 | jonalegriaesarte | fix_in_branch | pi => |
2013-03-07 12:53 | AugustoMauch | Issue Monitored: marvintm | |
2013-03-07 12:53 | AugustoMauch | Review Assigned To | => marvintm |
2013-03-07 12:54 | hgbot | Checkin | |
2013-03-07 12:54 | hgbot | Note Added: 0057132 | |
2013-03-07 12:54 | hgbot | Status | scheduled => resolved |
2013-03-07 12:54 | hgbot | Resolution | open => fixed |
2013-03-07 12:54 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/ad1497b9b8641d58cebafce70b58c88e675e86df [^] |
2013-03-22 09:30 | marvintm | Status | resolved => closed |
2013-03-22 09:31 | marvintm | Fixed in Version | => 3.0MP21 |
2013-03-22 09:33 | marvintm | Status | closed => new |
2013-03-22 09:33 | marvintm | Resolution | fixed => open |
2013-03-22 09:34 | marvintm | Fixed in Version | 3.0MP21 => |
2013-03-22 09:34 | marvintm | Status | new => scheduled |
2013-03-22 09:34 | marvintm | fix_in_branch | => pi |
2013-03-22 09:34 | marvintm | Status | scheduled => resolved |
2013-03-22 09:34 | marvintm | Resolution | open => fixed |
2013-03-22 09:35 | marvintm | Status | resolved => closed |
2013-03-22 09:35 | marvintm | Fixed in Version | => 3.0MP22 |
Copyright © 2000 - 2009 MantisBT Group |