Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020585
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-05-23 11:342012-07-26 11:17
ReportermiruritaView Statuspublic 
Assigned Todbaz 
PriorityurgentResolutionfixedFixed in Version3.0MP14
StatusclosedFix in branchFixed in SCM revisiondeb2d74464b2
ProjectionnoneETAnoneTarget Version3.0MP14
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020585: [Pick&Execute] Sending null value in the table primary column info when the focus is on other tab.

Descriptionif you open a pick&execute window having the focus in other tab. (i.e. the button/process belongs to the header and you have the focus on lines tab) the header primary key is sent with null value to the backend


For example in "Return to vendor" window when you click on Pick&Edit Lines button the request contains

"inpcOrderId":null,


{
    "inpdocaction":"CO",
    ...
    "inpistaxincluded":"N",
    "inpcOrderId":null,
    "inpisprinted":"N",
    "inpisinvoiced":"N",
Steps To Reproduce1) Go to Return to Vendor window
2) Create a new record for:
    Org: F&B US, Inc.
    Business Partner: Be Soft Drinker, Inc.
3) Save.
4) Important!!!!: change the focus to Lines tab
5) Click on Pick/Edit Lines button
6) Clear the filter.
7) Select any line and enter a valid number on "Returned" cell.
8) Click Done

If you debug on SRMOPickEditLines java class the inpcOrderId you get is "null".
final String strOrderId = jsonRequest.getString("inpcOrderId");

If you click on Pick/Edit lines button having the focus on header tab the inpcOrderId contains the order identifier.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0020578 closedSandrahuguet Error message appears without any valid information in Return to vendor screen 

-  Notes
(0050808)
dbaz (developer)
2012-07-24 14:31

The problem track from inside to outside:


SRMOPickEditLines.java gets the "inpcOrderId" from the given json. This json is provided in:

ob-pick-and-execute-view.js in the "doProcess" function through the "allProperties" variables obtained from activeView.getContextInfo. This function is set in:

ob-pick-and-execute-grid.js. Here it obtains a "contextInfo" variable from "this.view.parentWindow.activeView.getContextInfo" (the next values addition to the array are irrelevant for this issue). This "getContextInfo" is here:

ob-standard-view.js where there is a "properties = this.propertyToColumns;". In this "this.propertyToColumns" for this case there are (among others):
* inpcOrderId
* C_Order_ID

"this.propertyToColumns" is set in "prepareViewFields" and is obtained from "this.initialPropertyToColumns" which is created in ob-view-tab.js.ftl


For this particular case, when we call the "Pick/Edit Lines" view from "Lines", when there are no lines, and then we modify "Returned" in the grid, "inpcOrderId" is null since the call has been done from a place where there is no line (inpcOrderlineId), so we can not track to the parent/header order (inpcOrderId).
But everything is not lost, since we have always available "C_Order_ID" in all the hierarchy because it doesn't depend on the selected record (at any level) but on the view itself
(0050809)
dbaz (developer)
2012-07-24 14:33

Since it is a "functional" issue, the fix should be reviewed by "SRMOPickEditLines.java" developer to ensure that the fix is ok and it doesn't cause any regression.
(0050810)
hgbot (developer)
2012-07-24 14:36

Repository: erp/devel/pi
Changeset: deb2d74464b20b01978279fb4b2e5dd6b5f43c0b
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Tue Jul 24 14:35:51 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/deb2d74464b20b01978279fb4b2e5dd6b5f43c0b [^]

Fixed issue 20585: 'Return to Vendor' [PNE] now works ok called from lines
when there are not lines yet

---
M src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
---
(0050817)
hgbot (developer)
2012-07-24 18:48

Repository: erp/devel/pi
Changeset: 9ccfd2754c6a8c9c88ed9b8914655298f30afea6
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Tue Jul 24 18:47:18 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9ccfd2754c6a8c9c88ed9b8914655298f30afea6 [^]

Related to issue 20585: change RMShipmentPickEditLines and SRMOPickEditLines.
Same problem was affecting Return to Vendor Shipment and Return Material Receipt.
When the focus is NOT in the tab of the button (i.e. any child tab) and the tab does not
contain any record, the inpcXXXXId parameter contains null string. Use table primary key
column name instead (i.e. C_Order_ID, M_InOut_ID, ...) because it always contains the id of the selected
header record.

---
M src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java
M src/org/openbravo/common/actionhandler/RMShipmentPickEditLines.java
M src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
---
(0050826)
mirurita (developer)
2012-07-25 12:10

Alternative Test Plan I
1) Create a Return to Vendor for "Be Soft Drinker, Inc."
2) Go to Return to Vendor Shipment window
3) Create a new record for:
    Org: F&B US, Inc.
    Business Partner: Be Soft Drinker, Inc.
4) Save.
5) Important!!!!: change the focus to Lines tab
6) Click on Pick/Edit Lines button
7) Clear the filter.
8) Select any line and enter a valid number on "Ship Qty" cell.
9) Click Done
10) Verify: the line should be included.

Alternative Test Plan II
1) Create a Return from Customer for "Healthy Food Supermarkets, Co."
2) Go to Return to Vendor Shipment window
3) Create a new record for:
    Org: F&B US, Inc.
    Business Partner: Healthy Food Supermarkets, Co.
4) Save.
5) Important!!!!: change the focus to Lines tab
6) Click on Pick/Edit Lines button
7) Clear the filter.
8) Select any line and enter a valid number on "Ship Qty" cell.
9) Click Done
10) Verify: the line should be included.
(0050874)
hudsonbot (developer)
2012-07-26 02:42

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/5edf203d5780 [^]

Maturity status: Test
(0050876)
hudsonbot (developer)
2012-07-26 02:42

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/5edf203d5780 [^]

Maturity status: Test
(0050895)
mirurita (developer)
2012-07-26 11:17

code review + testing plans executed successfully

- Issue History
Date Modified Username Field Change
2012-05-23 11:34 mirurita New Issue
2012-05-23 11:34 mirurita Assigned To => alostale
2012-05-23 11:34 mirurita Modules => Core
2012-05-23 13:19 mirurita Summary Pick&Execute sending null value in the table primary column info when the focus is on other tab. => [Pick&Execute] Sending null value in the table primary column info when the focus is on other tab.
2012-05-23 15:32 alostale Assigned To alostale => guilleaer
2012-05-24 17:03 mirurita Relationship added related to 0020578
2012-06-04 19:35 mirurita Priority high => urgent
2012-07-20 18:37 jonalegriaesarte version => pi
2012-07-20 18:37 jonalegriaesarte Target Version => 3.0MP14
2012-07-24 14:31 dbaz Note Added: 0050808
2012-07-24 14:33 dbaz Note Added: 0050809
2012-07-24 14:33 dbaz Assigned To guilleaer => dbaz
2012-07-24 14:36 hgbot Checkin
2012-07-24 14:36 hgbot Note Added: 0050810
2012-07-24 14:36 hgbot Status new => resolved
2012-07-24 14:36 hgbot Resolution open => fixed
2012-07-24 14:36 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/deb2d74464b20b01978279fb4b2e5dd6b5f43c0b [^]
2012-07-24 18:48 hgbot Checkin
2012-07-24 18:48 hgbot Note Added: 0050817
2012-07-25 12:10 mirurita Note Added: 0050826
2012-07-26 02:42 hudsonbot Checkin
2012-07-26 02:42 hudsonbot Note Added: 0050874
2012-07-26 02:42 hudsonbot Checkin
2012-07-26 02:42 hudsonbot Note Added: 0050876
2012-07-26 11:17 mirurita Note Added: 0050895
2012-07-26 11:17 mirurita Status resolved => closed
2012-07-26 11:17 mirurita Fixed in Version => 3.0MP14


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker