Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030940Openbravo ERPB. User interfacepublic2015-09-26 02:192016-02-02 09:38
rbianchini 
NaroaIriarte 
normalmajoralways
closedfixed 
5
3.0PR15Q3.1 
pi 
AugustoMauch
Core
Production - Confirmed Stable
2015-01-28
3.0PR15Q2
https://code.openbravo.com/erp/devel/pi/rev/b71f486b4915 [^]
No
0030940: When add a second new line in goods movements, the product field is already filled
When you add the first new line (in form mode) in good movements, all fields are empty and when you select the product some fields are loaded, but when yos save the first line (Ctrl+s) and create a new line (the second one) with Ctrl+d, the product field is filled with the product from line one (or with the first product in the list). This is confusing for the user and the partner reports security problems.
1 - Log in ERP.
2 - Go to Goods Movements window.
3 - Create a new header.
4 - Create a new line clicking in "Create a new record in form" button and DO NOT save this record.
   4.1-Choose any product, after that, in "New Storage Bin" field, click in its magnifier.
   4.2-A new popup appears, then click any record and click OK button to select that record.
5 - Now, with Ctrl+d or with "Create a new record in form" button create another line.
6 - Observes that almost fields are already filled with the first line's product.
No tags attached.
depends on backport 00310543.0PR15Q4 closed NaroaIriarte When add a second new line in goods movements, the product field is already filled 
depends on backport 00310553.0PR15Q3.2 closed NaroaIriarte When add a second new line in goods movements, the product field is already filled 
depends on backport 00310563.0PR15Q2.6 closed NaroaIriarte When add a second new line in goods movements, the product field is already filled 
caused by defect 00287793.0PR15Q2 closed alostale Value of combo is not displayed after setting it with a trigger 
has duplicate defect 0031081 closed platform in SO line, product is selected by default 
related to defect 00313313.0PR16Q2 closed caristu When add new lines in sales order, the product field is already filled 
causes defect 0031217 closed platform Toolbar disappears under some circumnstances 
Issue History
2015-09-26 02:19rbianchiniNew Issue
2015-09-26 02:19rbianchiniAssigned To => platform
2015-09-26 02:19rbianchiniModules => Core
2015-09-26 02:19rbianchiniResolution time => 1444618800
2015-09-26 02:19rbianchiniTriggers an Emergency Pack => No
2015-09-27 11:46heccamIssue Monitored: heccam
2015-09-28 08:45alostaleNote Added: 0080660
2015-09-28 08:45alostaleAssigned Toplatform => rbianchini
2015-09-28 08:45alostaleStatusnew => feedback
2015-09-28 17:06rbianchiniNote Added: 0080670
2015-09-28 17:06rbianchiniStatusfeedback => new
2015-10-05 12:45VictorVillarAssigned Torbianchini => platform
2015-10-06 09:24alostaleResolution time1444618800 => 1444600800
2015-10-06 09:24alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9613#r9613
2015-10-06 09:26alostaleRegression level => Production - Confirmed Stable
2015-10-06 09:26alostaleRegression introduced in release => 3.0PR15Q2
2015-10-06 09:26alostaleStatusnew => acknowledged
2015-10-06 09:27alostaleStatusacknowledged => scheduled
2015-10-06 09:32alostaleNote Added: 0080836
2015-10-06 10:28NaroaIriarteAssigned Toplatform => NaroaIriarte
2015-10-07 10:39malsasuaRelationship addedhas duplicate 0031081
2015-10-07 14:05lorenzofidalgoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9628#r9628
2015-10-07 14:08lorenzofidalgoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9629#r9629
2015-10-07 16:41malsasuaIssue Monitored: malsasua
2015-10-13 10:10NaroaIriarteRegression date => 2015-01-28
2015-10-13 10:10NaroaIriarteRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/b71f486b4915 [^]
2015-10-14 09:54alostaleRelationship addedcaused by 0028779
2015-10-14 15:56NaroaIriarteReview Assigned To => alostale
2015-10-14 15:57hgbotCheckin
2015-10-14 15:57hgbotNote Added: 0081013
2015-10-14 15:57hgbotStatusscheduled => resolved
2015-10-14 15:57hgbotResolutionopen => fixed
2015-10-14 15:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/da1f8f6d7339b4f799da52ec735f3fcb5b97a636 [^]
2015-10-15 09:17NaroaIriarteReview Assigned Toalostale => AugustoMauch
2015-10-15 10:19hgbotCheckin
2015-10-15 10:19hgbotNote Added: 0081034
2015-10-20 11:30AugustoMauchNote Added: 0081116
2015-10-20 11:30AugustoMauchStatusresolved => closed
2015-10-20 11:30AugustoMauchFixed in Version => pi
2015-10-22 16:19caristuRelationship addedcauses 0031217
2015-11-03 13:03alostaleRelationship addedrelated to 0031331
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082125
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082128
2016-02-02 09:33hgbotCheckin
2016-02-02 09:33hgbotNote Added: 0083797
2016-02-02 09:33hgbotCheckin
2016-02-02 09:33hgbotNote Added: 0083799
2016-02-02 09:33hgbotCheckin
2016-02-02 09:33hgbotNote Added: 0083800
2016-02-02 09:38hgbotCheckin
2016-02-02 09:38hgbotNote Added: 0083822
2016-02-02 09:38hgbotCheckin
2016-02-02 09:38hgbotNote Added: 0083823

Notes
(0080660)
alostale   
2015-09-28 08:45   
Following the steps to reproduce defined in the issue I'm not able to reproduce it.

Tested in current pi, pi in live and 15Q3.1 in live all with the same result. Tested in form and grid views, both with keyboard shortcuts and using the mouse to click in the toolbar buttons.
(0080670)
rbianchini   
2015-09-28 17:06   
Here there is a video where i reproduce the issue in pi.

https://youtu.be/QTekXM80-Fw [^]



(0080836)
alostale   
2015-10-06 09:32   
The problem seems to be caused by the actions triggered after save:
* Open dev tools to see network
* On Good Movements line click on save:
  -> Observe a request to Product selector datasource, this request is present from PR15Q2 but not previously

As callback to that request the product is set again. When clicking on new, save is triggered executing the same request which finally sets the product in the new record.

This request shouldn't be performed at all.
(0081013)
hgbot   
2015-10-14 15:57   
Repository: erp/devel/pi
Changeset: da1f8f6d7339b4f799da52ec735f3fcb5b97a636
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Oct 13 18:04:35 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/da1f8f6d7339b4f799da52ec735f3fcb5b97a636 [^]

Fixed issue 30940: Create a new record in a form was not working fine.

The problem was that, if you create a new record in form view, and after fulfilling the form, you
click in the create a new record in a form button without previously saving the firstly created record,
it was not working fine. In Goods Movements lines tab, for example, the value of the product chosen in
the first record was shown. That wasn't correct, the product should be empty.

The problem was in the "ob-standard-view-datasource.js" the value map cache was being invalidated.

To fix this, some clases have been changed.
In the "ob-standard-view.js" in the "newDocument" function the parameters the isNewDocument parameter
has been added and it is set to true.
This parameter is passed to the request for being able to take it in the class "ob-standard-view-datasource.js"
and to use it in the logic that invalidates the value map cache.
Now, if this parameter is set to true, the value map cache is not invalidated.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0081034)
hgbot   
2015-10-15 10:19   
Repository: erp/devel/pi
Changeset: 3be3d8ca660f42e796670f8a30d2d238191ecbbe
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Oct 15 10:11:02 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3be3d8ca660f42e796670f8a30d2d238191ecbbe [^]

Related with issue 30940: The condition has been changed.

The if condition which handles the invalidation of the value maps cache has been modified for getting the correct behaviour.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js
---
(0081116)
AugustoMauch   
2015-10-20 11:30   
Code reviewed and verified in pi@3be3d8ca660f
(0082125)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test
(0082128)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test
(0083797)
hgbot   
2016-02-02 09:33   
Repository: tools/automation/int
Changeset: eee9b85f208dae969db4e74e34773c705c751ee9
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Nov 03 10:43:22 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/eee9b85f208dae969db4e74e34773c705c751ee9 [^]

Related with issue 30940: A test case has been added.

A test in Selenium has been added to check the correct behaviour of the fix of the issue 30940.
This test, creates a new record in the Product window, saves it and after that in the "Lines" tab,
creates a new record and after filling it, without previously saving, clicks on the "create a new record
in a form" button. It checks that the "Product" field is empty.

---
A src-test/com/openbravo/test/integration/erp/testsuites/guiunit/CNFcreateNewFormWithoutSavingTest.java
---
(0083799)
hgbot   
2016-02-02 09:33   
Repository: tools/automation/int
Changeset: 5205fcd9a5d4dee0b57587221f40d6cce13ecef4
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Nov 03 13:12:31 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/5205fcd9a5d4dee0b57587221f40d6cce13ecef4 [^]

Related with issue 30940: The build.xml of the testsuite has been updated

Rhe build.xml of the testsuite has been updated for being able to execute the newly created test.

---
M src-test/com/openbravo/test/integration/erp/testsuites/guiunit/build.xml
---
(0083800)
hgbot   
2016-02-02 09:33   
Repository: tools/automation/int
Changeset: 302d32b04a2f2852cabcb24a656f9a4371f7262d
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Nov 03 13:21:43 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/302d32b04a2f2852cabcb24a656f9a4371f7262d [^]

Related with issue 30940: Add log info at the end of the test

Log info which shows the end of the testcase has been added.

---
M src-test/com/openbravo/test/integration/erp/testsuites/guiunit/CNFcreateNewFormWithoutSavingTest.java
---
(0083822)
hgbot   
2016-02-02 09:38   
Repository: tools/automation/int
Changeset: f801def2a3007785713beb4629ba8b195712c9b1
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Nov 05 13:38:02 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/f801def2a3007785713beb4629ba8b195712c9b1 [^]

Related with issue 30940: Change the test to the proper testsuite.

The test was in a wrong place and it has more sense in the testsuite which handles the
forms.

---
M src-test/com/openbravo/test/integration/erp/modules/client/application/testsuites/standardview/form/build.xml
M src-test/com/openbravo/test/integration/erp/testsuites/guiunit/build.xml
A src-test/com/openbravo/test/integration/erp/modules/client/application/testsuites/standardview/form/CNFcreateNewFormWithoutSavingTest.java
R src-test/com/openbravo/test/integration/erp/testsuites/guiunit/CNFcreateNewFormWithoutSavingTest.java
---
(0083823)
hgbot   
2016-02-02 09:38   
Repository: tools/automation/int
Changeset: 20d7fd96fc3b8b862efa4c5adf7127742c58a9fa
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Mon Nov 09 18:06:54 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/20d7fd96fc3b8b862efa4c5adf7127742c58a9fa [^]

Related with issue 30940: Fixing the build.xml

The build.xml has been fixed for the correct execution of the test.

---
M src-test/com/openbravo/test/integration/erp/modules/client/application/testsuites/standardview/form/FormSuite.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/testsuites/standardview/form/build.xml
---