[ 
https://issues.apache.org/jira/browse/OFBIZ-5761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux updated OFBIZ-5761:
-----------------------------------
    Attachment: OFBIZ-5761 - OISG Management.patch
                OFBIZ-5761 - OISG Management.patch.change

I exchanged with Pierre who confirmed that
* editOrderItemShipGroup
* updateOrderItemShipGroupFromContext and
* validateOrderItemShipGroupAssoc 
should be only private methods, that's done in the new "OFBIZ-5761 - OISG 
Management.patch "

>From the 1st patch, I made a number of other changes (you can view them in 
>below order in "OFBIZ-5761 - OISG Management.patch.change")
# formatting and simple not functional code refactoring 
# fixed minor issues (like resourceCommon missing)
# used the 1st existing ship group rather than the last when creating a new one 
(prevent no creation and useless error message when creating more than one 
successively)
# removed all related with OISG.statusId field which does not exist in OFBiz 
OOTB but might have existed in previous Neogia implementation (no longer since 
Neogia is now based on OFBiz relases), including OrderServices.isUpdateAllow() 
method
# removed a dead code block introduced with the comment "//if lastOISGAssoc is 
null then get the last one from the list of OISGAssoc"
# removed the ITEM_PROCESS_PREP and ITEM_PROCESS_RECI status. They don't exist 
in OFBiz OOTB but might have existed in previous Neogia implementation (found 
after creating "OFBIZ-5761 - OISG Management.patch.change" so still in there)

  Something I forgot to report before (was already in previous patch):  the 
block beginning with comment "// shouldn't be gaps in it but allow for that 
just in case" in ShoppingCartServices.loadCartFromOrder() method has been 
commented out

 I let the 2 buttons for OISG creation (in English the new one is labelled "Add 
a new order item ship group", old one "Create New Ship Group", in French both 
are labelled "Créer un nouveau groupe d'expédition" ). They respectively call 
new AddOrderItemShipGroup and existing createOrderItemShipGroup services. I 
believe the new AddOrderItemShipGroup service is better because it feeds more 
default information (like the postal address at least) from 1st existing ship 
group, this is a moot point. Obviously only 1 of these buttons must stay. We 
need to clarify this before committing and pick the preferred service. 
 
Of course, like before these changes, all tests pass.

Nicolas (Malin) kindly offered to review, I add him as watcher

> Allow to edit ship groups contents after and order has been created
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-5761
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5761
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: order
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-5761 - OISG Management.patch, OFBIZ-5761 - OISG 
> Management.patch, OFBIZ-5761 - OISG Management.patch.change
>
>
> Currently you can only move order items between ship groups while you create 
> an order. I needed to do it after order creation. When I met Olivier (Heintz) 
> at the RMLL 2014 in July, I found the Neogia team has developed a such 
> feature and had it as an addon (named oisg-management) for R12.04. Then 
> exchanging with Nicolas (Malin), and Pierre (Gaudin) I decided to give it a 
> go. I will quickly explain the following history, for the Neogia team to know 
> the current situation and what has changed. 
> After updating the code to work with current trunk (instead of R12.04) I 
> found it was working well but some minor issues. I then exchanged with Leila 
> (Mekika) from the Neogia team and we could quickly fix the minor issues:
> * text harcoded, no labels. I began to fix them, thanks to Leila who 
> completed the major part and explained me some tricks about the 
> oisg-management addon.
> * A redundant button associated with the new addOrderItemShipGroup service.  
> I removed it because the current button calls createOrderItemShipGroup which 
> is enough. We could BTW consider using addOrderItemShipGroup instead. It's 
> more complete (see below for instance) but that"s rather a matter of taste.
> There was a mechanism to merge sales taxes to get them grouped by ship groups 
> in order adjustments. I removed it because this can be done dynamically (see 
> invoice.pdf) and it was removing the shipGroupSeqId from the order 
> adjustments.
> I sorted (DESC) the OrderItemShipGroup in addOrderItemShipGroup in order to 
> use the 1st ship group when copying shipmentMethodTypeId, carrierPartyId, 
> carrierRoleTypeId, contactMechId when shipmentMethodTypeId and carrierPartyId 
> are not passed to the service.
> I later fixed a bug I found in loadCartForUpdate service when removing the 
> adjustments. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to