Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045477
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2020-11-23 12:222020-12-02 16:11
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityhighResolutionfixedFixed in VersionPR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045477: Attribute required check in M_TRANSACTION_TRG trigger should allow when stock is zero

DescriptionIn the M_Transaction_TRG trigger there is a check to enforce that an attribute set instance is defined for products that requires attributes

The trigger should allow to sell an attribute required item without attributes when the stock on hand of the product is zero.

This is an scenario that happens on the POS when the preference to use attributes is not enabled.

On this scenario when a product using attributes is sold the POS searches the available stock to get an attribute instance to use. When no stock is available there is no attribute instance to use and the 0 instance is used.

With the current logic the transaction trigger won't allow to complete the execution as it is only allowed to use the 0 instance attribute when the quantity on hand is negative.
Steps To ReproduceConfigure an AutoBOM product with no stock available on the parts.
Try to sell it.
Proposed SolutionChange the "v_qtyOnHand >= 0" to "v_qtyOnHand > 0". So the exception is only raised when the stock is Positive or the transaction is a Receipt.


       ELSIF (:NEW.M_INOUTLINE_ID IS NOT NULL) THEN
          SELECT io.issotrx
          INTO v_issotrx
          FROM m_inout io
          JOIN m_inoutline iol ON (iol.m_inout_id = io.m_inout_id)
          WHERE iol.m_inoutline_id = :NEW.m_inoutline_id;

          IF (v_issotrx = 'N' OR v_qtyOnHand >= 0) THEN
            RAISE_APPLICATION_ERROR(-20000, '@20112@' || ' - ' || v_Name) ;
          END IF;
        ELSE
          IF ( v_qtyOnHand >= 0) THEN
            RAISE_APPLICATION_ERROR(-20000, '@20112@' || ' - ' || v_Name) ;
          END IF;
        END IF;
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0044622 closedinigo_lerga Attribute required check in M_TRANSACTION_TRG trigger should be relaxed 

-  Notes
(0124681)
AtulOpenbravo (developer)
2020-12-02 08:30
edited on: 2020-12-02 08:31

Test Plan

- In a latest instance, configure avalanche transceiver product as bill of material = Yes, Auto BOM = Yes
- Add product Alpine Poles and Alpine Ski Boot in Bill Of Material tab for it. Verify BOM

- Login in Web POS with vallblanca user
- Create a ticket with VBS Customer for product Avalanche Transceiver. Check out and pay total amount, realize that in back office Sales Order and Bill Of Materials Production record is created successfully.


- Now make sure that stock for products Alpine Poles and Alpine Ski Boot is Zero. (Create a Shipment in the back office for the product with all available quantity and process it.)

- Login in Web POS with vallblanca user
- Create a ticket with VBS Customer for product Avalanche Transceiver. Check out and pay total amount, realize that in back office, Sales Order and Bill Of Materials Production record is not created.
- Console shows below error message:-
org.openbravo.base.exception.OBException: Insufficient stock: Alpine poles 8.0
This is OK.

- Login as System Admin in the back office.
- Set preference Auto BOM: Allow negative stock in raw materials as Yes

- Login in Web POS with vallblanca user
- Create a ticket with VBS Customer for product Avalanche Transceiver. Check out and pay total amount, realize that in back office, Sales Order and Bill Of Materials Production record is created successfully without any error message in the console.

- Login as The White Valley Group Admin in the back office.
- Navigate to product Avalanche transceiver
- Add product Travel Cap in the Bills of Material Tab. Execute Verify BOM.
- Create a Goods Shipment for VBS Customer in Vall Blanca store org, with Product Travel Cap with its all available quantity with Attribute Set Value = PSS103_28-03-2018, process Shipment so that stock is Zero for this product.

- Login in Web POS with vallblanca user
- Create a ticket with VBS Customer for product Avalanche Transceiver. Check out and pay total amount, realize that in back office, Sales Order and Bill Of Materials Production record is created successfully will all three BOM products without any error message in the console.

(0124694)
hgbot (developer)
2020-12-02 15:53

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/254 [^]
(0124695)
hgbot (developer)
2020-12-02 16:11

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: e652fdb7773e50d3c1441ffa09f5186e1eccb9c1
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 2020-12-02T14:53:28+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/e652fdb7773e50d3c1441ffa09f5186e1eccb9c1 [^]

Fixes BUG-0045477: Attribute required check in M_TRANSACTION_TRG
trigger should allow when stock is zero

**"There are some products without attributes" Exception is only
raised when the stock is Positive or the transaction is a Receipt.

---
M src-db/database/model/triggers/M_TRANSACTION_TRG.xml
---
(0124696)
hgbot (developer)
2020-12-02 16:11

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/254 [^]

- Issue History
Date Modified Username Field Change
2020-11-23 12:22 gorkaion New Issue
2020-11-23 12:22 gorkaion Assigned To => Triage Finance
2020-11-23 12:22 gorkaion Modules => Core
2020-11-23 12:22 gorkaion Resolution time => 1607900400
2020-11-23 12:22 gorkaion Triggers an Emergency Pack => No
2020-11-23 12:22 gorkaion Issue generated from 0044622
2020-11-23 12:22 gorkaion Relationship added related to 0044622
2020-11-27 09:42 dmiguelez Assigned To Triage Finance => AtulOpenbravo
2020-11-27 17:18 AtulOpenbravo Status new => scheduled
2020-12-02 08:30 AtulOpenbravo Note Added: 0124681
2020-12-02 08:31 AtulOpenbravo Note Edited: 0124681 View Revisions
2020-12-02 15:53 hgbot Note Added: 0124694
2020-12-02 16:11 hgbot Resolution open => fixed
2020-12-02 16:11 hgbot Status scheduled => closed
2020-12-02 16:11 hgbot Fixed in Version => PR21Q1
2020-12-02 16:11 hgbot Note Added: 0124695
2020-12-02 16:11 hgbot Note Added: 0124696


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker