Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045870Retail ModulesOrder Preparationpublic2021-02-09 12:062021-02-21 09:39
sebastien_liron 
ranjith_qualiantech_com 
immediatemajoralways
closedfixed 
5
RR20Q3.3 
RR21Q2 
No
0045870: delivery of sales order in pos issue for not stocked product
For some sales order, when we want to issue them, with have an issue with the stock not available.
I have tried to debug it, but it seems that the call to m_get_stock_param, called like this :

select
*
from
M_GET_STOCK_PARAM('63E317DF73D74D1EB9D9E49A1BDF1972',
'63E317DF73D74D1EB9D9E49A1BDF1972',
TO_NUMBER('1'),
'F1A6825D39B84517A35AC0F91869A823',
null,
null,
'A65A38EF90A1476CAFB751F3978DDF00',
'2AD04FA2BA424ACEA45F1D785F5A770A',
null,
'100',
'7CB4BE99E0B0498D9DD7807158B751C8',
null,
'AFD65DC18CC74597B5A550E56AD4709D',
null,
null,
null,
TO_NUMBER(null),
null,
null,
'N',
'Y',
null,
null)

It runs well apparaenlty :

 v_Record_ID=63E317DF73D74D1EB9D9E49A1BDF1972
  v_AD_User_ID=100
  v_Quantity=1
  v_ProductID=F1A6825D39B84517A35AC0F91869A823
  v_UomID=AFD65DC18CC74597B5A550E56AD4709D
  v_ProductUomID=
  v_LocatorID=
  v_WarehouseID=
  v_PriorityWarehouseID=A65A38EF90A1476CAFB751F3978DDF00
  v_ClientID=7CB4BE99E0B0498D9DD7807158B751C8
  v_OrgID=2AD04FA2BA424ACEA45F1D785F5A770A
  v_AttributesetinstanceID=
  v_warehouse_rule_id=
  v_avail=Y
  v_nett=
  v_overissue=
  Record_ID=63E317DF73D74D1EB9D9E49A1BDF1972
v_warehouse_rule_id:


But in the table M_Stock_Proposed no sign of the stock, so it returns 0 proposed lines for this stock and then we have the resulting error in the POS.

Discussion with product here :


I checked the instance and saw the following:

- The store has several warehouses. There is no stock for the "58 TOUR EIFFEL" product in any of them.
- In fact, the product doesn't seem to have stock in any warehouse at all.
- I think it makes sense, because it is marked as "not stocked". But then, you are trying to use the Issue Sales Order functionality, for products that in fact are not stocked.

And to be honest, I don't really know if this is a feature we should support and it's just a bug in the delivery process, or if this configuration was not considered when implementing the Issue Sales Order and delivery modes functionality. That's why I suggested that we should ask functional team, because they know the OB stock model better.

I added them now. @Functional team, you can check the case mentioned in the forwarded email. Basically, the situation seems to be that there were some orders delivered (I guess with delivery mode different from pick and carry) of non-stocked products. Afterwards, it seems they are trying to use the "Issue Sales Order" process to deliver them, and they got an error mentioning that no stock could be found for the product.




----



Not stocked products, like services, can be also included in goods shipments. This is not the common scenario, as goods shipments are usually related to stocked products, but they might be included as proof that a service has been delivered to the customer.

TBH I don't know how it should behave in the case of the POS Issue Sales Order and delivery modes.

I don't have the details, but the solution could be as easy as avoid checking for stock when the product is set as not-stocked.

----

From my point of view every product and/or service can and should be delivered. This is the only way we can track something has already been delivered and so it should not be delivered again.
In case of a stocked product, there is also a register for the stock consumption.
In case of a non-stocked product or service the shipment just verifies the product or service was delivered to the end customer and therefore there is no need to deliver the good again.
If there were no shipments it would be impossible to determine if the product/service has already been delivered.


If the product does not support this flow, I would consider it a bug and it should be fixed.


- create a sales order with not -stocked product
- try to issue it in the pos
- the issue will fail as there is no stock
No tags attached.
related to defect 0045894 closed ranjith_qualiantech_com It is not possible to "issue order" of stockable products when there is no stock, although it allows to sell without stock 
related to defect 0048886 closed ranjith_qualiantech_com The fonctionnality of "Issue Sales Order" does not deliver Services not linked to product (Independent services) 
png image2.png (125,197) 2021-02-09 12:07
https://issues.openbravo.com/file_download.php?file_id=15309&type=bug
png

png image1.png (67,942) 2021-02-09 12:07
https://issues.openbravo.com/file_download.php?file_id=15310&type=bug
png

png image3.png (450,395) 2021-02-09 12:08
https://issues.openbravo.com/file_download.php?file_id=15311&type=bug
Issue History
2021-02-09 12:06sebastien_lironNew Issue
2021-02-09 12:06sebastien_lironAssigned To => Retail
2021-02-09 12:06sebastien_lironTriggers an Emergency Pack => No
2021-02-09 12:07sebastien_lironFile Added: image2.png
2021-02-09 12:07sebastien_lironFile Added: image1.png
2021-02-09 12:08sebastien_lironFile Added: image3.png
2021-02-09 12:10sebastien_lironResolution time => 1613689200
2021-02-19 10:02marvintmTypedesign defect => defect
2021-02-19 10:05ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-02-19 11:14marvintmTarget VersionRR20Q3.4 =>
2021-02-19 14:37ranjith_qualiantech_comStatusnew => scheduled
2021-02-20 03:50hgbotNote Added: 0126226
2021-02-21 09:39hgbotResolutionopen => fixed
2021-02-21 09:39hgbotStatusscheduled => closed
2021-02-21 09:39hgbotNote Added: 0126230
2021-02-21 09:39hgbotFixed in Version => RR21Q2
2021-02-21 09:39hgbotNote Added: 0126231
2021-02-22 11:06ranjith_qualiantech_comRelationship addedrelated to 0045894
2022-05-20 14:18ranjith_qualiantech_comRelationship addedrelated to 0048886

Notes
(0126226)
hgbot   
2021-02-20 03:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/312 [^]
(0126230)
hgbot   
2021-02-21 09:39   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/312 [^]
(0126231)
hgbot   
2021-02-21 09:39   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 936638f3ecf000a139ae3b07f6cd0ee735110b3e
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-02-19T19:15:47+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/936638f3ecf000a139ae3b07f6cd0ee735110b3e [^]

Fixed ISSUE-45870: Shipment should be generated for NonStocked Product
* For NonStocked Product, Shipment should be created without bin details

---
M src/org/openbravo/retail/posterminal/process/GoodsShipmentGenerator.java
---