We are currently migrating to version 15 and we hit a big road block with new feature called ‘Serial and Batch Bundle’.
When I create a Purchase Receipt for an item with has_batch_no=1
and enter the batch number in the batch_no
field, the Purchase Receipt is submitted correctly. However, when I check the Stock Ledger Entry
table, the batch_no
column is empty.
This is problematic as we have several custom queries that rely on this column for joins.
Is it expected that the batch_no field in the Stock Ledger Entry table will always remain empty from now on?
For instance, would it be accurate to assume that this query is now broken with version 15 ?
SELECT
tabItem.item_name, sle.item_code, tabItem.description, sle.stock_uom, sle.batch_no, sle.warehouse, sum(sle.actual_qty) as qty
FROM `tabStock Ledger Entry` sle
LEFT join tabBatch ON tabBatch.name = sle.batch_no
INNER JOIN tabItem ON tabItem.name = sle.item_code
WHERE warehouse = %(warehouse)s
AND sle.is_cancelled = 0
GROUP BY sle.item_code, sle.batch_no
HAVING sum(actual_qty) > 0;
Here are my Stock Settings:
Is there a way to disable this feature and maintain the original batch behavior from version 14?