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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029531
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 05. Production managementmajoralways2015-04-08 18:532015-05-07 22:17
ReporterVictorVillarView Statuspublic 
Assigned Tojorge-garcia 
PriorityurgentResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revision360ce267780f
ProjectionnoneETAnoneTarget Version3.0PR15Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029531: Not possible to create standards if a toolset is defined as Discard

DescriptionNot possible to create standards if a toolset is defined as Discard
Steps To ReproduceAs group admin role,
(create every register for España organization)
Go to Toolset window,
  create a new one: Cutter
  Toolset tab:
     Search key: Cutter
     Discard: YEs
     Storage Bin: RN-0-0-0
     
Go to Work Center,
   create a new one.
      Activity tab:
        create a new one. name = Production
       Toolset tab: cutter - Utilization Coefficient: 10
   Machine tab: select a machine (Create a new one)

Go to Manufacturing Cost Center
   create a new one with a valid version and the machine created before


Go to Activity window:
 create a new one. Name: Actividad
    select the Cost center created before and the Work Center created before.
  Toolset: cutter - Utilization Coefficient: 10

   Go To process plan
      Include Operations when inserting = Yes
      Name: Process Plan
     Version tab: Starting date: 01/01/2012
                  Ending date: 31/12/9999
     Operation tab: name: S1
       Activity: select the one created before
       Create Standards: Yes
  I/O Products:
     select one P- and one P+ (create two products defined as Production)

Go to Work Requirement window,
   select the process plan created before
   qty: 1
 Process the work requirement
 Click on 'Create Work Effort'

Realise that the following error appears: ma_toolset_id can not be null.

The problem: ma_productionrun_standard function
 


  --Insert toolsets if necessary
      v_ResultStr:='ToolsetProcess Processing';
      FOR Cur_ToolsetProcess IN
        (SELECT MA_Toolset_Type_ID, UseCoef
        FROM MA_ToolsetProcess
        WHERE MA_Process_ID=v_Process_ID)
      LOOP
        DECLARE
          Cur_MAToolSet RECORD;
        BEGIN
          --It's taken the toolset with higher number of uses
          FOR Cur_MAToolSet IN
            (SELECT MA_Toolset_ID AS Toolset_ID
            FROM MA_Toolset
            WHERE MA_Toolset_Type_ID=Cur_ToolsetProcess.MA_Toolset_Type_ID
              AND Discarded='N'
            ORDER BY NumberUses DESC
            )
          LOOP
            v_Toolset_ID:=Cur_MAToolSet.Toolset_ID;
            EXIT;
          END LOOP;
        END;
        SELECT * INTO v_ToolsetUsed_ID FROM Ad_Sequence_Next('MA_ToolsetUsed', v_Client_ID) ;
        INSERT
        INTO MA_ToolsetUsed
          (
            MA_ToolsetUsed_ID, AD_Client_ID, AD_Org_ID, Created,
            Createdby, Isactive, M_ProductionPlan_ID, MA_Toolset_ID,
            Updated, Updatedby, Used
          )
          VALUES
          (
            v_ToolsetUsed_ID, v_Client_ID, v_PlanOrg_ID, TO_DATE(NOW()),
            v_User_ID, 'Y', v_Record_ID, v_Toolset_ID,
            TO_DATE(NOW()), v_User_ID, Cur_ToolsetProcess.UseCoef*v_DoneQuantity
          );
      END LOOP;

It seems that it is not taking into account when v_Toolset_ID is null
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0076606)
jorge-garcia (developer)
2015-04-17 13:46

Test Plan:

As group admin role,
(create every register for España organization)
Go to Toolset window,
  create a new one: Cutter
  Toolset tab:
     Search key: Cutter
     Discard: YEs
     Storage Bin: RN-0-0-0
     
Go to Work Center,
   create a new one.
      Activity tab:
        create a new one. name = Production
       Toolset tab: cutter - Utilization Coefficient: 10
   Machine tab: select a machine (Create a new one)

Go to Manufacturing Cost Center
   create a new one with a valid version and the machine created before


Go to Activity window:
 create a new one. Name: Actividad
    select the Cost center created before and the Work Center created before.
  Toolset: cutter - Utilization Coefficient: 10

   Go To process plan
      Include Operations when inserting = Yes
      Name: Process Plan
     Version tab: Starting date: 01/01/2012
                  Ending date: 31/12/9999
     Operation tab: name: S1
       Activity: select the one created before
       Create Standards: Yes
  I/O Products:
     select one P- and one P+ (create two products defined as Production)

Go to Work Requirement window,
   select the process plan created before
   qty: 1
 Process the work requirement
 Click on 'Create Work Effort' and check that the Work Effort is created

**OPTIONAL**
Delete the Work Effort just created
Go to Toolset Window and in the Toolset tab set Discard = 'N'
Go to Work Requirement window and click on 'Create Work Effort'
Check that the Work Effort is created and the Toolset appears in the Toolset tab
(0076933)
hgbot (developer)
2015-05-04 12:47

Repository: erp/devel/pi
Changeset: 360ce267780f1ac57ef62f6e80242f2a7ef24607
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Apr 17 13:40:09 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/360ce267780f1ac57ef62f6e80242f2a7ef24607 [^]

Fixed issue 29531: Not possible to create standards with a discarded toolset

Not possible to create standards if a toolset is defined as Discard.

The problem occurs when, in the ma_productionrun_standard function, insert
a null ma_toolset_id. This happens when only discard toolsets are available.

The solution is to avoid the insert of a null ma_toolset_id in the function.

Now, it is possible to create a Work Effort with a discarded toolset. In the
Work Effort window, the discarded toolset doesn't appear in the Toolset tab.

---
M src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml
---
(0076934)
Sandrahuguet (developer)
2015-05-04 12:47

Code review + testing OK
(0077197)
hudsonbot (developer)
2015-05-07 22:17

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/a1817f84bd8b [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-04-08 18:53 VictorVillar New Issue
2015-04-08 18:53 VictorVillar Assigned To => Sandrahuguet
2015-04-08 18:53 VictorVillar Modules => Core
2015-04-08 18:53 VictorVillar Triggers an Emergency Pack => No
2015-04-08 18:53 VictorVillar Issue Monitored: networkb
2015-04-14 12:48 Triage Finance Assigned To Sandrahuguet => Triage Finance
2015-04-16 18:18 jorge-garcia Status new => scheduled
2015-04-17 13:46 jorge-garcia Note Added: 0076606
2015-04-30 18:12 Sandrahuguet Assigned To Triage Finance => jorge-garcia
2015-04-30 18:12 Sandrahuguet Review Assigned To => Sandrahuguet
2015-05-04 12:47 hgbot Checkin
2015-05-04 12:47 hgbot Note Added: 0076933
2015-05-04 12:47 hgbot Status scheduled => resolved
2015-05-04 12:47 hgbot Resolution open => fixed
2015-05-04 12:47 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/360ce267780f1ac57ef62f6e80242f2a7ef24607 [^]
2015-05-04 12:47 Sandrahuguet Note Added: 0076934
2015-05-04 12:47 Sandrahuguet Status resolved => closed
2015-05-04 12:47 Sandrahuguet Fixed in Version => 3.0PR15Q3
2015-05-07 22:17 hudsonbot Checkin
2015-05-07 22:17 hudsonbot Note Added: 0077197


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker