I have below scenario with BOM product and production light. As per my understanding from code, idempiere doesn't calculate the cost of BOM on completing production. We have to execute Rollup BOM process however with the roll up we don't get the actual average cost of BOM with the BOM inventory in warehouse.
 
 
 
 
 
  |  | qty | purchase price | cost |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP1 | 1 | 10 | 10 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP2 | 1 | 5 | 5 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP3 | 1 | 3 | 3 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | Roll up BOM |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | BP1 | 1 |  | 18 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | Create production |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP1 | 2 | 8 | 8 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP2 | 2 | 7 | 7 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | PP3 | 2 | 4 | 4 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | Roll up BOM |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | BP1 | 1 |  | 19 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | Create Production |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | BP1 | 2 |  | 19 | As all the part products consumed
  with first production run, new sum total of current cost price of part
  product is 19 |  |  | 
 
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
  | Ideally
  average cost of BOM should be 18.5 however its 19 because due to rollup it
  always takes the sum of current average cost of part products |  |  |  |  |  | 
So according to me roll up bom would never give the actual average cost of BOM product in inventory.
Also with 
https://idempiere.atlassian.net/browse/IDEMPIERE-3352, I believe BOM product cost is calculate with average of part product at the time of production and it average with the available qty for BOM product in case of batch/lot however it doesnt do the same if the costing level is other batch/lot. So why we dont pass actual bom cost in createProduction method and let system calculate average cost of BOM and do not post variance?