Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026293Openbravo ERP07. Sales managementpublic2014-04-16 01:192014-07-01 04:30
VictorVillar 
AtulOpenbravo 
highminoralways
closedfixed 
5
pi 
3.0PR14Q33.0PR14Q3 
daniOpenbravo
Core
No
0026293: Unable to add exploded BOM to invoice from order when order has multiple shipments
The error is occurring because the when the order is shipped on multiple shipments, the invoice gets a line added for each shipment.
The query to insert the invoice line bom componetns is doing a sub select to find the bom parent in the invoice. Because it has been
added twice (due to 2 shipments) the sub select returns 2 values and insert fails.
1) Create a BOM product with 2 components and mark product as not stocked (so that it is exploded)
2) Create a sales order for 2 units of the BOM product (will end up with 3 lines on the order for 2 units each)
3) Create a shipment for one unit of the BOM from the order
4) Create a shipment for second unit of the BOM from the order
5) Create an invoice and try to create lines from the original sales order

You will get the following error:
Exception:org.postgresql.util.PSQLException: ERROR: more than one row returned by a subquery used as an expression
No tags attached.
Issue History
2014-04-16 01:19VictorVillarNew Issue
2014-04-16 01:19VictorVillarAssigned To => dmiguelez
2014-04-16 01:19VictorVillarModules => Core
2014-04-16 01:19VictorVillarResolution time => 1403733600
2014-04-16 01:19VictorVillarTriggers an Emergency Pack => No
2014-04-16 01:20VictorVillarAssigned Todmiguelez => jonalegriaesarte
2014-04-16 01:20VictorVillarIssue Monitored: networkb
2014-04-16 01:46eintelauIssue Monitored: eintelau
2014-04-28 16:57jonalegriaesarteAssigned Tojonalegriaesarte => pramakrishnan
2014-06-28 13:35AtulOpenbravoAssigned Topramakrishnan => AtulOpenbravo
2014-06-28 13:35AtulOpenbravoStatusnew => scheduled
2014-06-28 13:35AtulOpenbravofix_in_branch => pi
2014-06-30 16:12hgbotCheckin
2014-06-30 16:12hgbotNote Added: 0068448
2014-06-30 16:12hgbotStatusscheduled => resolved
2014-06-30 16:12hgbotResolutionopen => fixed
2014-06-30 16:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fe6da6cee966c36a5e2a7a05146a7e54242dfb12 [^]
2014-06-30 16:32daniOpenbravoReview Assigned To => daniOpenbravo
2014-06-30 16:32daniOpenbravoNote Added: 0068449
2014-06-30 16:32daniOpenbravoStatusresolved => closed
2014-06-30 16:32daniOpenbravoFixed in Version => PR14Q3
2014-07-01 04:30hudsonbotCheckin
2014-07-01 04:30hudsonbotNote Added: 0068468

Notes
(0068448)
hgbot   
2014-06-30 16:12   
Repository: erp/devel/pi
Changeset: fe6da6cee966c36a5e2a7a05146a7e54242dfb12
Author: Daniel Ruiz <daniel.ruiz <at> openbravo.com>
Date: Mon Jun 30 16:11:53 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fe6da6cee966c36a5e2a7a05146a7e54242dfb12 [^]

Fixes issue 26293: Unable to add exploded BOM to invoice from order when multiple shipments

---
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
---
(0068449)
daniOpenbravo   
2014-06-30 16:32   
Verified.
(0068468)
hudsonbot   
2014-07-01 04:30   
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/a4db5fde5ca2 [^]
Maturity status: Test