Re: [OFBiz] Users - Automatic Purchasing

Posted by Si Chen-2 on
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Users-Automatic-Purchasing-tp136301p136308.html

Christopher,

It's great what you're doing, but I think it might be better to try to
modify or extend createRequirementFromItemATP rather than add another
service that does something so similar.  The reason is because OFBiz is
already huge (1300+ services), and it would be nice to keep it as
manageable as possible by reusing the existing logic.

I'm looking at your issues with the existing service, and I think the
requirement for seqGroupSeqId and orderItemSeqId are related to it
needing to link the requirement to orders.  We can probably change the
code to make it so that if these are not available, it just won't link
them to orders, so they become optional.

You maybe right about needing a separate requirement type, then.  I see
what you want: bulk generate rather than one at a time when each sale is
created.  Still there should be a lot of code in that existing service
which you can reuse, either by isolating it or by modifying the original?

Si

Christopher Farley wrote:

>Si Chen ([hidden email]) wrote:
>
>  
>
>>There is already a service called "createRequirementFromItemATP"  Did
>>you see this?
>>    
>>
>
>I didn't use this because it:
> - requires a seqGroupSeqId and an  orderItemSeqId (none required for my
>   autoGenerate method)
>
> - requires that the product is configured with a requirementMethodId of
>   PRODRQM_STOCK_ATP. I don't want to configure my products that way,
>   because I don't want requirements being generated after each sales
>   order. (If this seems strange, I could tell you my reasons...)
>   I would prefer that requirements are generated for all products
>   (regardless of requirementMethodId) at the moment my purchasing
>   manager clicks on the "Generate Requirements" button.
>
>This, I think, adds some justfication for adding a new requirementTypeId.
>These requirements are not linked to specific orders, and you might want
>to keep them separate from ordinary PRODUCT_REQUIREMENTs so you can
>approve, reject or delete them en masse.
>
>  
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users