Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030037Openbravo ERP05. Production managementpublic2015-05-28 10:102015-06-06 16:53
VictorVillar 
jorge-garcia 
immediatecriticalalways
closedfixed 
5
pi 
3.0PR15Q3 
vmromanos
Core
No
0030037: Completed quantity in the Work Requirement is not updated under some circumstancies
Completed quantity in the Work Requirement is not updated under some circumstancies
As group Admin role,
  Navigate to Product window:
  Check Production = YES for
        Cerverza Ale
        Cerveza Lager
For Cerveza Ale go to Manufacturing Tab:
   create a new register: Organization España Región Norte
                          Storage Bin: RN-0-0-0
Cerveza Lager should not have any register in the Manufacturing tab.

Go to Process Plan window:
   Organization: *
   Name: Test
  Version tab:
    Starting Date: 01-01-2014
    Ending Date: 31-10-9999
  Operation tab:
    Name: sec
    Activity: Actividad
  I/O Products tab
    New register: P+ Cerveza Ale, Qty: 1
    New register: P- Cerveza Lager Qty: 1

Go to Work Requirement window,
  Starting Date: Today
  Ending Date: today
  Process Plan: Test
  Organization: España Región Norte
  Qty: 5
Click on Process Work Requirement button
 Realise that the Operation and Products have been populated with the Process Plan data

Go to Operation tab and edit the register (grid view). DO NOT save the register.
Keep it in 'editing' status.

Go to Work Effort window:
  Organization: España Región Norte
  Starting time: 2
  Ending Time: 3
 Go to Production Run tab:
   Select the Work Requirement Phase created before
   Completed Qty: 1
  Click on Create Standards button and validate the Work Effort.

Go to Work Requirement window | operation tab again, and save the register.
Realise that the Completed qty is not updated. It is still showing 0.

The problem is that there is not detection when you are going to save the register that this record has been changed.

the ma_workeffort_validate function is not updating the 'updated' column of the ma_wrphase table.
Possible solution:

 FOR Cur_ProductionPlan IN
        (SELECT * FROM M_PRODUCTIONPLAN pp WHERE pp.M_PRODUCTION_ID=v_Record_ID)
      LOOP
        UPDATE MA_WRPHASE
          SET DONEQUANTITY=DONEQUANTITY + Cur_ProductionPlan.PRODUCTIONQTY, RUNTIME=Cur_ProductionPlan.RUNTIME,
+++++++++ UPDATED = NOW()
        WHERE MA_WRPhase_ID=Cur_ProductionPlan.MA_WRPHASE_ID;
No tags attached.
depends on backport 00301043.0PR15Q2.2 closed jorge-garcia Completed quantity in the Work Requirement is not updated under some circumstancies 
depends on backport 00301053.0PR15Q1.5 closed jorge-garcia Completed quantity in the Work Requirement is not updated under some circumstancies 
Issue History
2015-05-28 10:10VictorVillarNew Issue
2015-05-28 10:10VictorVillarAssigned To => Triage Finance
2015-05-28 10:10VictorVillarModules => Core
2015-05-28 10:10VictorVillarResolution time => 1434837600
2015-05-28 10:10VictorVillarTriggers an Emergency Pack => No
2015-05-28 10:11VictorVillarIssue Monitored: networkb
2015-05-28 10:25VictorVillarNote Added: 0077858
2015-05-28 10:32VictorVillarSeveritymajor => critical
2015-05-29 10:17jorge-garciaAssigned ToTriage Finance => jorge-garcia
2015-05-29 10:17jorge-garciaStatusnew => acknowledged
2015-05-29 13:24VictorVillarSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8709#r8709
2015-06-01 09:25jorge-garciaNote Added: 0077910
2015-06-04 17:01vmromanosStatusacknowledged => scheduled
2015-06-04 17:02hgbotCheckin
2015-06-04 17:02hgbotNote Added: 0078087
2015-06-04 17:02hgbotStatusscheduled => resolved
2015-06-04 17:02hgbotResolutionopen => fixed
2015-06-04 17:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1fe773745b2d0adaf31912c6d7e8372bb1c97d65 [^]
2015-06-04 17:03hgbotCheckin
2015-06-04 17:03hgbotNote Added: 0078088
2015-06-04 17:03vmromanosReview Assigned To => vmromanos
2015-06-04 17:03vmromanosNote Added: 0078089
2015-06-04 17:03vmromanosStatusresolved => closed
2015-06-05 09:35vmromanosNote Added: 0078111
2015-06-05 09:35vmromanosStatusclosed => new
2015-06-05 09:35vmromanosResolutionfixed => open
2015-06-05 09:35vmromanosStatusnew => scheduled
2015-06-05 09:35vmromanosStatusscheduled => resolved
2015-06-05 09:35vmromanosResolutionopen => fixed
2015-06-05 09:36vmromanosStatusresolved => closed
2015-06-06 16:53hudsonbotCheckin
2015-06-06 16:53hudsonbotNote Added: 0078125
2015-06-06 16:53hudsonbotCheckin
2015-06-06 16:53hudsonbotNote Added: 0078126

Notes
(0077858)
VictorVillar   
2015-05-28 10:25   
Also, it is necessary to have a script to fix the data:

- the completed qty
- detect the possible excess of qty produced and the qty consumed
(0077910)
jorge-garcia   
2015-06-01 09:25   
Test Plan:

As group Admin role,
  Navigate to Product window:
  Create two products:
   1) Name: Ale
   2) Name: Lager
  Check Production = YES for those products
  For Ale go to Manufacturing Tab:
   Create a new register:
     Organization España Región Norte
     Storage Bin: RN-0-0-0
  For Lager should not have any register in the Manufacturing tab.
  
  Add stock for product Ale. Go to goods receipt and create a new one for Ale Product.
   Storage Bin: RN-0-0-0

Go to Process Plan window:
   Organization: *
   Name: Test
  Version tab:
    Starting Date: 01-01-2014
    Ending Date: 31-10-9999
  Operation tab:
    Name: sec
    Activity: Actividad
  I/O Products tab
    New register: P+ Ale, Qty: 1
    New register: P- Lager Qty: 1

Go to Work Requirement window,
  Starting Date: Today
  Ending Date: today
  Process Plan: Test
  Organization: España Región Norte
  Qty: 5
Click on Process Work Requirement button
 Realise that the Operation and Products have been populated with the Process Plan data

Go to Operation tab and edit the register (grid view). DO NOT save the register.
Keep it in 'editing' status.

Go to Work Effort window:
  Organization: España Región Norte
  Starting time: 2
  Ending Time: 3
 Go to Production Run tab:
   Select the Work Requirement Phase created before
   Completed Qty: 1
  Click on Create Standards button and validate the Work Effort.

  Go to Work Requirement window | operation tab again, and save the register.
  Realise that an error appears indicating that the line you are changing has changed, and ask for revert of data.
(0078087)
hgbot   
2015-06-04 17:02   
Repository: erp/devel/pi
Changeset: 1fe773745b2d0adaf31912c6d7e8372bb1c97d65
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Jun 02 09:06:32 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1fe773745b2d0adaf31912c6d7e8372bb1c97d65 [^]

Fixed issue 30037: Completed quantity in the Work Requirement is not updated

Completed quantity in the Work Requirement is not updated under some
circumstances.

The problem was that the ma_workeffort_validate wasn't updated the UPDATED
column of the ma_wrpahse table and you can save even if the line had changed in
the work effort window.

The solution is to update the column with the actual date. Now, when you try to
save it, a error appears in the grid and the save is canceled.

---
M src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
---
(0078088)
hgbot   
2015-06-04 17:03   
Repository: erp/devel/pi
Changeset: 807a09f2e66c958a5fa12db45d4c130127ed3308
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 04 17:02:09 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/807a09f2e66c958a5fa12db45d4c130127ed3308 [^]

Related to issue 30037: updated copyright

---
M src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
---
(0078089)
vmromanos   
2015-06-04 17:03   
Code review + testing OK
(0078111)
vmromanos   
2015-06-05 09:35   
(Reopened to create backports)
(0078125)
hudsonbot   
2015-06-06 16:53   
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/7419f65cdeb3 [^]
Maturity status: Test
(0078126)
hudsonbot   
2015-06-06 16:53   
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/7419f65cdeb3 [^]
Maturity status: Test