Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016645Openbravo ERP07. Sales managementpublic2011-03-28 12:562011-04-13 12:46
AinhoaPagola 
AinhoaPagola 
urgentmajorhave not tried
closedfixed 
20Ubuntu 8.4
 
2.50MP29 
Core
No
0016645: Error when creating shipments with negative quantities for products with negative stock
A "null value in column "c_uom_id" violates not-null constraint" error is displayed when a POS sales order with two lines with a negative amount of a product without stock is completed.
- Create a product and check as stocked. Link it to a pricelist
- Make sure the client allows negative stock
- Create a POS sales order with one line and a positive amount of the product. The product will have a negative amount on stock. Complete the order. The shipment and invoice will be created.
- Create a POS sales order with two lines. Both of them with negative amounts of the product. Complete the order. The error will be thrown because the shipment can not be created.
The problem may be related to the Cursor Cur_Storage in the function m_inout_create.
No tags attached.
blocks defect 0016512 closed AinhoaPagola Error when creating shipments with negative quantities for products with negative stock 
Issue History
2011-04-05 13:11AinhoaPagolaTypedefect => backport
2011-04-05 13:11AinhoaPagolafix_in_branch => 2.50
2011-04-08 15:19hgbotCheckin
2011-04-08 15:19hgbotNote Added: 0035787
2011-04-08 15:19hgbotStatusscheduled => resolved
2011-04-08 15:19hgbotResolutionopen => fixed
2011-04-08 15:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/1d7dfcf437a782253f3c7357555ae9a8fa6d646b [^]
2011-04-13 12:46maiteNote Added: 0035900
2011-04-13 12:46maiteStatusresolved => closed
2011-04-13 12:46maiteFixed in Version => 2.50MP29

Notes
(0035787)
hgbot   
2011-04-08 15:19   
Repository: erp/stable/2.50
Changeset: 1d7dfcf437a782253f3c7357555ae9a8fa6d646b
Author: Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
Date: Wed Apr 06 17:22:43 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/1d7dfcf437a782253f3c7357555ae9a8fa6d646b [^]

Fixes bug 16645. Error creating shipments with negative quantites

---
M src-db/database/model/functions/M_INOUT_CREATE.xml
---
(0035900)
maite   
2011-04-13 12:46   
Verified that situation reported is not reproducible any more.
As change affects to M_INOUT_CREATE procedure have also been tested that:
* POS order with more than one positive line, one positive and another negative, only one line... works fine.
* Same for Warehouse Order, as it also creates shipment
* Process Generate Receipt from Invoice has also been tested as it calls to M_INOUT_CREATE procedure