Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0052513Openbravo ERP04. Warehouse managementpublic2023-05-22 16:302023-06-06 13:36
0052513: RM-6419 [Inventory count] Theoritical stock is changing
When doing an inventory count in AWO of 2 products and a sale is done at the same time on one of them, the theoretical stock of the item A is adjusted.
However, when clicking on the line of the product B, the theoretical stock of product A is changing back

See video [^] [^]
Create the IC wtih product A and product B.
Modify the stock of product A (sale, reception, DO OTF).
Go back on the IC and see the theoritical stock update.

Current result : stock is moving. When the theoritical stock is updated, the theoritical stock is OK. But when you select the line of product B, the theoritical stock goes back wrong.

Expected result : to have the true theoritical stock update when clicking on the line and that it doesn't change when clicking on another line
Issue History
2023-05-22 16:30philippe_muiNew Issue
2023-05-22 16:30philippe_muiAssigned To => Triage Omni WMS
2023-05-22 16:30philippe_muiModules => Core
2023-05-22 16:30philippe_muiTriggers an Emergency Pack => No
2023-05-22 16:30philippe_muiTag Attached: FASH
2023-05-22 16:31philippe_muiSummary[Inventory count] Theoritical stock is changing => RM-6419 [Inventory count] Theoritical stock is changing
2023-05-22 16:31philippe_muiDescription Updatedbug_revision_view_page.php?rev_id=26104#r26104
2023-05-24 13:03mtaalNote Added: 0150208
2023-05-24 13:15mtaalNote Edited: 0150208bug_revision_view_page.php?bugnote_id=0150208#r26128
2023-05-25 07:31AtulOpenbravoStatusnew => scheduled
2023-05-25 07:31AtulOpenbravoAssigned ToTriage Omni WMS => AtulOpenbravo
2023-06-02 08:46mtaalAssigned ToAtulOpenbravo => cberner
2023-06-02 14:47hgbotNote Added: 0150672
2023-06-06 13:22hgbotNote Added: 0150803
2023-06-06 13:36hgbotResolutionopen => fixed
2023-06-06 13:36hgbotStatusscheduled => closed
2023-06-06 13:36hgbotNote Added: 0150806
2023-06-06 13:36hgbotNote Added: 0150807
2023-06-06 13:36hgbotNote Added: 0150808
2023-06-06 13:36hgbotNote Added: 0150809

2023-05-24 13:03   
(edited on: 2023-05-24 13:15)
This case seems to happen when sales happen in parallel to inventory count.

The thing to check is why the value moves back to the old value. The use case might be less valid but it might hide another issue with the UI which needs to be resolved.

2023-06-02 14:47   
Merge Request created: [^]
2023-06-06 13:22   
Merge Request created: [^]
2023-06-06 13:36   
Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 1aa16f731f97f7b76bc70467379f0a6af8c6f731
Author: Cristian Berner <>
Date: 06-06-2023 13:20:21
URL: [^]

Fixes ISSUE-52513: Theoretical stock is changing

Problem was that the stock was not properly matched in the two models of
the state: InventoryCount and OngoingDocuments, although when a
synchronization finishes the ongoing documents is properly updated, the
InventoryCount model was not.

The main reason for this was due to selectedLine event generating a
syncrhonization event, which shouldn't. As part of this it was removed
frorm the InventoryCount model, as it is not required.

M web/org.openbravo.warehouse.advancedwarehouseoperations/app/model/business-object/inventory-count/InventoryCount.js
M web/org.openbravo.warehouse.advancedwarehouseoperations/source/inventorycount/obawo-inventorycount-view.js
2023-06-06 13:36   
Merge request merged: [^]
2023-06-06 13:36   
Merge request merged: [^]
2023-06-06 13:36   
Repository: [^]
Changeset: 162fe2bd8c6581f3d01c935e954e1e8b59f79474
Author: Cristian Berner <>
Date: 06-06-2023 13:21:40
URL: [^]

Related to ISSUE-52513: Theoretical stock was changing on line selection

M web/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/app/model/business-object/distribution-order/DistributionOrder.js
M web/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/source/obawo-distributionorder-view.js