Notes |
|
|
This can be reproduced also when hiding a column from grid. |
|
|
(0070766)
|
hgbot
|
2014-10-07 13:18
|
|
Repository: erp/devel/pi
Changeset: c8400accd26c4125ebe15dfdfcc26705afa9bf74
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 07 13:16:06 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c8400accd26c4125ebe15dfdfcc26705afa9bf74 [^]
Fixes issue 27769: Record id not shown in the filter when a new field is added
When a foreign key field is being filtered using its id (i.e. by selecting a record from its drop down), its filterType property is set to 'id'. This property is then used in several places like in the getCriterion and getCriterion. The problem was that when adding/removing a field from the grid, the filter fields are rebuilt from scratch and the filterType property was being reset to its default value ('identifier'). To fix this, the list of foreign key fields being filtered by their id is stored before resetting the filter fields, and consulted when initializing the foreign key fields.
Also the foreign key cache needs to be persisted in order to be able to obtain the record's identifier given its id (in the criteria only the id is stored).
The getFKFilterAuxiliaryCache function has been moved from OBViewGrid to OBGrid so that it can also be used in Pick&Execute grids. This has no risk, as it did not use any code specific from OBViewGrid.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
|
|
|
|
Reopening, failed test cases 5 and 6 (see below)
Test cases:
All of them executed in sales order window, in all the cases check BP is filtered correctly and "==Alimentos y Supermercados" appears in the filter text box.
1. Add new grid column --> OK
1.1 Clear filters
1.2 Filter BP by Alimentos y Supermercados
1.3 Add Warehouse column
2. Remove grid column --> OK
2.1 Clear filters
2.2 Filter BP by Alimentos y Supermercados
2.3 Remove Warehouse column
3. Saved view --> OK
3.1 Save view
3.2 Close Sales Order window
3.3 Reopen Sales Order window
3.4 Applied saved view
4. Saved default view --> OK
4.1 Select saved view as default
4.2 Close Sales Order window
4.3 Reopen Sales Order window
5. Direct link from Quick Launch --> FAIL (was working in live)
5.1 Get direct link having the filter applied
5.2 Copy direct link in Quick Launch
--> filter is correctly applied but ID is seen in filter text box
6. Direct link from URL --> FAIL (was working in live)
6.1 Get direct link having the filter applied
6.2 Copy direct link in URL
--> filter is correctly applied but ID is seen in filter text box |
|
|
(0070775)
|
hgbot
|
2014-10-07 16:05
|
|
Repository: erp/devel/pi
Changeset: 7198f6b050d38d2e02db062f9f192e80344bf29e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 07 16:04:45 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7198f6b050d38d2e02db062f9f192e80344bf29e [^]
Fixes issue 27769: Record id not shown when opening link from URL
In the OBGrid.setFields function, the originally named fkCache was meant to store the information needed to restore the state of the foreign key columns after resetting the fields. The scope of that auxiliary cache was setField function, that is why it is deleted from the object before leaving the function.
The problem was that 'fkCache' was already being used to name another property. This property stores the id-identifier pairings of the criterias saved in direct links. As that property was being removed when the grid fields were set, if a tab was opened using a direct link the criterias on the foreign key columns showed their ids.
This problem has been fixed by renaming the temporal property used in the setFields function.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
---
|
|
|
|
|
|
|
|
|
|
|