Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025028Openbravo ERPA. Platformpublic2013-10-25 15:232013-11-27 13:15
caristu 
shankarb 
normalmajoralways
closedfixed 
5
pi 
3.0MP303.0MP30 
AugustoMauch
Core
No
0025028: Default value applied again after updating a numeric field with a trigger
If we have a trigger that updates a numeric field and also it has a default value, the default value is applied again after the trigger if the window is not refreshed.
1) Create a trigger that updates a quantity (Attached is an example). For example a trigger that sets the qtyordered of orderline table to 3 before insert. (This column has 1 as default value)
2) Go to the [Sales Order] window. Create one record in the header.
3) Go to the lines tab. Create a new record, notice that the ordered quantity field is filled with 1.
4) Select a product and save. Notice that the field is updated with 3.
5) Save the record. Don't refresh the window.
6) Edit the line, change the lineno field and save. Notice that the default value has been applied again: the ordered quantity is now 1.
7) If we refresh the window in step 5) then, the problem is not happening.
No tags attached.
related to defect 0026395 closed guillermogil If you create a sales invoice in grid view and save it by losing focus a new empty record appears 
related to defect 0040463 closed caristu UI broken when create a new row and before save clear the filter grid 
? triggerTest (606) 2013-10-25 15:23
https://issues.openbravo.com/file_download.php?file_id=6466&type=bug
Issue History
2013-10-25 15:23caristuNew Issue
2013-10-25 15:23caristuAssigned To => AugustoMauch
2013-10-25 15:23caristuFile Added: triggerTest
2013-10-25 15:23caristuModules => Core
2013-10-25 15:23caristuTriggers an Emergency Pack => No
2013-10-25 15:23caristuTarget Version => 3.0MP30
2013-10-25 15:23caristuIssue Monitored: networkb
2013-10-25 15:44caristuDescription Updatedbug_revision_view_page.php?rev_id=5158#r5158
2013-11-20 05:10shankarbAssigned ToAugustoMauch => shankarb
2013-11-21 12:30shankarbReview Assigned To => AugustoMauch
2013-11-21 12:31shankarbIssue Monitored: AugustoMauch
2013-11-21 12:45hgbotCheckin
2013-11-21 12:45hgbotNote Added: 0062324
2013-11-21 12:45hgbotStatusnew => resolved
2013-11-21 12:45hgbotResolutionopen => fixed
2013-11-21 12:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/091cc28d75e0fd11049eabfc3fdcc67825783830 [^]
2013-11-24 16:24hudsonbotCheckin
2013-11-24 16:24hudsonbotNote Added: 0062357
2013-11-27 13:15AugustoMauchNote Added: 0062409
2013-11-27 13:15AugustoMauchStatusresolved => closed
2013-11-27 13:15AugustoMauchFixed in Version => 3.0MP30
2014-04-28 10:55guillermogilRelationship addedrelated to 0026395
2019-06-11 13:18caristuRelationship addedrelated to 0040463

Notes
(0062324)
hgbot   
2013-11-21 12:45   
Repository: erp/devel/pi
Changeset: 091cc28d75e0fd11049eabfc3fdcc67825783830
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Nov 21 16:57:23 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/091cc28d75e0fd11049eabfc3fdcc67825783830 [^]

Fixes Issue 25028: value not refreshed in numeric field in some cases

Update the focus cell value if different from edit form values.
To avoid the case where sometimes data updated through trigger is not showing up without refreshing.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0062357)
hudsonbot   
2013-11-24 16:24   
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/3beeb610e27e [^]

Maturity status: Test
(0062409)
AugustoMauch   
2013-11-27 13:15   
Code reviewed and verified in pi@37745290efe5