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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037465
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2017-12-12 18:062018-01-03 23:03
ReportervmromanosView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revision6dc5085e9168
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037465: Same process definition in several tabs in same window sends wrong information to server

DescriptionI have defined a window with a header and 2 tabs at the same level:

Header
Tab1 Tab2

An existing equivalent would be:
SalesOrder
Lines BasicDiscounts



Tab1 and Tab2 has associated the same Process Definition.
When a record is selected either in Tab1 or Tab2, the process definition detects:
 1. from which tab it has been called (through the "inpTabId" parameter)
 2. what is the key column name (through either "inpKeyName" or "keyColumnName" parameters)
 3. and what is the record id the user has selected to run the process (getting the value of the parameter name explained before).


When the process is launched for a record in Tab1 the server receives the proper context information.
However, when it's launched for a record in Tab2, the server receives some context from Tab2 (the fields that are displayed) [OK], but also some context information from Tab1 [WRONG].
Actually, this wrong context from Tab1 is null because obviously the user is not in that context.

It looks like, when you have the same process definition in different tabs at the same level, the server always receive the context from the first one instead of the one that is the current context from which the process was launched.


Here you have an example https://pastebin.com/Kg3GgfgC [^]

"TicketTax (line 31)" represents Tab1, and the context is OK. See specially:
 "inpTabId":"41437A37CD784E2CAE78C4F668D31986",
 "inpTableId":"45D52AB170B4486D99FA2A446873E7A1",
 "inpkeyColumnId":"Obcfr_Tickettax_ID",
 "inpKeyName":"inpobcfrTickettaxId",
 "keyColumnName":"Obcfr_Tickettax_ID",
 "inpobcfrTickettaxId":"5F0175D58BF84093A294CE0F57689F5A",
 "Obcfr_Tickettax_ID":"5F0175D58BF84093A294CE0F57689F5A"

"TicketReprint (line 68)" represents Tab2, where the context is wrong. See:
 "inpTabId":"41437A37CD784E2CAE78C4F668D31986", <-- Same as Tab1
 "inpTableId":"45D52AB170B4486D99FA2A446873E7A1", <-- Same as Tab1
 "inpKeyName":"inpobcfrTickettaxId", <-- Same as Tab1
 "keyColumnName":"Obcfr_Tickettax_ID", <-- Same as Tab1
    "inpterminal":null, <-- From Tab1, which is null
    "inpdocumentno":null,
    "inpobcfrTickettaxId":null,
    "Obcfr_Tickettax_ID":null,
    "inptaxrate":null,
    "inptaxbase":null,
    "inptaxamt":null,
Steps To ReproduceClone repo https://code.openbravo.com/erp/pmods/org.openbravo.certification.france [^] (rev 222d902490b7) in a retail instance.

Insert any record in POS Ticket window and 2 child tabs.
Press Export XML button for the child tabs. Open the files.
Verify TicketTax (Tab1) is properly exported, but TicketReprint (Tab2) actually exports a TicketTax.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0021741 closedAugustoMauch Pick&Execute under some circumstances is not retrieving the selected record ID 
related to defect 00275653.0PR14Q4 closedAugustoMauch Wrong context for add payment selector in transaction tab 

-  Notes
(0101007)
hgbot (developer)
2017-12-12 19:26

Repository: erp/devel/pi
Changeset: 5f8684771e7a64347795d0260905df1326403134
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Dec 12 19:25:59 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5f8684771e7a64347795d0260905df1326403134 [^]

related to issue 37465: initial code clean up

  - Removed the declaration of some unused variables.

---
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/toolbar/ob-action-button.js
---
(0101009)
hgbot (developer)
2017-12-13 09:51

Repository: erp/devel/pi
Changeset: 6dc5085e9168c8e3d07160859ec5e094c1b98ad5
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Dec 13 09:33:35 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6dc5085e9168c8e3d07160859ec5e094c1b98ad5 [^]

fixes bug 37465: problem with process definition in several tabs of same window

  When executing a standard process, the view owner of the related action button is used to retrieve the current record information to the server. In this case, to look for that owner view, we were going through all the views in the current window in order to find an action button referencing to the process we are executing. The first view found complying that requirement was considered the owner view. This approach is not valid in case we want to define in several tabs of the same window different buttons referencing to the same process definition.

  To fix the problem, now when we are opening the process we send the owner view of the action button as a parameter which is already supported by the infrastructure of the standard window. Thus, when executing the process we do not need anymore to go through all the views in the current window to find the owner view of the action button.

---
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/toolbar/ob-action-button.js
---
(0101053)
alostale (manager)
2017-12-15 10:18

reviewed + tested
(0101522)
hudsonbot (developer)
2018-01-03 12: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/c81e0d3cbab5 [^]
Maturity status: Test
(0101523)
hudsonbot (developer)
2018-01-03 12: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/c81e0d3cbab5 [^]
Maturity status: Test
(0101540)
hgbot (developer)
2018-01-03 23:03

Repository: erp/pmods/org.openbravo.certification.france
Changeset: 72d8384691e70b53896f7ac582d2734a96bbc8f5
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jan 03 12:13:46 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/72d8384691e70b53896f7ac582d2734a96bbc8f5 [^]

Add a new process definition to these entities:
1. TicketTax
2. TicketReprint
3. TerminalMonitor
4. AggregationDay
5. AggregationMonth
6. AggregationYear
It avoid behaviour explained on issue 37465, when the same process definition is
used in several tabs in same window, to don't send wrong information to server.

---
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M src-db/database/sourcedata/OBUIAPP_PROCESS.xml
---

- Issue History
Date Modified Username Field Change
2017-12-12 18:06 vmromanos New Issue
2017-12-12 18:06 vmromanos Assigned To => platform
2017-12-12 18:06 vmromanos Modules => Core
2017-12-12 18:06 vmromanos Triggers an Emergency Pack => No
2017-12-12 19:07 caristu Assigned To platform => caristu
2017-12-12 19:08 caristu Status new => scheduled
2017-12-12 19:26 hgbot Checkin
2017-12-12 19:26 hgbot Note Added: 0101007
2017-12-13 09:51 hgbot Checkin
2017-12-13 09:51 hgbot Note Added: 0101009
2017-12-13 09:51 hgbot Status scheduled => resolved
2017-12-13 09:51 hgbot Resolution open => fixed
2017-12-13 09:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6dc5085e9168c8e3d07160859ec5e094c1b98ad5 [^]
2017-12-13 09:52 caristu Review Assigned To => alostale
2017-12-13 09:54 caristu Relationship added related to 0021741
2017-12-13 09:56 caristu Relationship added related to 0027565
2017-12-15 10:18 alostale Note Added: 0101053
2017-12-15 10:18 alostale Status resolved => closed
2017-12-15 10:18 alostale Fixed in Version => 3.0PR18Q1
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101522
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101523
2018-01-03 23:03 hgbot Checkin
2018-01-03 23:03 hgbot Note Added: 0101540


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker