Receipt of multiple units of serialized inventory error
------------------------------------------------------- Key: OFBIZ-318 URL: http://issues.apache.org/jira/browse/OFBIZ-318 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: product Reporter: Chris Howe When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=all ]
Chris Howe updated OFBIZ-318: ----------------------------- Attachment: serialized.patch serialized.patch Allows for receipt of multiple units of serialized inventory. If serialized, loops through the serialized product and creates one inventory item and one shipment receipt for one item for each unit received > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435293 ]
Jacopo Cappellato commented on OFBIZ-318: ----------------------------------------- Hi Chris, I had a very quick look at your patch and it looks interesting; here are a few comments/questions: 1) could you please explain the goal of the serializedQuantityCorrection service? wasn't it possible to pass a quantityAccepted = 1 (for serialized inventory) in the loop in the "receiveProducts" service? 2) there are a lot of tabs in your patch; please try to always use 4-spaces instead. Thanks > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435294 ]
Chris Howe commented on OFBIZ-318: ---------------------------------- 1) I'm not 100% familiar with all of the features of minilang buts because it calls a service that doesn't contain that attribute and that service in turn calls a group, I couldn't get quantityAccepted into the context for the group as opposed to the service context. If you can show me an example, I'd be more than happy to correct it an resend the patch. 2) sorry about the tabs, created a new Eclipse workspace for this project and forgot to set that. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435304 ]
Chris Howe commented on OFBIZ-318: ---------------------------------- I forgot to set the service fields when it's not Serialized. I will submit that patch when someone confirms whether I can send the quantityAccepted attribute to the general context instead of the service context > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435307 ]
Jacopo Cappellato commented on OFBIZ-318: ----------------------------------------- I don't think that there is an easy way of doing so (in a clean way) because of the way things are implemented... and my guess is that this is one of the reasons because the serialized inventory receives are not implemented right now. The main issue (I think) is the presence of the service group: <group name="receiveInventoryProduct" send-mode="all"> <service name="prepareInventoryReceipt" mode="sync" result-to-context="true"/> <service name="createInventoryItem" mode="sync" result-to-context="true"/> <service name="createInventoryItemDetail" mode="sync" result-to-context="true"/> <service name="createShipmentReceipt" mode="sync"/> <service name="balanceInventoryItems" mode="sync"/> </group> In order to support serialized inventory creation, we should call this service multiple times... This service is also responsible for the bad error messages handling in the receive inventory screen: we have currently some problems displaying the error returned by one of the services in the group. This is what I propose: what about transforming the above service group into a new standard service (with the same name etc...) that simply calls all the services in the group definition? In this way it will be easier to implement serialized inventory receipts in a clean way and also to return nice error messages if something goes wrong. What do you all think of this? > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435309 ]
Chris Howe commented on OFBIZ-318: ---------------------------------- IMO aside from the error handling, the group service is cleaner because it will take the from the global context instead of from the service context. (ie for the service you're describing you need all of the attributes for prepareInventoryReceipt, createInventoryItem, createInventoryItemDetail, createShipmentReceipt, balanceInventoryItems declared, which gets kind of messy itself) My local utilization differs from what looks to be the progress of the community's implementation regarding the rental of fixed assets whose stock is routinely increased. I'm needing to benefit from the global context since I'm calling services with attributes that aren't being passed into the original service, but are rather in the global context for my additional services. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=all ]
Chris Howe updated OFBIZ-318: ----------------------------- Attachment: serialized2.patch serialized2.patch fixes the tabs to spaces from serialized.patch gets rid of the correction service by simply adding the quantityAccepted attribute to the service being called, optional of course. allows the service to run when it's non-serialized as well > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435321 ]
Jacopo Cappellato commented on OFBIZ-318: ----------------------------------------- Hi Chris, yes this second patch looks really better than the first one. I think that what you have implemented is very close to what I was suggesting: if I'm reading correctly your code, instead of transforming the "receiveInventoryProduct" service-group into a standard service you have created a new one ("receiveProducts") with all the required (by the services in the service group) input parameters in its service definition (that can handle the serialized inventory) that calls the service-group... I've still not tested the patch but I think it is a really good thing to have in svn. I'd like to hear the opinions from others but I think that as soon as I'll have a chance to test it I will commit it. In the mentime, thanks for your work Chris. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435323 ]
Chris Howe commented on OFBIZ-318: ---------------------------------- It technically doesn't pass all of the attributes of the ensuing services. It's only passing the attributes that come from the form on the RecieveInventory uri. I'm not positive the consequence/need of this. I'm getting the result that I need, but I'm not positive that it's giving the generic result that it was without the looping. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=comments#action_12435628 ]
David E. Jones commented on OFBIZ-318: -------------------------------------- In general this sort of use of service groups is a bad practice. They were not designed for this sort of thing, but I think Andy got on a kick trying this out with stuff he was working on after he realized it was possible. There are a few flaws to this approach. I'm all for keeping things simple, but not too simple, that just leads to more problems than it solves. In general the tools and best practices in the OFBiz framework are designed to make maintenance and customization as easy possible, with the second priority being making implementation as quick and easy as possible. Given those priorities it may take a couple minutes more to call a set of services from a simple-method instead of using a service group to implement a service, but it is a lot less flexible and ultimately leads to less than ideal work arounds. Chris: your solution to this of wrapping the service group in another service is the way to go if you're trying to avoid redoing the service group. In this case though I think the service group is crying to be tossed and re-implemented as a simple-method. The nice thing is that you can do all of the parameter mapping and extension you want now and in the future without having to re-implement anything, and making the switch is also fairly trivial. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=all ]
Jacopo Cappellato reassigned OFBIZ-318: --------------------------------------- Assignee: Jacopo Cappellato > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Assigned To: Jacopo Cappellato > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-318?page=all ]
Jacopo Cappellato closed OFBIZ-318. ----------------------------------- Resolution: Fixed This is now implemented in rev. 469879 by refactoring the receiveInventoryProduct from group service to minilang. See the commit logs for details. > Receipt of multiple units of serialized inventory error > ------------------------------------------------------- > > Key: OFBIZ-318 > URL: http://issues.apache.org/jira/browse/OFBIZ-318 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Reporter: Chris Howe > Assigned To: Jacopo Cappellato > Attachments: serialized.patch, serialized2.patch > > > When receiving multiple units of serialized inventory, only a single inventory item is created and the shipment is considered received because the shipment accepts all units. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |