Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005976Openbravo ERP06. Material requirement planning (MRP)public2008-11-14 21:432009-04-21 11:07
slava_u 
gorkaion 
highmajoralways
closedfixed 
5
2.40 
 
Core
No
0005976: When MRP creates Material Requisitions, it does not put UOM in requisition lines
When MRP creates Material Requisitions, it does not put UOM in requisition lines (and it's not possible to change it because they are grayed). It means it's impossible to create Purchase order from the Requisitions that were produced by MRP later.
In the source code of MRP_REQUISITION.xml it's simply missing part which inserts UOM-s to the M_REQUISITIONLINE
Just process MRP-> "Generate Material Requisitions".
All Requsitions lines will be with empty UOM.
Something like it:

--- MRP_REQUISITION.xml 2008-11-14 21:14:32.000000000 +0100
+++ n/MRP_REQUISITION.xml 2008-11-14 21:15:24.000000000 +0100
@@ -95,11 +95,12 @@
     );
 
     FOR Cur_workproposal IN (
- SELECT *
- FROM MRP_RUN_PRODUCTIONLINE
+ SELECT MRP_RUN_PRODUCTIONLINE.*, M_PRODUCT.C_UOM_ID
+ FROM MRP_RUN_PRODUCTIONLINE,M_PRODUCT
       WHERE MRP_RUN_PRODUCTION_ID = v_Record_ID
         AND INOUTTRXTYPE = 'MP'
         AND M_REQUISITIONLINE_ID IS NULL
+ AND MRP_RUN_PRODUCTIONLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
       ORDER BY PLANNEDDATE
       ) LOOP
       v_ResultStr:='Create Requisition';
@@ -110,12 +111,12 @@
         M_REQUISITIONLINE_ID, AD_CLIENT_ID, AD_ORG_ID,
         ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY,
         M_REQUISITION_ID, NEEDBYDATE, M_PRODUCT_ID,
- QTY, LINE
+ QTY, LINE, C_UOM_ID
       ) VALUES (
         v_MRequisitionLine_ID, v_Client_ID, v_Org_ID,
         'Y', now(), v_User_ID, now(), v_User_ID,
         v_MRequisition_ID, Cur_workproposal.PLANNEDDATE, Cur_workproposal.M_PRODUCT_ID,
- Cur_workproposal.QTY, v_Line
+ Cur_workproposal.QTY, v_Line, Cur_workproposal.C_UOM_ID
       );
 
       UPDATE MRP_RUN_PRODUCTIONLINE
No tags attached.
Issue History
2008-11-14 21:43slava_uNew Issue
2008-11-14 21:43slava_uAssigned To => rafaroda
2008-11-14 21:43slava_usf_bug_id0 => 2286207
2008-11-20 10:49rafarodaNote Added: 0010434
2008-11-20 10:49rafarodaStatusnew => feedback
2008-11-24 11:59rafarodaAssigned Torafaroda => gorkaion
2008-11-24 11:59rafarodaNote Added: 0010548
2008-12-03 19:03pjuvaraPrioritynormal => high
2008-12-11 19:27svnbotCheckin
2008-12-11 19:27svnbotNote Added: 0011208
2008-12-11 19:27svnbotStatusfeedback => resolved
2008-12-11 19:27svnbotResolutionopen => fixed
2008-12-11 19:27svnbotsvn_revision => 11130
2008-12-11 19:32gorkaionNote Added: 0011209
2009-04-21 11:07psarobeStatusresolved => closed

Notes
(0010434)
rafaroda   
2008-11-20 10:49   
Please detail a simple example step by step so later on QA team will verify if it's fixed or not
(0010548)
rafaroda   
2008-11-24 11:59   
Reminder sent to: slava_u

Please detail a simple example step by step so later on QA team will verify if it's fixed or not
(0011208)
svnbot   
2008-12-11 19:27   
Repository: openbravo
Revision: 11130
Author: gorkaion
Date: 2008-12-11 19:27:48 +0100 (Thu, 11 Dec 2008)

Fixed bug 5976. Modified the procedure to include the C_UOM_ID in the insert statement.

---
U trunk/src-db/database/model/functions/MRP_REQUISITION.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=11130&sc=1 [^]
(0011209)
gorkaion   
2008-12-11 19:32   
Steps to reproduce/verify:

Create a new Manufacturing Plan in:
Material Requirement Planning (MRP) || Transactions || Manufacturing Plan || Header

Create a line filling all the fields except the requisition line combo. In the transaction type select suggested material requirement.

Go back to the header and click the 'Generate Material Requisitions' button to generate the requisition.

check that the generated requisitionline has the proper C_UOM_ID