|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Openbravo ERP] A. Platform||minor||always||2012-06-11 16:21||2012-08-23 13:50|
|Priority||high||Resolution||fixed||Fixed in Version||3.0MP15|
|Status||closed||Fix in branch||pi||Fixed in SCM revision||d886ecbd34d6|
|OS Version||Database version||Ant version|
|Product Version||pi||SCM revision|
|Review Assigned To||dbaz|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0020722: Lines of purchase/sales order/invoice do not appear when creating them by process buttons, if the grid is filtered by BP
|Description||Lines of purchase/sales order/invoice do not appear when creating them by process buttons, if the grid is filtered by BP.|
Example: if you filter the Sales Invoice grid by a Business Partner and then create a new record, when creating the lines from an order you get the following message in the lines:
"Select a parent record in order to view its children here"
Anyway, the documents are created correctly.
|Steps To Reproduce||As a Group Admin Role:|
Go to the Sales Order screen
Filter the grid by Business Partner
Create a Sales Order for a different Business Partner
Click on the "Copy from Order" button
Select an order and click OK
Notice that the following message is showed in the Lines tab:
Select a parent record in order to view its children here.
|Tags||No tags attached.|
|Attached Files||issue20722.diff [^] (9,031 bytes) 2012-07-23 16:52 [Show Content]|
When a filter is set, the only visible records will be those filtered, and those created after the filter was set. If the form is reloaded, only those filtered will be visible, the ones created after the filter was set will not be shown.
In the steps to reproduce of this issue, a record with business partner 'A' is created after setting a filter on business partner 'B'. Then, the Copy from Order process is used to add lines to the new record. After this process is executed the grid is refreshed, so only the records that comply with the filter will be shown, making the last one created not visible.
In this line  the current row is refreshed and at this point  the whole view is refreshed. When it is refreshed, the filter is used to retrieve the rows that will be shown, and the recently created row will not be shown if it does not comply with the filter.
 https://code.openbravo.com/erp/devel/pi/file/3da2aed89a8d/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js#l172 [^]
 https://code.openbravo.com/erp/devel/pi/file/3da2aed89a8d/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js#l159 [^]
The view needs to be refreshed in order to show the new order lines.
Proposed solution: add a new flag, keepCurrentRow to ob-standard-view.refresh and to ob-view-grid.refresh. This flag should modify the criteria, so that not only the fields that comply with the filter are retrieved, but also the currently selected one.
|This flag would only be used when refreshing the view from the closeProcessPopup function. When the view is refreshed using the refresh button in the status bar, only the filtered rows should be retrieved.|
In reply to Augusto´s question below :
RGO: In grid mode it works as intended. When the user inserts a new row, and saves it, it should be visible, even though the column filter would exclude it. A refresh is an deliberate action and will re-apply the filter.
In form mode however, no grid filters should be applied at all. The form mode does not need or want to know about underlying grid filters. So after having saved a new form, no filters are applied. When the form view is closed, filters will be applied to the grid.
For processes (regardless whether they are invoked from grid or form view, and this is the initial issue mentioned by ngarcia) the behavior should be as such that the newly created record is visible until a user-initiated refresh is done. So, it should behave as if a new row was inserted into the grid regularly.
Generic statement: any new or modified record (either by the user or by a process) must be visible after having saved, regardless of filters.
 "Hi Rob,
Hi have been talking to Ivan about how the refresh in the grid view should work, and we would like to have your feedback.
This is how it currently works:
1) if the user enters a text in a filter (i.e. 'Hoteles buenas noches' in the business partner field of the header tab of the sales order window), initially only the records that comply with the filter are shown.
2) if the user then adds a new record, but with contents that do not comply with the filter (i.e. a new order with business partner = 'Alimentos y supermercados'), then the visible registers will be those that comply with the filter plus the new one.
3a) if the user then clicks the refresh button, then only the records that comply with the filter will be shown
3b) if the user executes a process (i.e. Copy from order) on the recently created record, the the process is completed there will be an implicit refresh, and the record will not be visible in the grid (see ).
I think that 3a) works as intented, but that in 3b) the record that has been used for the process should not dissapear after the process is completed should remain visible. So, the general rule would be:
if the user executes an explicit refresh, only the records that comply with the filter will be shown
after executing a process on a record, that record should remain visible after the implicit refresh is executed.
What do you think? Could you post a note in  about how this should work?"
The fix for this issue is risky, because it has required to change the code used to filter the grid records.
The fix will be pushed to pi for mp15, and for now it is available attached to this issue.
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 06 08:34:05 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d886ecbd34d679352b46ba22fe368727e5773fe8 [^]
Fixes issue 20722: Selected record does not dissapear after button processing
When the grid is refreshed due to the execution of a process, the selected record does not dissapear, even if it does not comply with the filter criteria. But, if the user clicks on the Refresh Grid button, the only records that will be shown will be those that match the filter.
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Aug 14 13:15:32 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0ce5bb9039c27899d455693e3e6895e8f9d345e1 [^]
Fixes issue 21347: Fixed call to old version of refresh()
In the fix os issue 20722, the signature of the refresh function was added to include a third parameter. There were in the code calls to a previous version of that function, that needed to be updated to support the new signature.
|Issue reopened to enter Closed by field|
This issue strictly fixed what is described in it. But the solution is not complete, so new issue 21437 has been opened.
Anyway this issue is fixed, so I close it.
Reviewed @ changeset: 17752 - f1c506df75cd
|2012-06-11 16:21||ngarcia||New Issue|
|2012-06-11 16:21||ngarcia||Assigned To||=> mirurita|
|2012-06-11 16:21||ngarcia||Modules||=> Core|
|2012-06-11 16:25||mirurita||Assigned To||mirurita => jonalegriaesarte|
|2012-06-12 12:55||ngarcia||Issue Monitored: networkb|
|2012-06-21 12:18||ioritzCia||Assigned To||jonalegriaesarte => alostale|
|2012-06-21 12:18||ioritzCia||Category||03. Procurement management => A. Platform|
|2012-07-20 11:19||AugustoMauch||Note Added: 0050771|
|2012-07-20 12:34||AugustoMauch||Note Added: 0050778|
|2012-07-20 12:49||AugustoMauch||Note Added: 0050779|
|2012-07-20 12:49||AugustoMauch||Assigned To||alostale => AugustoMauch|
|2012-07-20 12:51||AugustoMauch||Note Added: 0050780|
|2012-07-23 10:40||rgoris||Note Added: 0050790|
|2012-07-23 16:52||AugustoMauch||File Added: issue20722.diff|
|2012-07-23 16:54||AugustoMauch||Note Added: 0050797|
|2012-07-23 16:55||AugustoMauch||Status||new => scheduled|
|2012-07-23 16:55||AugustoMauch||fix_in_branch||=> pi|
|2012-07-23 17:03||jonalegriaesarte||Target Version||3.0MP14 => 3.0MP15|
|2012-07-23 17:03||jonalegriaesarte||fix_in_branch||pi =>|
|2012-08-06 08:35||hgbot||Note Added: 0051102|
|2012-08-06 08:35||hgbot||Status||scheduled => resolved|
|2012-08-06 08:35||hgbot||Resolution||open => fixed|
|2012-08-06 08:35||hgbot||Fixed in SCM revision||=> http://code.openbravo.com/erp/devel/pi/rev/d886ecbd34d679352b46ba22fe368727e5773fe8 [^]|
|2012-08-06 09:37||AugustoMauch||Relationship added||has duplicate 0021295|
|2012-08-14 13:11||AugustoMauch||Relationship added||related to 0021352|
|2012-08-14 13:13||AugustoMauch||Relationship deleted||related to 0021352|
|2012-08-14 13:13||AugustoMauch||Relationship added||related to 0021347|
|2012-08-14 13:16||hgbot||Note Added: 0051280|
|2012-08-14 14:37||AugustoMauch||Note Added: 0051294|
|2012-08-14 14:37||AugustoMauch||Status||resolved => new|
|2012-08-14 14:37||AugustoMauch||Resolution||fixed => open|
|2012-08-14 14:37||AugustoMauch||Closed by||=> dbaz|
|2012-08-21 21:53||AugustoMauch||Status||new => scheduled|
|2012-08-21 21:53||AugustoMauch||fix_in_branch||=> pi|
|2012-08-21 21:53||AugustoMauch||Status||scheduled => resolved|
|2012-08-21 21:53||AugustoMauch||Resolution||open => fixed|
|2012-08-23 13:45||dbaz||Relationship added||related to 0021437|
|2012-08-23 13:50||dbaz||Note Added: 0051503|
|2012-08-23 13:50||dbaz||Status||resolved => closed|
|2012-08-23 13:50||dbaz||Fixed in Version||=> 3.0MP15|
|Copyright © 2000 - 2009 MantisBT Group|