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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044622
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2020-07-16 14:212020-11-23 12:22
ReportergorkaionView Statuspublic 
Assigned Toinigo_lerga 
PriorityhighResolutionfixedFixed in VersionPR20Q4
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

0044622: Attribute required check in M_TRANSACTION_TRG trigger should be relaxed

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

This check already has an exception to regularize stock with Physical Inventories.

There are known scenarios that require new exceptions to this check. Most of them involve creating transactions when there is no stock of the product.

Known cases:
1. POS selling products with no available stock and the Use Attributes preference disabled.
2. AutoBOM executing a production with the preference to consume all the required ingredients quantity even if there is no stock available.
3. BOM Production with the flag to consume all required products when there is not enough stock.
Steps To ReproducePOS Case. It is working because it throws the triggers.
1. Ensure use attributes preferences is not enabled.
2. Sell a item that uses attributes and that does not have stock.

AutoBOM Case. It is required to use an old version, in latest triggers are disabled so it does not fail.
1. Create a BOM with ingredients that use attributes.
2. Ensure that there is not enougth stock of those ingredients.
3. Enable preference to allow negative stock on ingredients.
4. Sell the autobom.


BOM Production.
1. Create a BOM Product using parts that require attributes
2. Ensure that parts do not have enough stock
3. Create a new production and check the flag to consume all the required part quantities.
4. It creates production lines with no attributes for the parts with no stock.
5. Process it and check failure.

Proposed SolutionRelax the check to allow no attributes when there is no stock of the product on the transaction storage bin.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0045477 closedAtulOpenbravo Openbravo ERP Attribute required check in M_TRANSACTION_TRG trigger should allow when stock is zero 
blocks defect 0044596 closedranjith_qualiantech_com Retail Modules Wrong M_STORAGE_DETAIL table when using AutoBOM with attributes and no stock 

-  Notes
(0121643)
hgbot (developer)
2020-07-27 15:56

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/116 [^]
(0121648)
inigo_lerga (developer)
2020-07-27 16:36
edited on: 2020-07-28 13:00

--Test Plan Mantis HQL--
First of All, the M_INOUT_POST function in the BBDD needs to be modified
to get to execute the code of this Issue. Erase the lines from 382 to 388 (both included).
Moreover, the M_PRODUCT_TRG BBDD trigger needs to be disabled.
Also, retails modules need to be installed to use The White Valley data.

As the The White Valley Group Admin role in Backend (with a specific Organization such as Vall Blanca Store):
  - Go to Attribute window and create a new record with name "Color".
    In the Attribute Value Tab create two records, one for "Blue" and one for "Red".

  - Go to Product window and open the record for "Adhesive body warmers".
    Set any Attribute Set desired (a pre-existing one is fine).
    Now open that Attribute Set in the Attribute Set window and go to the Assigned Attribute Tab and create a new record with preciously created Attribute (Color).

  - Go to Goods Shipment window and create a new record for any Business Partner
    desired.
    Go to Lines Tab and create a new record for "Adhesive body warmers". Leave the
    Attribute Set Value empty. Select the "VBS/001 0-0-0" Storage Bin (which already
    has the negative stock needed to test the fix) and set 10 units as Operative
    Quantity.
    Save the record and Complete it.

#Now this workflow is successfully executed"

(0121735)
hgbot (developer)
2020-07-31 10:47

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/116 [^]
(0121736)
hgbot (developer)
2020-07-31 10:47

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: a1cfccefe7c93d2fc73538269f3ae58393f5b4f6
Author: IƱigo Lerga Valencia <inigo.lerga@openbravo.com>
Date: 2020-07-31T08:47:06+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a1cfccefe7c93d2fc73538269f3ae58393f5b4f6 [^]

fixes BUG-44622:Condition relaxed in M_TRANSACTION_TRG trigger

When the stock of a product is negative (and the record is a
movementLine, sales inoutLine or productionLine) there is no need
to specify the attribute value of the product.

---
M src-db/database/model/triggers/M_TRANSACTION_TRG.xml
---

- Issue History
Date Modified Username Field Change
2020-07-16 14:21 gorkaion New Issue
2020-07-16 14:21 gorkaion Assigned To => Triage Finance
2020-07-16 14:21 gorkaion Modules => Core
2020-07-16 14:21 gorkaion Triggers an Emergency Pack => No
2020-07-16 14:24 gorkaion Relationship added blocks 0044596
2020-07-20 12:21 ngarcia Issue Monitored: ngarcia
2020-07-22 10:15 dmiguelez Assigned To Triage Finance => inigo_lerga
2020-07-23 10:00 inigo_lerga Status new => scheduled
2020-07-27 15:56 hgbot Note Added: 0121643
2020-07-27 16:36 inigo_lerga Note Added: 0121648
2020-07-28 09:52 inigo_lerga Note Edited: 0121648 View Revisions
2020-07-28 12:59 inigo_lerga Note Edited: 0121648 View Revisions
2020-07-28 13:00 inigo_lerga Note Edited: 0121648 View Revisions
2020-07-31 10:47 hgbot Note Added: 0121735
2020-07-31 10:47 hgbot Resolution open => fixed
2020-07-31 10:47 hgbot Status scheduled => closed
2020-07-31 10:47 hgbot Fixed in Version => PR20Q4
2020-07-31 10:47 hgbot Note Added: 0121736
2020-11-23 12:22 gorkaion Issue cloned 0045477
2020-11-23 12:22 gorkaion Relationship added related to 0045477


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker