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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0043215
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementminoralways2020-02-13 11:052020-03-03 11:24
Reportersalvador_campanellaView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revision595393125a89
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0043215: IIt is impossible to delete products because of dependency with m_store_pending table

DescriptionIt is impossible to delete products because of dependency with m_store_pending table
Steps To ReproduceTested on Livebuilds
- Go to the product window and create a new product
- Assign a new price for the price list "Tarifa Bebidas Alegres"
- Assing a new price for the price list "Tarifa de ventas"
- Go to the Sales Order Window
- Create a new order
- On the lines tab add the product created before
- Book the order clicking the book button
- Click on the close button and reactivate the order
- Edit the line created before changing the product for another one
- Book the order clicking the book button
- Go to the product window and select the product created before
- Delete the lines from the prince and accounting tabs
- Try to delete the product

Result: it's not possible

- try to delete the product directly from the database and the following message appears

------------------------------------------
'''ERROR: update or delete on table "m_product" violates foreign key constraint "m_storage_pending_m_product" on table "m_storage_pending"
DETAIL: Key (m_product_id)=(44C8B4AFBB764515994726F4E3EC66DF) is still referenced from table "m_storage_pending".
********* Error *********

ERROR: update or delete on table "m_product" violates foreign key constraint "m_storage_pending_m_product" on table "m_storage_pending"
SQL state: 23503
Detail: Key (m_product_id)=(44C8B4AFBB764515994726F4E3EC66DF) is still referenced from table "m_storage_pending".
------------------------------------------

- If you check this line in m_storage_pending the qtyreserved column value is 0 and should be possible delete the product
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0043368 closedAtulOpenbravo API Change: Foreign Key Definition for M_Product_ID in M_Storage_Pending changed 

-  Notes
(0118066)
AtulOpenbravo (developer)
2020-02-25 07:58

Test Plan

- Go to the product window and create a new product:-
  Search key: 43215
  Name: Test Product 43215
- Assign a new price for the price list "Tarifa Bebidas Alegres".
- Assign a new price for the price list "Tarifa de ventas".
- Go to the Sales Order Window.
- Create a new order.
- On the lines tab add the product "Test Product 43215"
- Book the order.
- Click on the close button and reactivate the order
- Edit the line created before c
- Book the order.
- Go to the product window and select the product "Test Product 43215"
- Try to delete the product
- Realize that product is deleted successfully.

Same plan could be successfully executed for Purchase flow.
(0118226)
hgbot (developer)
2020-03-02 10:16

Repository: erp/devel/pi
Changeset: 595393125a8968a8b8025b82244b2209a325649f
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 26 11:23:39 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/595393125a8968a8b8025b82244b2209a325649f [^]

Fixes BUG-0043215: It is impossible to delete products
because of dependency with m_store_pending table

**Foreign Key for M_PRODUCT_ID in M_STORAGE_PENDING is
set as ON DELETE CASCADE so that when product is being
deleted and is not associated with any transaction,
then record associated with M_Storage_Pending gets
deleted.

---
M src-db/database/model/tables/M_STORAGE_PENDING.xml
---
(0118227)
hgbot (developer)
2020-03-02 10:16

Repository: erp/devel/pi
Changeset: 595393125a8968a8b8025b82244b2209a325649f
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 26 11:23:39 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/595393125a8968a8b8025b82244b2209a325649f [^]

Fixes BUG-0043215: It is impossible to delete products
because of dependency with m_store_pending table

**Foreign Key for M_PRODUCT_ID in M_STORAGE_PENDING is
set as ON DELETE CASCADE so that when product is being
deleted and is not associated with any transaction,
then record associated with M_Storage_Pending gets
deleted.

---
M src-db/database/model/tables/M_STORAGE_PENDING.xml
---
(0118228)
hgbot (developer)
2020-03-02 10:16

Repository: erp/devel/pi
Changeset: 595393125a8968a8b8025b82244b2209a325649f
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 26 11:23:39 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/595393125a8968a8b8025b82244b2209a325649f [^]

Fixes BUG-0043215: It is impossible to delete products
because of dependency with m_store_pending table

**Foreign Key for M_PRODUCT_ID in M_STORAGE_PENDING is
set as ON DELETE CASCADE so that when product is being
deleted and is not associated with any transaction,
then record associated with M_Storage_Pending gets
deleted.

---
M src-db/database/model/tables/M_STORAGE_PENDING.xml
---
(0118289)
dmiguelez (developer)
2020-03-03 11:24

Code Review + Testing Ok

- Issue History
Date Modified Username Field Change
2020-02-13 11:05 salvador_campanella New Issue
2020-02-13 11:05 salvador_campanella Assigned To => Triage Finance
2020-02-13 11:05 salvador_campanella Modules => Core
2020-02-13 11:05 salvador_campanella Triggers an Emergency Pack => No
2020-02-18 15:48 Practics Issue Monitored: Practics
2020-02-25 07:58 AtulOpenbravo Status new => scheduled
2020-02-25 07:58 AtulOpenbravo Note Added: 0118066
2020-02-28 11:17 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2020-02-28 11:29 AtulOpenbravo Relationship added depends on 0043368
2020-03-02 10:16 hgbot Checkin
2020-03-02 10:16 hgbot Note Added: 0118226
2020-03-02 10:16 hgbot Status scheduled => resolved
2020-03-02 10:16 hgbot Resolution open => fixed
2020-03-02 10:16 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/595393125a8968a8b8025b82244b2209a325649f [^]
2020-03-02 10:16 hgbot Checkin
2020-03-02 10:16 hgbot Note Added: 0118227
2020-03-02 10:16 hgbot Checkin
2020-03-02 10:16 hgbot Note Added: 0118228
2020-03-03 11:24 dmiguelez Review Assigned To => dmiguelez
2020-03-03 11:24 dmiguelez Note Added: 0118289
2020-03-03 11:24 dmiguelez Status resolved => closed
2020-03-03 11:24 dmiguelez Fixed in Version => 3.0PR20Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker