You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Si Chen (JIRA)" <ji...@apache.org> on 2007/01/25 04:04:49 UTC

[jira] Created: (OFBIZ-652) MRP - 3 possible quirks/bugs?

MRP - 3 possible quirks/bugs?
-----------------------------

                 Key: OFBIZ-652
                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
             Project: Apache OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: manufacturing
            Reporter: Si Chen


Running the MRP today I found a few possible bugs or quirks:

1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:

2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
---- exception report ----------------------------------------------------------
Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
  Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
Exception: org.ofbiz.entity.GenericDataSourceException 
Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
  Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
---- stack trace ---------------------------------------------------------------

Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.

2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?

3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479990 ] 

Jacopo Cappellato commented on OFBIZ-652:
-----------------------------------------

Si,

about the new status for the Requirement entity ("Proposed"), if you want, since you have recently worked on the requirement screens, you can just add it to the available statuses, and patch the requirement screen from where you can bulk approve requirements to filter them not only by statusId=CREATED but by (statusId=CREATED or statusId=PROPOSED).
Then we should probably improve the existing services and user interface to not allow certain operations on PROPOSED requirements, but this is a lower priority task in my opinion.
Then I'll take care of the changes to the MRP to make it remove all the PROPOSED requirements only, make it ignore the CREATED requirements, and make it create new requirements in the PROPOSED status.

Does it make sense?

Jacopo


> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Assigned To: Jacopo Cappellato
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471042 ] 

Si Chen commented on OFBIZ-652:
-------------------------------

Jacopo,

Thanks for looking at this.

I noticed with #2, if I run MRP once, and then approve the requirements which are created, then run the MRP again, it will create those same requirements again.   I think what you're saying is that it should not be doing this.

> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470848 ] 

Jacopo Cappellato commented on OFBIZ-652:
-----------------------------------------

Si,

#1: I agree with you about adding the new "proposed" status

#2: yes, approved requirements are actually considered as orders by the mrp ('created' and 'ordered' requirements are not).  I think this is a nice feature but I am really open to suggestions/improvements.

#3: hmmm... I will try to reproduce this in my system and let you know. thanks for the great (bug?) report, Si.



> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471044 ] 

Jacopo Cappellato commented on OFBIZ-652:
-----------------------------------------

About #2:
yes, it should not recreate the requirements. I will check also this one, thanks for reporting this.


> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato reassigned OFBIZ-652:
---------------------------------------

    Assignee: Jacopo Cappellato

> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Assigned To: Jacopo Cappellato
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato closed OFBIZ-652.
-----------------------------------

    Resolution: Fixed

The recent fixes to the MRP service should have addressed all these issues.


> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Assigned To: Jacopo Cappellato
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471644 ] 

Jacopo Cappellato commented on OFBIZ-652:
-----------------------------------------

Si,

about #2: is it possible that you have set the ProductFacility information for MAT_A and MAT_B in a facility different from the one in which you are running the MRP? In the first screenshot I cannot see the ProductFacility information for the two materials...



> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Assigned To: Jacopo Cappellato
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Si Chen updated OFBIZ-652:
--------------------------

    Attachment: mrp-proposed.png

This is what the MRP proposed.  Notice that both raw material products are there.

> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472545 ] 

Jacopo Cappellato commented on OFBIZ-652:
-----------------------------------------

Si,

after further tests it seems to me that #2 and #3 are working fine: my guess is that there are some problems in the setup of your warehouse information.
However I'll leave this issue open for #1 and also because I just did some quick tests and there are chances that I've missed the bug.


> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Assigned To: Jacopo Cappellato
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-652) MRP - 3 possible quirks/bugs?

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Si Chen updated OFBIZ-652:
--------------------------

    Attachment: requirements created.png

But these are the actual requirements created, and the raw materials are not here.

> MRP - 3 possible quirks/bugs?
> -----------------------------
>
>                 Key: OFBIZ-652
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-652
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: manufacturing
>            Reporter: Si Chen
>         Attachments: mrp-proposed.png, requirements created.png
>
>
> Running the MRP today I found a few possible bugs or quirks:
> 1.  If there are already Product Requirements in the created state from an order, such as for an item whose requirement enum id is "Always Create Requirement on every Sales Order", inventory event planning will crash because it will try to remove these requirements:
> 2007-01-24 09:54:21,545 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:465:INFO ] executeMrp called
> 2007-01-24 09:54:21,547 (http-0.0.0.0-8441-Processor2) [        MrpServices.java:83 :INFO ] initInventoryEventPlanned called
> 2007-01-24 09:54:21,850 (http-0.0.0.0-8441-Processor2) [   GenericDelegator.java:710:ERROR] 
> ---- exception report ----------------------------------------------------------
> Failure in removeByPrimaryKey operation for entity [Requirement]: org.ofbiz.entity.GenericDataSourceException: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException 
> Message: Exception while deleting the following entity: [GenericEntity:Requirement][requirementId,10001(java.lang.String)] (SQL Exception while executing the following:DELETE FROM public.REQUIREMENT WHERE REQUIREMENT_ID=? (ERROR: update or delete on "requirement" violates foreign key constraint "ordreq_cmt_req" on "order_requirement_commitment"
>   Detail: Key (requirement_id)=(10001) is still referenced from table "order_requirement_commitment".))
> ---- stack trace ---------------------------------------------------------------
> Not sure the best way to fix this.  The code suggests a different status for MRP-proposed requirements, and I'd agree with that.  Maybe we should have Proposed -> Approved for MRP requirements and Created -> Approved for order ones.
> 2.  It seems that if requirements are approved but not ordered, MRP will create more requirements.  Does the system do this?  Is this the right thing to do?
> 3.  It seems that raw materials are shown in the MRP proposal but no Requirements are created for them.  For example, I set the ProductFacility minimum stock threshhold to 0 for PROD_COST, the MRP proposed ordering both PROD_COST and its raw materials RAW_MAT_A and RAW_MAT_B but there were requirements created only for PROD_COST not RAW_MAT_A or RAW_MAT_B, though they did show up on the MRP report.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.