[ 
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.

Reply via email to