Posted by
Si Chen-2 on
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Users-Automatic-Purchasing-tp136301p136306.html
Christopher Farley wrote:
>Si Chen (
[hidden email]) wrote:
>
>
>
>>>I could use requirements, but I would need to make the following
>>>enhancements to OFBiz:
>>>
>>>1. Create a screen to automatically generate requirements from
>>> current inventory values: for each item with an ATP less than the
>>> minumumQuantity, create a new requirement. The quantity of this
>>> requirement is reorderQuantity - ATP. This screen should allow
>>> the user to limit automatic requirement generation by
>>> supplier, product SKU range, product category, etc.
>>>
>>>
>>>
>>>
>>>
>>This is already done automatically when you set the requirement enum for
>>your products, so you can re-use those services on your screen. This
>>shouldn't be too hard.
>>
>>
>
>I have implemented the above, with the exception of a few cosmetic
>finishing touches. The user selects a facility from a drop down menu,
>clicks a button labelled "Generate Requirements", and a minilang script
>creates a requirement for each item at the facility. In the future I would
>like the option to limit generated requirements by a supplier.
>
>I have a few questions/issues:
>
>1. Should the Requirement Type Id for the generated requirements be
> PRODUCT_REQUIREMENT, or should I create a new Requirement Type
> Id called, say, AUTO_REQUIREMENT? Creating a new Requirement
> Type Id will allow the user to more easily sort through the
> automatically generated requirements as opposed to product
>
> requirements created via sales orders, etc.
>
>
Yes, but creating an existing type would allow you to reuse existing
services that handle it, which is what I personally think would be
better? But I'm open to an alternative - what does everybody else think?
There is already a service called "createRequirementFromItemATP" Did
you see this?
>2. Where should this screen go? Right now I added a button labelled "Generate
> Requirements" on the ordermgr's FindRequirements screen (to the right
> of the "New Requirement" button.
>
>
>
That sounds like a good idea.
>3. If you have a lot of products at a facility, the script can take a few
> minutes to run. The default transaction timeout causes an error. I am
> still working on a suitable resolution to this...
>
>
>
Set the transaction-timout (yes, that's how it's spelled) in your
services xml definition to something longer (the default is 60 for 60
seconds.)
>4. Just to confirm terminology: my script calcs requirement quantity like
> this:
> requirementQuantity = reorderQuantity - availableToPromiseQuantity
> Am I interpreting "reorderQuantity" properly? Or is "reorderQuantity"
> meant to be a fixed quantity that is ordered each time you order?
>
>
>
If you're using createRequirementFromItemATP, it should already have a
formula for doing that. reorderQuantity means the fixed quantity to be
ordered each time.
>5. Once I'm ready to submit a patch for review, would I open an account
> on Jira and submit it there?
>
>
Yes. That would be the best way.
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users