Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024926Openbravo ERP00. Application dictionarypublic2013-10-10 18:092013-12-23 08:22
gorkaion 
shankarb 
normalminorhave not tried
closedfixed 
20Gentoo
 
3.0MP30 
gorkaion
Core
No
0024926: Ability to disable parent key criteria on child tabs
When a child tab is created it always searches for a ParentProperty that relates the child tab with the parent tab. This parentProperty is then added in the criteria of the fetch to filter by the selected value in the parent tab.

In the Sales Order window. The order lines tab has the Order parent property. When a fetch is done to retrieve the lines a criteria is created to filter the Order lines by the Order selected in the parent tab.

When the parentProperty is not found the criteria includes a dummy criterion. This happens when the child tab is not directly related to the parent. In this case the filter has to be managed manually using the Where clause of the tab.

There are some cases where it is desired to force the usage of the where clause over the ''parentProperty''. For example when the child tab has 2 properties that relates it with the parent tab. In this cases the application is not working properly as it always filter the child tab by the same tab.
FIN_PaymentSchedule_Detail table has 2 foreign kays to FIN_PAymentSchedule table. One for payment plans of orders and the other one for payment plans of invoices.

1. Create a new tab on Sales Order based on FIN_Payment_Schedule (tab level 1)
2. CReate a new tab child of previous based on FIN_Payment_ScheduleDetail (tab level 2)
3. Generate fields for both tabs.
4. Go to Sales Order window and enter any booked order.
5. Check in existing Payment Plan and Payment Plan Details tabs that it has records.
6. Check in the new tabs that the child one don't shows any record.
7. Check that the call to the Datasource includes a wrong criteria:
criteria:{"fieldName":"invoicePaymentSchedule","operator":"equals","value":"62D82CEC44AD45319EAAA4C757E67D0E"}


Add a flag to disable the search of the parentProperty in the OBViewTab java class. getParentProperty() method. When the parentProperty is not found the request to the datasource includes a dummy criteria. Leaving the filtering to the whereclause.
No tags attached.
Issue History
2013-10-10 18:09gorkaionNew Issue
2013-10-10 18:09gorkaionAssigned To => AugustoMauch
2013-10-10 18:09gorkaionModules => Core
2013-10-10 18:09gorkaionTriggers an Emergency Pack => No
2013-10-11 13:15gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5092#r5092
2013-10-11 13:15gorkaionProposed Solution updated
2013-10-30 19:01shankarbAssigned ToAugustoMauch => shankarb
2013-11-28 17:30hgbotCheckin
2013-11-28 17:30hgbotNote Added: 0062458
2013-11-28 17:30hgbotStatusnew => resolved
2013-11-28 17:30hgbotResolutionopen => fixed
2013-11-28 17:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b74b44228aa6c4054fdb6457e7832e049bae32fb [^]
2013-11-28 18:21gorkaionReview Assigned To => gorkaion
2013-11-28 18:21gorkaionNote Added: 0062459
2013-11-28 18:21gorkaionStatusresolved => closed
2013-11-28 18:22gorkaionFixed in Version => 3.0MP30
2013-11-28 18:40hgbotCheckin
2013-11-28 18:40hgbotNote Added: 0062462
2013-12-02 09:20hgbotCheckin
2013-12-02 09:20hgbotNote Added: 0062474
2013-12-02 17:01hudsonbotCheckin
2013-12-02 17:01hudsonbotNote Added: 0062491
2013-12-02 17:01hudsonbotCheckin
2013-12-02 17:01hudsonbotNote Added: 0062494
2013-12-02 17:01hudsonbotCheckin
2013-12-02 17:01hudsonbotNote Added: 0062495
2013-12-23 08:22alostaleNote Added: 0063048

Notes
(0062458)
hgbot   
2013-11-28 17:30   
Repository: erp/devel/pi
Changeset: b74b44228aa6c4054fdb6457e7832e049bae32fb
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Nov 28 21:58:59 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b74b44228aa6c4054fdb6457e7832e049bae32fb [^]

Fixes Issue 0024926: Ability to disable parent key criteria on child tabs

* Added a new column disable_parent_key_column in ad_tab.
* The field name is 'Disable Parent Key Property' in Tab window.
* If the proeprty is checked in Tab, then the parentProperty will not be returned
and the whereClause has to be explicitly managed by the user or all the records of the table
in the current context will be displayed.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_TAB.xml
M src-db/database/model/tables/AD_TAB.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_TAB.xml
---
(0062459)
gorkaion   
2013-11-28 18:21   
Code reviewed and tested.
(0062462)
hgbot   
2013-11-28 18:40   
Repository: erp/devel/pi
Changeset: 0e17566151d428d77df2c91b10443a254fe97686
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Nov 28 23:09:09 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0e17566151d428d77df2c91b10443a254fe97686 [^]

Related to Issue 0024926: Added export data for other modules

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_TAB.xml
M modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_TAB.xml
---
(0062474)
hgbot   
2013-12-02 09:20   
Repository: erp/devel/pi
Changeset: 2322aa599cc3f0bfb0867e9d945fb623bda11e7b
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Mon Dec 02 13:47:34 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2322aa599cc3f0bfb0867e9d945fb623bda11e7b [^]

Related to Issue 0024926:Code refactoring

Code refactoring to prevent type conversions.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
---
(0062491)
hudsonbot   
2013-12-02 17:01   
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/9732e7b65447 [^]

Maturity status: Test
(0062494)
hudsonbot   
2013-12-02 17:01   
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/9732e7b65447 [^]

Maturity status: Test
(0062495)
hudsonbot   
2013-12-02 17:01   
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/9732e7b65447 [^]

Maturity status: Test
(0063048)
alostale   
2013-12-23 08:22   
Documentation in developers guide: http://wiki.openbravo.com/wiki/Standard_Windows#Tabs_hierarchy [^]