Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013593Openbravo ERPZ. Otherspublic2010-06-09 17:362010-06-16 00:00
networkb 
iperdomo 
immediatemajoralways
closedfixed 
5
2.50MP17 
2.50MP19 
Core
No
0013593: With autosave, duplicated lines in sales invoice when click header tab
Once you created an invoice line, you go to header tab (saving with autosave, so, just put the product and click on header) click several times over Header tab, go to lines in grid view and notice that there are some identical lines.
Ensure that auto save is active.
 
Go to Procurement Management || Transactions || Purchase Invoice || Header and create an invoice

Go to Procurement Management || Transactions || Purchase Invoice || Header >> Lines and create a line (select a product and don't save the record)

Click on header tab several times to return to the header.

You can see that identical lines has been created.
No tags attached.
Issue History
2010-06-09 17:36networkbNew Issue
2010-06-09 17:36networkbAssigned To => adrianromero
2010-06-09 17:51adrianromeroAssigned Toadrianromero => iperdomo
2010-06-09 18:03iperdomoNote Added: 0028223
2010-06-09 18:03iperdomoStatusnew => feedback
2010-06-09 18:05iperdomoNote Added: 0028224
2010-06-09 19:09networkbNote Added: 0028228
2010-06-09 21:42iperdomoNote Added: 0028235
2010-06-09 21:43iperdomoStatusfeedback => scheduled
2010-06-09 21:43iperdomofix_in_branch => pi
2010-06-14 11:57hgbotCheckin
2010-06-14 11:57hgbotNote Added: 0028355
2010-06-14 11:57hgbotCheckin
2010-06-14 11:57hgbotNote Added: 0028356
2010-06-14 11:57hgbotStatusscheduled => resolved
2010-06-14 11:57hgbotResolutionopen => fixed
2010-06-14 11:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8eea984425f6318cab1acead18e92c323fb5ecf5 [^]
2010-06-14 15:29networkbIssue Monitored: networkb
2010-06-14 15:29networkbIssue End Monitor: networkb
2010-06-14 15:32szapataIssue Monitored: szapata
2010-06-15 05:43hudsonbotCheckin
2010-06-15 05:43hudsonbotNote Added: 0028402
2010-06-15 05:43hudsonbotCheckin
2010-06-15 05:43hudsonbotNote Added: 0028403
2010-06-15 07:58arunkumarNote Added: 0028424
2010-06-15 07:58arunkumarStatusresolved => closed
2010-06-16 00:00anonymoussf_bug_id0 => 3016772

Notes
(0028223)
iperdomo   
2010-06-09 18:03   
Can you confirm the database? I just tested on PostgreSQL and this doesn't happen.
(0028224)
iperdomo   
2010-06-09 18:05   
Here you have an error stack trace of the error in the backend:
1096233 [TP-Processor12] ERROR org.openbravo.erpWindows.PurchaseOrder.LinesData - SQL error in query: INSERT INTO C_OrderLine (AD_Client_ID, AD_Org_ID, C_Order_ID, C_BPartner_ID, C_BPartner_Location_ID, DatePromised, DateOrdered, Line, M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID, C_Charge_ID, Description, QuantityOrder, M_Product_Uom_Id, QtyOrdered, C_UOM_ID, QtyDelivered, QtyReserved, QtyInvoiced, M_Shipper_ID, PriceActual, C_Currency_ID, PriceStd, CANCELPRICEAD, PriceList, Discount, FreightAmt, C_Tax_ID, Iseditlinenetamt, LineNetAmt, Taxbaseamt, IsActive, C_Order_Discount_ID, M_Offer_ID, IsDescription, Ref_OrderLine_ID, PriceLimit, DirectShip, ChargeAmt, DateInvoiced, DateDelivered, C_OrderLine_ID, created, createdby, updated, updatedBy) VALUES ((?), (?), (?), (?), (?), TO_DATE(?), TO_DATE(?), TO_NUMBER(?), (?), (?), (?), (?), (?), TO_NUMBER(?), (?), TO_NUMBER(?), (?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), (?), TO_NUMBER(?), (?), TO_NUMBER(?), (?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), (?), (?), TO_NUMBER(?), TO_NUMBER(?), (?), (?), (?), (?), (?), TO_NUMBER(?), (?), TO_NUMBER(?), TO_DATE(?), TO_DATE(?), (?), now(), ?, now(), ?)Exception:org.postgresql.util.PSQLException: ERROR: deadlock detected
  Detail: Process 10002 waits for ShareLock on transaction 16369133; blocked by process 1890.
Process 1890 waits for ShareLock on transaction 16369129; blocked by process 10002.
1096234 [TP-Processor12] INFO org.openbravo.erpCommon.utility.ErrorTextParserPOSTGRE - did not find constraint name for error message: ERROR: deadlock detected
  Detail: Process 10002 waits for ShareLock on transaction 16369133; blocked by process 1890.
Process 1890 waits for ShareLock on transaction 16369129; blocked by process 10002.
1096236 [TP-Processor12] ERROR org.openbravo.base.exception.OBException - ERROR: deadlock detected
Detail: Process 10002 waits for ShareLock on transaction 16369133; blocked by process 1890.
Process 1890 waits for ShareLock on transaction 16369129; blocked by process 10002.
org.openbravo.base.exception.OBException: ERROR: deadlock detected
Detail: Process 10002 waits for ShareLock on transaction 16369133; blocked by process 1890.
Process 1890 waits for ShareLock on transaction 16369129; blocked by process 10002.
    at org.openbravo.erpWindows.PurchaseOrder.Lines.doPost(Lines.java:64)
(0028228)
networkb   
2010-06-09 19:09   
Hi,
I can reproduce in Oracle.

Thank you!
(0028235)
iperdomo   
2010-06-09 21:42   
@networkb
Please report the defect properly. In the database field you have "Any", and is not reproducible in PostgreSQL, just in Oracle.

Thanks.
(0028355)
hgbot   
2010-06-14 11:57   
Repository: erp/devel/pi
Changeset: b85f2815bdcc470fb8cd93cf46c4c8c09bd1e7b8
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Mon Jun 14 11:50:40 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b85f2815bdcc470fb8cd93cf46c4c8c09bd1e7b8 [^]

Reformatted code and updated license. Related to issue 13593

---
M src/org/openbravo/erpCommon/businessUtility/WindowTabs.java
---
(0028356)
hgbot   
2010-06-14 11:57   
Repository: erp/devel/pi
Changeset: 8eea984425f6318cab1acead18e92c323fb5ecf5
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Mon Jun 14 11:54:59 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8eea984425f6318cab1acead18e92c323fb5ecf5 [^]

Fixes issue 13593: Added bolOneFormSubmission flag to true
The bolOneFormSubmission flag disables multiple form submition by
enabling/disabling a gSubmitted flag. If this flag is 1 the form.submit() is
not made.

---
M src/org/openbravo/erpCommon/businessUtility/WindowTabs.java
---
(0028402)
hudsonbot   
2010-06-15 05:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/b85f2815bdcc [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f7644da65496 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17606.obx [^]
(0028403)
hudsonbot   
2010-06-15 05:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/8eea984425f6 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f7644da65496 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17606.obx [^]
(0028424)
arunkumar   
2010-06-15 07:58   
I followed the steps to reproduce. When I clicked the header tab more than one time to return from lines to header, popup message opens with "You are modifying this record. Are you sure you want to continue?"

Tested working fine