Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031054Openbravo ERPB. User interfacepublic2015-09-26 02:192015-10-20 12:02
rbianchini 
NaroaIriarte 
normalmajoralways
closedfixed 
5
3.0PR15Q3.1 
3.0PR15Q43.0PR15Q4 
AugustoMauch
Core
Production - Confirmed Stable
3.0PR15Q2
No
0031054: 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 in form view and DO NOT save it
5 - With Ctrl+d or with the new button create other line
6 - Observes that almost fields are already filled with the first line's product
No tags attached.
blocks defect 0030940 closed NaroaIriarte When add a second new line in goods movements, the product field is already filled 
Issue History
2015-10-06 09:27alostaleTypedefect => backport
2015-10-06 09:27alostaleTarget Version => 3.0PR15Q4
2015-10-14 15:38NaroaIriarteReview Assigned To => alostale
2015-10-14 15:38NaroaIriarteAssigned Toplatform => NaroaIriarte
2015-10-14 15:53hgbotCheckin
2015-10-14 15:53hgbotNote Added: 0081010
2015-10-14 15:53hgbotStatusscheduled => resolved
2015-10-14 15:53hgbotResolutionopen => fixed
2015-10-14 15:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4/rev/965ee7671b97269ca9f7be951c0e27b44b0efb9f [^]
2015-10-15 09:18NaroaIriarteReview Assigned Toalostale => AugustoMauch
2015-10-15 10:40hgbotCheckin
2015-10-15 10:40hgbotNote Added: 0081037
2015-10-20 12:02AugustoMauchNote Added: 0081119
2015-10-20 12:02AugustoMauchStatusresolved => closed
2015-10-20 12:02AugustoMauchFixed in Version => 3.0PR15Q4

Notes
(0081010)
hgbot   
2015-10-14 15:53   
Repository: erp/backports/3.0PR15Q4
Changeset: 965ee7671b97269ca9f7be951c0e27b44b0efb9f
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Oct 14 15:37:35 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4/rev/965ee7671b97269ca9f7be951c0e27b44b0efb9f [^]

Fixed issue 31054: 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.

---
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
---
(0081037)
hgbot   
2015-10-15 10:40   
Repository: erp/backports/3.0PR15Q4
Changeset: ad209787af467ec1225d0520f7a9db503755f56e
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Oct 15 10:34:40 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4/rev/ad209787af467ec1225d0520f7a9db503755f56e [^]

Related with issue 31054: 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
---
(0081119)
AugustoMauch   
2015-10-20 12:02   
Code reviewed and verified in [1]@ad209787af46

[1] https://code.openbravo.com/erp/backports/3.0PR15Q4 [^]