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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039109
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 06. Material requirement planning (MRP)majoralways2018-08-09 10:292018-08-30 18:48
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q4
StatusclosedFix in branchFixed in SCM revisionc516c88b947d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039109: Create Reservations fails on MRP Purchase Plan without attributes

DescriptionOn Purchase Plan once the purchase orders are generated if the product does not use attributes the Create Reservations fails while generating the pre-reservations.

Error shown:
org.openbravo.base.exception.OBException: ERROR: null value in column "m_attributesetinstance_id" violates not-null constraint Detail: Failing row contains (50BF46FB533A401195AB6AF2102DFA30, 23C59575B9CF467C9620760EB255B389, 2E60544D37534C0B89E765FE29BC0B43, Y, 2018-08-09 10:16:30, 100, 2018-08-09 10:16:30, 100, D49EAB61E6A84BD2B2E9BCA68872281E, F58F03F406FD4705B59E90D70715281C, 6, N, null, null, 0, N). Where: SQL statement "INSERT INTO m_reservation_stock( m_reservation_stock_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, m_reservation_id, m_attributesetinstance_id, m_locator_id, c_orderline_id, quantity, releasedqty, isallocated ) VALUES ( v_reservation_stock_id, v_client_id, v_org_id, 'Y', TO_DATE(NOW()), p_user_id, TO_DATE(NOW()), p_user_id, p_reservation_id, v_asi_id, v_locator_id, v_poline_id, p_qty, 0, p_allocated )" PL/pgSQL function m_reserve_stock_manual(character varying,character varying,character varying,numeric,character varying,character varying) line 110 at SQL statement
Steps To ReproduceOn an instance proffesional with the MRP module available.
1. Create a new item product and add it to a purchase and a sales pricelist.
2. Create a purchase order of the product of 10 units.
3. Create a sales order of the product of 6 units.
4. Create a Purchase Plan header.
5. Add a purchase plan line with:
- Type Pending Sales Order.
- Dates current
- Quantities -6
- Select the sales order line previously created.
6. Add a purchase plan line with:
- Type Suggested Purchase Order.
- Dates current
- Quantities 10
- Select the purchase order line previously created.
7. Click on Create Reservations button.
Proposed SolutionThe m_reserve_stock_manual procedure does not properly initialize the v_asi_id variable cuasing the insert into error trying to set a null value.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0106395)
AtulOpenbravo (developer)
2018-08-20 07:02

Test Plan

In an instance proffesional with the MRP module available.

- Create a new item product and add it to a purchase and a sales pricelist.
- Create a purchase order of the product of 10 units.
- Create a sales order of the product of 6 units.
- Create a Purchase Plan header.
- Add a purchase plan line with:
  - Type Pending Sales Order.
  - Date: Current Date
  - Quantities -6
  - Select the sales order line previously created.
- Add a purchase plan line with:
  - Type Suggested Purchase Order.
  - Date: Current Date
  - Quantities 10
  - Select the purchase order line previously created.
- Click on Create Reservations button, realize that stock reservation for purchase order line is created successfully.
(0106536)
hgbot (developer)
2018-08-30 14:38

Repository: erp/devel/pi
Changeset: c516c88b947d0c9eed0902fa779ea5558070948d
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Aug 20 10:48:39 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c516c88b947d0c9eed0902fa779ea5558070948d [^]

Fixes Issue 39109: Create Reservations fails on MRP Purchase Plan
 without attributes

Initialize v_asi_id in m_reserve_stock_manual with default value
of attributesetinstance as 0

---
M src-db/database/model/functions/M_RESERVE_STOCK_MANUAL.xml
---
(0106537)
Sandrahuguet (developer)
2018-08-30 14:39

code review + testing OK
(0106549)
hudsonbot (developer)
2018-08-30 18:48

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f018f6d60a65 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-08-09 10:29 gorkaion New Issue
2018-08-09 10:29 gorkaion Assigned To => Triage Finance
2018-08-09 10:29 gorkaion Modules => Core
2018-08-09 10:29 gorkaion Resolution time => 1535580000
2018-08-09 10:29 gorkaion Triggers an Emergency Pack => No
2018-08-09 10:46 Sandrahuguet Assigned To Triage Finance => AtulOpenbravo
2018-08-10 09:23 Practics Issue Monitored: Practics
2018-08-20 06:50 AtulOpenbravo Status new => scheduled
2018-08-20 07:02 AtulOpenbravo Note Added: 0106395
2018-08-30 14:38 hgbot Checkin
2018-08-30 14:38 hgbot Note Added: 0106536
2018-08-30 14:38 hgbot Status scheduled => resolved
2018-08-30 14:38 hgbot Resolution open => fixed
2018-08-30 14:38 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c516c88b947d0c9eed0902fa779ea5558070948d [^]
2018-08-30 14:39 Sandrahuguet Review Assigned To => Sandrahuguet
2018-08-30 14:39 Sandrahuguet Note Added: 0106537
2018-08-30 14:39 Sandrahuguet Status resolved => closed
2018-08-30 14:39 Sandrahuguet Fixed in Version => 3.0PR18Q4
2018-08-30 18:48 hudsonbot Checkin
2018-08-30 18:48 hudsonbot Note Added: 0106549


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker