Sorry, I realized that my description below seems to indicate that Jacopo's service
getManufacturingComponents has an error. That isn't true.
I meant Financials module's LedgerServices::postRawMaterialIssuancesToGl() bombs, not the service
getManufacturingComponents. The postRawMaterialIssuancesToGl() function calls
UtilCOGS::getProductAverageCost().
It's not a problem with service getManufacturingComponents, or with calculateProductCosts. The
point of failure in Financials module's UtilCOGS::getProductAverageCost() is due to the fact that
the calculated cost is zero. Why zero? Because ETH_BRAND has no BOM components! (Jacopo has told
me that the service calculateProductCosts CAN return value of zero, not a bug there.)
If it's not too much trouble, could somebody enlighten me on the actual processes that goes on
inside service calculateProductCosts? It's called with parameters productId, currencyUomId,
costComponentTypePrefix, and userLogin. Specifically, I'd like to know exactly which numbers the
service will add up. Does it have to look into the product's BOM components? If there's a way for
the service to return a non-zero value, we can work around Financials module's
UtilCOGS::getProductAverageCost(). Does the service look at standard prices/costs for the product?
I'll ask on OpenTaps forums about resolving this issue.
Jonathon
Jonathon -- Improov wrote:
David,
Yes, if you're having problems the _first_ thing you should do is try
it with the latest OFBiz from SVN, and without the OSS financials or
crmsfa modules in place.
OFBiz works. Yes, you're right (Jacopo too) that this has something to
do with OpenTaps' financial module. Nothing in the docs yet. Si Chen
said on the financial forums that configuration instructions are in
"Users Manual...Financials, Managing Inventory document". There's a
UserDocs.htm and TechnicalDocs.htm in /hot-deploy/financial/docs, but
they don't contain a section on "Managing Inventory".
It all comes down to 2 paths taken by financial module upon issuance of
component in Job Shop (after starting routing task), taken by
UtilsCOGS::getProductAverageCost(). The entity "ProductAverageCost" will
be searched first, failing which the product module service
"calculateProductCosts" will be called, which in turn gets to BOM
service "getManufacturingComponents". That's where it bombs, because
ETH_BRAND has no BOM components.
The only place where records for entity ProductAverageCost is ever
created is in financial module service
"financials.ImportProductInventory". I can't see where this service is
evered invoked.
Well, results are out. I'm left with few(er) options. I can try to buy
Si Chen lunch or flowers or something, or I'll have to dig through the
financials docs again (or hire a psychic to help?). The only answer to a
similar "unable to find a product average cost" error posted to the
financial forums yielded a 1-liner answer: look through docs. I
think/hope that means few people have had the same problem and that it's
really a non-problem.
Si Chen just kinda complained that I was being not humble in the mailing
list. So, I'd like to publicly apologize to Si Chen. I have no time to
space out messages that goes like "OpenTaps does not have this, or
that", only time enough to speak the facts quickly to seek help. Sorry!
I'll certainly carefully and correctly segregate my posts between OFBiz
list and OpenTaps list.
That's it. This thread is resolved.
Jonathon