Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019957Openbravo ERP05. Production managementpublic2012-03-06 13:072012-04-02 06:12
malsasua 
jecharri 
highmajoralways
closedfixed 
20Community Appliance
pi 
3.0MP10 
Google Chrome
Core
No
0019957: wrong code in mrp_run_initialize process
When a purchase order line, the schedule delivery date is null , error is returned:
null value in column "qty" violates not-null constraint

It is generated because in mrp_run_initialize process, in cursor Cur_OrderLine, in the cursor query, the call to the process Mrp_Check_Planningmethod in the zone "select" is distinct to call in the zone "where":
in the zone "where", the third parameter of Mrp_Check_Planningmethod process is
 TO_NUMBER(COALESCE(ol.DatePromised, ol.DateOrdered, o.DateOrdered) - p_PlanningDate)
and in the zone "select" the third parameter is
TO_NUMBER(ol.DatePromised - p_PlanningDate)
this should be equal to previous:
 TO_NUMBER(COALESCE(ol.DatePromised, ol.DateOrdered, o.DateOrdered) - p_PlanningDate)
. create purchase order line without schedule delivery date
. run process purchase plan
change in zone "select", in call to process Mrp_Check_Planningmethod, the third parameter from
TO_NUMBER(ol.DatePromised - p_PlanningDate)
to
TO_NUMBER(COALESCE(ol.DatePromised, ol.DateOrdered, o.DateOrdered) - p_PlanningDate)
No tags attached.
depends on backport 00201312.50MP41 closed jecharri wrong code in mrp_run_initialize process 
Issue History
2012-03-06 13:07malsasuaNew Issue
2012-03-06 13:07malsasuaAssigned To => vmromanos
2012-03-06 13:07malsasuaWeb browser => Google Chrome
2012-03-06 13:07malsasuaModules => Core
2012-03-06 13:07malsasuaResolution time => 1337551200
2012-03-12 12:26vmromanosAssigned Tovmromanos => jonalegriaesarte
2012-03-27 17:26jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-03-27 17:26jonalegriaesarteWeb browserGoogle Chrome => Google Chrome
2012-03-27 17:26jonalegriaesarteversion => pi
2012-03-27 17:26jonalegriaesarteTarget Version => 3.0MP10
2012-03-28 09:22hgbotCheckin
2012-03-28 09:22hgbotNote Added: 0046793
2012-03-28 09:22hgbotStatusnew => resolved
2012-03-28 09:22hgbotResolutionopen => fixed
2012-03-28 09:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/09e5d0020049826d1bc97b7a042d462e37f82179 [^]
2012-03-28 09:25jecharriStatusresolved => new
2012-03-28 09:25jecharriResolutionfixed => open
2012-03-28 09:25jecharriStatusnew => scheduled
2012-03-28 09:25jecharrifix_in_branch => pi
2012-03-28 09:25jecharriStatusscheduled => resolved
2012-03-28 09:25jecharriResolutionopen => fixed
2012-03-30 11:22malsasuaNote Added: 0046965
2012-03-30 11:22malsasuaStatusresolved => closed
2012-04-02 06:12hudsonbotCheckin
2012-04-02 06:12hudsonbotNote Added: 0047250

Notes
(0046793)
hgbot   
2012-03-28 09:22   
Repository: erp/devel/pi
Changeset: 09e5d0020049826d1bc97b7a042d462e37f82179
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Wed Mar 28 09:21:37 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/09e5d0020049826d1bc97b7a042d462e37f82179 [^]

Fixes issue 19957: wrong code in mrp_run_initialize process

---
M src-db/database/model/functions/MRP_RUN_INITIALIZE.xml
---
(0046965)
malsasua   
2012-03-30 11:22   
rev: 3.0.15680
test plan:
. steps -> ok

code review-> ok
(0047250)
hudsonbot   
2012-04-02 06:12   
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/7814864461ac [^]

Maturity status: Test