Author: hansbak
Date: Mon Oct 3 09:09:42 2011 New Revision: 1178353 URL: http://svn.apache.org/viewvc?rev=1178353&view=rev Log: add the function create order from invitation using the info from the invitation for the order. contribution from Bird Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckInits.groovy ofbiz/trunk/applications/party/config/PartyUiLabels.xml ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationScreens.xml Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckInits.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckInits.groovy?rev=1178353&r1=1178352&r2=1178353&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckInits.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckInits.groovy Mon Oct 3 09:09:42 2011 @@ -24,6 +24,7 @@ import org.ofbiz.entity.util.*; import org.ofbiz.base.util.*; import org.ofbiz.order.shoppingcart.*; import org.ofbiz.party.party.PartyWorker; +import org.ofbiz.party.contact.ContactHelper; import org.ofbiz.product.catalog.CatalogWorker; import org.ofbiz.product.store.ProductStoreWorker; import org.ofbiz.order.shoppingcart.product.ProductDisplayWorker; @@ -50,3 +51,15 @@ context.suppliers = suppliers; organizations = delegator.findByAnd("PartyRole", [roleTypeId : "INTERNAL_ORGANIZATIO"]); context.organizations = organizations; + +// Set Shipping From the Party +partyId = null; +partyId = parameters.partyId; +if (partyId) { + party = delegator.findByPrimaryKey("Person", [partyId : partyId]); + contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false)); + if (contactMech) { + ShoppingCart shoppingCart = ShoppingCartEvents.getCartObject(request); + shoppingCart.setShippingContactMechId(contactMech.contactMechId); + } +} \ No newline at end of file Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=1178353&r1=1178352&r2=1178353&view=diff ============================================================================== --- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original) +++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Mon Oct 3 09:09:42 2011 @@ -6186,6 +6186,18 @@ <value xml:lang="zh">æ°å»ºä¼åé请</value> <value xml:lang="zh_TW">æ°å»ºæå¡éè«</value> </property> + <property key="PartyInvitationNewOrder"> + <value xml:lang="de">Erstellen Sie einen Auftrag von der Einladung</value> + <value xml:lang="en">Create An Order From Invitation</value> + <value xml:lang="es">Crear una orden de Invitación</value> + <value xml:lang="fr">Créer un ordre de l'invitation</value> + <value xml:lang="it">Creare un ordine da invito</value> + <value xml:lang="nl">Maak een Order van de Uitnodiging</value> + <value xml:lang="pt_BR">Criar uma ordem de Convite</value> + <value xml:lang="th">สรà¹à¸²à¸à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸à¸²à¸à¸à¸³à¹à¸à¸´à¸</value> + <value xml:lang="zh">åµå»ºçéè«ç§©åº</value> + <value xml:lang="zh_TW">å建çé请秩åº</value> + </property> <property key="PartyInvitationNotValidError"> <value xml:lang="de">Dies ist keine gültige Akteur Einladung</value> <value xml:lang="en">This is not a valid Party Invitation</value> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationScreens.xml?rev=1178353&r1=1178352&r2=1178353&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationScreens.xml Mon Oct 3 09:09:42 2011 @@ -54,7 +54,10 @@ under the License. <not><if-empty field="partyInvitation"/></not> </condition> <widgets> - <container style="button-bar"><link target="editPartyInvitation" text="${uiLabelMap.PartyInvitationNewPartyInvitation}" style="buttontext create"/></container> + <container style="button-bar"> + <link target="editPartyInvitation" text="${uiLabelMap.PartyInvitationNewPartyInvitation}" style="buttontext create"/> + <link target="/ordermgr/control/orderentry?partyId=${partyInvitation.partyIdFrom}" text="${uiLabelMap.PartyInvitationNewOrder}" style="buttontext create" url-mode="inter-app"/> + </container> <container style="button-bar"><label style="h1">${uiLabelMap[titleProperty]}</label><label style="h2"> ${uiLabelMap.CommonFor} "${partyInvitation.partyIdFrom}" [${partyInvitationId}]</label></container> </widgets> </section> |
Free forum by Nabble | Edit this page |