Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0044759 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] 02. Master data management | major | always | 2020-08-05 22:30 | 2020-08-14 11:57 | |||
| Reporter | sdossantos | View Status | public | |||||
| Assigned To | inigo_lerga | |||||||
| Priority | high | Resolution | fixed | Fixed in Version | PR20Q4 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Oracle | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | pi | SCM revision | ||||||
| Merge Request Status | approved | |||||||
| Review Assigned To | ||||||||
| OBNetwork customer | OBPS | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | 17409 | |||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0044759: It is not possible to deactivate a product with zero stock | |||||||
| Description | A new product is created and stock is added to the new product with a physical inventory. We execute a flow of sale and purchase with the new product, without leaving any pending documents associated with the product. The stock of the new product is changed to zero with a physical inventory. When the stock is zero, and we want to deactivate the new product, the following error appears: "Error saving. There are lines of pending documents associated with the product. Please reactivate them before updating the product." The error comes of the M_PRODUCT_TRG, when the following query obtain a result different to zero: SELECT COALESCE(SUM(QtyReserved),0) , COALESCE(SUM(QtyOrdered),0) FROM (SELECT QtyOnHand, 0 AS QtyReserved, 0 AS QtyOrdered FROM M_Storage_Detail s WHERE s.M_Product_ID='idproduct' UNION SELECT 0 AS QtyOnHand, QtyReserved, QtyOrdered FROM M_Storage_Pending s WHERE s.M_Product_ID='idproduct') For some reason, the m_storage_pending is not updated. | |||||||
| Steps To Reproduce | Specs: 1- Create a new product. 2- Configure the price list of the new product. 3- Create a physical inventory with the new product and add stock. 4- Create a sales order with the new product. Complete it. 5- Create a good shipment with the sales order of the point 4. Complete and Post it. 6- Create a purchase order with the new product. Complete it. 7- Create a good receipt with the purchase order of point 6. 8- Control the stock of the new product and create a physical inventory and leave the stock in zero. 9- Deactivate the product. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
|
Notes |
|
|
(0121982) hgbot (developer) 2020-08-11 13:59 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/119 [^] |
|
(0121987) inigo_lerga (viewer) 2020-08-11 14:48 |
--Test Plan Mantis HQL-- #This Issue only occurs in an environment with Oracle Database# As the F&B International Group Admin role in Backend: - Go to Product window and create a new record with any Name and Test Plan desired. Go to Price Tab and create a new record with 'Tarifa de ventas' as Price List Version and set any desired Unit and List Price. Create a new record in the same Price Tab with 'Tarifa Bebidas Alegres' as Price List Version and set any desired Unit and List Price. Save the record. - Go to Physical Inventory window and create a new record leaving the fields as default. Go to Lines Tab and create a new line with the previously created poduct and 100 as Quantity Count. Also set 'RN-2-0-0' as Storage Bin. Save and process the Physical Inventory. - Go to Sales Order window and create a new record with 'Alimentos y Supermercado' as Business Partner. Go to Lines Tab and create a new line with the previously created product and 20 as Ordered QuantityCreate a sales order with the new product. Save the record and complete it. - Go to Goods Shipment window and create a new record with 'Alimentos y Supermercado' as Business Partner. Go to Lines Tab and select lines from the previous Sales Order setting 'RN-2-0-0' as Storage Bin. Save the record, complete it and post it. - Go to Purchase Order window and create a new record with 'Bebidas Alegres, S.L' as Business Partner. Go to Lines Tab and create a new line with the previously created product and 20 as Ordered Quantity. Save the record and complete it. - Go to Goods Receipt window and create a new record with 'Bebidas Alegres, S.L.' as Business Partner. Go to Lines Tab and select lines from the previous Purchase Order setting 'RN-2-0-0' as Storage Bin. Save the record, complete it and post it. - Go back to Physical Inventory window and create a new record leaving the fields as default. Go to Lines Tab and create a new line with the previously created poduct and 0 as Quantity Count. Also set 'RN-2-0-0' as Storage Bin. Save and process the Physical Inventory. - Go back to Product window and disable the Active checkbox in the record of the previously created product. #Now this workflow is successfully executed" |
|
(0122064) hgbot (developer) 2020-08-14 11:57 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/119 [^] |
|
(0122065) hgbot (developer) 2020-08-14 11:57 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 60f9d67859046a105b4458386de33aeffeaeb013 Author: inigo_lerga <inigo.lerga@openbravo.com> Date: 2020-08-14T09:57:06+00:00 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/60f9d67859046a105b4458386de33aeffeaeb013 [^] fixes BUG-44759:Avoided comparation with null in Oracle When doing a comparison like ''<>'OB', the '' part is considered as NULL by Oracle, which causes an error. This patch fixes that. --- M src-db/database/model/functions/C_ORDER_POST1.xml --- |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2020-08-05 22:30 | sdossantos | New Issue | |
| 2020-08-05 22:30 | sdossantos | Assigned To | => Triage Finance |
| 2020-08-05 22:30 | sdossantos | Modules | => Core |
| 2020-08-05 22:30 | sdossantos | Triggers an Emergency Pack | => No |
| 2020-08-05 23:52 | sdossantos | File Added: product.mp4 | |
| 2020-08-07 09:10 | ngarcia | OBNetwork customer | => OBPS |
| 2020-08-07 09:10 | ngarcia | Support ticket | => 17409 |
| 2020-08-07 09:10 | ngarcia | Resolution time | => 1566943200 |
| 2020-08-07 09:28 | ngarcia | Resolution time | 1566943200 => 1598565600 |
| 2020-08-10 14:47 | dmiguelez | Assigned To | Triage Finance => inigo_lerga |
| 2020-08-11 08:22 | inigo_lerga | Status | new => scheduled |
| 2020-08-11 13:59 | hgbot | Merge Request Status | => open |
| 2020-08-11 13:59 | hgbot | Note Added: 0121982 | |
| 2020-08-11 14:48 | inigo_lerga | Note Added: 0121987 | |
| 2020-08-14 11:57 | hgbot | Merge Request Status | open => approved |
| 2020-08-14 11:57 | hgbot | Note Added: 0122064 | |
| 2020-08-14 11:57 | hgbot | Resolution | open => fixed |
| 2020-08-14 11:57 | hgbot | Status | scheduled => closed |
| 2020-08-14 11:57 | hgbot | Fixed in Version | => PR20Q4 |
| 2020-08-14 11:57 | hgbot | Note Added: 0122065 | |
| Copyright © 2000 - 2009 MantisBT Group |