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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021741
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-09-25 11:492012-10-11 07:50
ReportermiruritaView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0MP17
StatusclosedFix in branchpiFixed in SCM revision3a5e020f0c97
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Todbaz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021741: Pick&Execute under some circumstances is not retrieving the selected record ID

DescriptionPick&Execute under some circumstances is not retrieving the selected record ID

"inpcProjectId" parameter contains header contract ID.

------------------------------------------------------
    "inpissummary":"Y",
    "inpisactive":"Y",
    "inpcProjectId":"81066B364742464DB75269440E8A3B86",
    "inpprojectcategory":"OBHCNTR_PARENT",
    "inpadClientId":"23C59575B9CF467C9620760EB255B389",
    "C_Project_ID":"81066B364742464DB75269440E8A3B86",
    "inpadOrgId":"B843C30461EA4501935CB1D125C9C25A",
    "inpemObhcntrDocumentno":"1000004",
    "inpvalue":"Test1",
    "inpname":"Test1",
    "inpcBpartnerId":"A6750F0D15334FB890C254369AC750A8",
    "inpcBpartnerLocationId":"6518D3040ED54008A1FC0C09ED140D66",
    "inpdescription":null,
    "inpstartdate":"01-09-2012",
    "inpdatefinish":"31-10-2012",
    "inpcCurrencyId":"102",
    "inpcPaymenttermId":"66BA1164A7394344BB9CD1A6ECEED05D",
    "inpmPricelistId":"AEE66281A08F42B6BC509B8A80A33C29",
    "inpfinPaymentmethodId":"A97CFD2AFC234B59BB0A72189BD8FC2A",
    "inpsalesrepId":"C3503BEFB3CB4848A674284A656163B9",
    "inpresponsibleId":"6F96792A1F2142DCA3E98FE5C6570256",
    "inpadUserId":"6B1E8F0CA1524850AB3A7F9AE475A16F",
    "inpprojectstatus":"OP",
    "inpemObhcntrContracttotalamount":"66,00",
    "inpTabId":"8F9CA53965834621900034A7C378127E",
    "inpwindowId":"279D7835E0C648F0987B421752523387",
    "inpTableId":"203",
    "inpkeyColumnId":"C_Project_ID",
    "keyProperty":"id",
    "inpKeyName":"inpcProjectId",
    "keyColumnName":"C_Project_ID",
    "keyPropertyType":"_id_13",
------------------------------------------------------
Steps To Reproduce1) Install the following modules
https://code.openbravo.com/private/eulen/org.openbravo.contract/ [^]
https://code.openbravo.com/private/eulen/org.openbravo.contract.hierarchical/ [^]
https://code.openbravo.com/private/eulen/org.openbravo.project.budget/ [^]

2) Go to "Budget Account Groups" window
2.1) Create new group
      - Name: Group1
3) Go to "Budget Account" window
3.1) Create a new budget account
      - Account Group: Group1
      - Account Element: 10000 - Capital social
4) Go to "Contract" window
4.1) Create a header record:
  + Name: parent
  + Search Key: parent
5) Go to Lines tab and create a child record
  + Name: child
  + Search Key: child
6) Click on "Set account amount" button
7) In the pick&execute popup enter 100 as amount
8) Important: put a breakpoint on
org.openbravo.project.budget.process.PickSelectLines java class line 43
9) Click on Done
10) Go to eclipse and try to retrieve the id of the contract line.
jsonRequest.getString("inpcProjectId");
previous statement is returning the id of the header record.
Note: header and lines tab are based on the same table (c_project).
TagsNo tags attached.
Attached Filesdiff file icon issue21741.diff [^] (3,713 bytes) 2012-10-04 10:10 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00227133.0MP19 closedAugustoMauch Pick/Edit is not working correctly when it is associated to the lines tab instead of to the header 
related to defect 0037465 closedcaristu Same process definition in several tabs in same window sends wrong information to server 

-  Notes
(0052544)
mirurita (developer)
2012-09-25 11:50

This issue is important for Contract Management project.
(0052849)
hgbot (developer)
2012-09-27 19:38

Repository: erp/devel/pi
Changeset: 3b92f8d1358acf08e5ac20ed0ec71bdc0d9c6ebd
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Sep 27 19:37:28 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3b92f8d1358acf08e5ac20ed0ec71bdc0d9c6ebd [^]

Fixes issue 21741: Pick&Execute under some circumstances is not retrieving the selected record ID

The root cause of this problem is that the context information was getting retrieved from the header tab, instead of the tab that was selected when the pick a
nd execute window was selected. Another change has been done so that that same tab will be selected when the P&E window is closed, otherwise the record could not be refreshed, because the row ID saved in the window belong to the tab that was focused when the P&E window was opened.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
(0052852)
dbaz (developer)
2012-09-27 23:14

The fix is not complete.

If you see this line:

https://code.openbravo.com/erp/devel/pi/rev/3b92f8d1358acf08e5ac20ed0ec71bdc0d9c6ebd#l2.7 [^]

at the end the previous active view is set as active view again, this is ok.
The problem is with the code previous to that.

As you can see, there is a function that sets a message in the view. This happens only if the backend returns a message.

The problem is that in the way the solution is implemented, it always will return the message window to the parent tab instead to the "good" tab.

Now my question is that what "good" tab means: There are two possible interpretations:
a) The active one from where you have pushed the process button. The fix in this case I think is as easy as put the line:
this.sourceView.setAsActiveView();
before
if (message) { ...

b) The view where the button belongs: so, if for example, the process belongs to the parent, but you have the focus in the child, and from the child you press the process button, the returned message should be draw in the parent tab, since the process belongs to it.

To do tests with messages, you can hardcode a message directly in the javascript to ensure always something is displayed. Example, add in this line
https://code.openbravo.com/erp/devel/pi/file/3b92f8d1358a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js#l200 [^]
this code:

message.severity = 'error';
message.text = 'This is a test message';
(0052925)
hudsonbot (developer)
2012-09-28 14:39

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/6d2f8cffd4b1 [^]

Maturity status: Test
(0052929)
hgbot (developer)
2012-09-28 15:29

Repository: erp/devel/pi
Changeset: a3f3fdcb497069c26d26f0ae2f505dd1ad7691e9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 28 15:28:44 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a3f3fdcb497069c26d26f0ae2f505dd1ad7691e9 [^]

Related to issue 21741: Backout of changeset 18066

The changed that only fixed this issue partially has been backed out. The complete fix will be included in MP17.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
(0053046)
hudsonbot (developer)
2012-10-04 18:18

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

Maturity status: Test
(0053116)
hgbot (developer)
2012-10-08 16:00

Repository: erp/devel/pi
Changeset: 7b49d037a0cfd3923b867165523ca3f38c2631af
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Oct 08 15:52:10 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7b49d037a0cfd3923b867165523ca3f38c2631af [^]

Fixes issue 21741:P&E is not retrieving the selected record ID

Now, after returning from a P&E process, the focus goes to the tab owner of the process, following the same behavior as the non P&E processes.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
(0053165)
dbaz (developer)
2012-10-09 13:11

The returned messge (if exists) should also be displayed in the tab where the button belongs to
(0053170)
hgbot (developer)
2012-10-09 13:22

Repository: erp/devel/pi
Changeset: 3a5e020f0c97ca7f84ae27f52e27d55362738534
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 09 13:20:36 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3a5e020f0c97ca7f84ae27f52e27d55362738534 [^]

Fixes issue 21741: P&E return messages are shown in the process owner view

Before the fix, the messages returned by the P&E windows were shown in the header view, but it should be shown in the view to which the process belongs to.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
(0053175)
dbaz (developer)
2012-10-09 14:15

Reviewed @ changeset: 18175 - f2ec6da4445f
(0053219)
hudsonbot (developer)
2012-10-10 16:35

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

Maturity status: Test
(0053278)
hudsonbot (developer)
2012-10-11 07:50

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/63dfc135f2a1 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2012-09-25 11:49 mirurita New Issue
2012-09-25 11:49 mirurita Assigned To => AugustoMauch
2012-09-25 11:49 mirurita Modules => Core
2012-09-25 11:50 mirurita Note Added: 0052544
2012-09-25 11:50 mirurita Steps to Reproduce Updated View Revisions
2012-09-25 11:56 mirurita Description Updated View Revisions
2012-09-27 19:19 AugustoMauch Issue Monitored: dbaz
2012-09-27 19:19 AugustoMauch Closed by => dbaz
2012-09-27 19:38 hgbot Checkin
2012-09-27 19:38 hgbot Note Added: 0052849
2012-09-27 19:38 hgbot Status new => resolved
2012-09-27 19:38 hgbot Resolution open => fixed
2012-09-27 19:38 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3b92f8d1358acf08e5ac20ed0ec71bdc0d9c6ebd [^]
2012-09-27 23:14 dbaz Note Added: 0052852
2012-09-27 23:14 dbaz Status resolved => new
2012-09-27 23:14 dbaz Resolution fixed => open
2012-09-28 14:39 hudsonbot Checkin
2012-09-28 14:39 hudsonbot Note Added: 0052925
2012-09-28 15:29 hgbot Checkin
2012-09-28 15:29 hgbot Note Added: 0052929
2012-10-04 10:10 AugustoMauch File Added: issue21741.diff
2012-10-04 10:11 AugustoMauch Status new => scheduled
2012-10-04 10:11 AugustoMauch fix_in_branch => pi
2012-10-04 18:18 hudsonbot Checkin
2012-10-04 18:18 hudsonbot Note Added: 0053046
2012-10-08 16:00 hgbot Checkin
2012-10-08 16:00 hgbot Note Added: 0053116
2012-10-08 16:00 hgbot Status scheduled => resolved
2012-10-08 16:00 hgbot Resolution open => fixed
2012-10-08 16:00 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/3b92f8d1358acf08e5ac20ed0ec71bdc0d9c6ebd [^] => http://code.openbravo.com/erp/devel/pi/rev/7b49d037a0cfd3923b867165523ca3f38c2631af [^]
2012-10-09 13:11 dbaz Note Added: 0053165
2012-10-09 13:13 dbaz Status resolved => new
2012-10-09 13:13 dbaz Resolution fixed => open
2012-10-09 13:22 hgbot Checkin
2012-10-09 13:22 hgbot Note Added: 0053170
2012-10-09 13:22 hgbot Status new => resolved
2012-10-09 13:22 hgbot Resolution open => fixed
2012-10-09 13:22 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/7b49d037a0cfd3923b867165523ca3f38c2631af [^] => http://code.openbravo.com/erp/devel/pi/rev/3a5e020f0c97ca7f84ae27f52e27d55362738534 [^]
2012-10-09 14:15 dbaz Note Added: 0053175
2012-10-09 14:15 dbaz Status resolved => closed
2012-10-09 14:15 dbaz Fixed in Version => 3.0MP17
2012-10-10 16:35 hudsonbot Checkin
2012-10-10 16:35 hudsonbot Note Added: 0053219
2012-10-11 07:50 hudsonbot Checkin
2012-10-11 07:50 hudsonbot Note Added: 0053278
2013-01-10 11:12 AugustoMauch Relationship added related to 0022713
2017-12-13 09:54 caristu Relationship added related to 0037465


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker