This breaks the sendReturnCompleteNotification service.
---- exception report ---------------------------------------------------------- Async-Service failed. Exception: org.ofbiz.service.GenericServiceException Message: Could not commit transaction for service [sendReturnCompleteNotification] call: Roll back error, could not commit transaction, was rolled back instead because of: Error rendering screen [component://order/widget/ordermgr/OrderPrintScreens.xml#CompanyLogo]: groovy.lang.MissingPropertyException: No such property: request for class: CompanyHeadergroovy.lang.MissingPropertyException: No such property: request for class: CompanyHeader (No such property: request for class: CompanyHeader) ---- stack trace --------------------------------------------------------------- org.ofbiz.service.GenericServiceException: Could not commit transaction for service [sendReturnCompleteNotification] call: Roll back error, could not commit transaction, was rolled back instead because of: Error rendering screen [component://order/widget/ordermgr/OrderPrintScreens.xml#CompanyLogo]: groovy.lang.MissingPropertyException: No such property: request for class: CompanyHeadergroovy.lang.MissingPropertyException: No such property: request for class: CompanyHeader (No such property: request for class: CompanyHeader) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:561) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:226) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:163) org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:71) org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:242) java.lang.Thread.run(Thread.java:680) -------------------------------------------------------------------------------- On Nov 9, 2011, at 5:11 AM, [hidden email] wrote: > Author: hansbak > Date: Wed Nov 9 10:11:24 2011 > New Revision: 1199682 > > URL: http://svn.apache.org/viewvc?rev=1199682&view=rev > Log: > on invoice and orderheader, show logo properly either from party content or party info > > Modified: > ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy > > Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1199682&r1=1199681&r2=1199682&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original) > +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Wed Nov 9 10:11:24 2011 > @@ -27,6 +27,7 @@ import org.ofbiz.entity.util.*; > import org.ofbiz.party.contact.*; > import org.ofbiz.order.order.OrderReadHelper; > import java.sql.Timestamp; > +import org.ofbiz.party.content.PartyContentWrapper; > > orderHeader = parameters.orderHeader; > orderId = parameters.orderId; > @@ -118,8 +119,17 @@ if (!partyId) { > > // the logo > partyGroup = delegator.findByPrimaryKey("PartyGroup", [partyId : partyId]); > -if (partyGroup?.logoImageUrl) { > - logoImageUrl = partyGroup.logoImageUrl; > +if (partyGroup) { > + partyContentWrapper = new PartyContentWrapper(partyGroup, request); > + partyContent = partyContentWrapper.getFirstPartyContentByType(partyGroup.partyId , partyGroup, "LGOIMGURL", delegator); > + if (partyContent) { > + logoImageUrl = "/content/control/stream?contentId="+partyContent.contentId; > + } > +} > +if(logoImageUrl == null){ > + if (partyGroup?.logoImageUrl) { > + logoImageUrl = partyGroup.logoImageUrl; > + } > } > context.logoImageUrl = logoImageUrl; > > > |
Corrected in r1201631
thank you for reporting! Regards, Hans On 11/13/2011 06:51 AM, J. Eckard wrote: > This breaks the sendReturnCompleteNotification service. > > > ---- exception report ---------------------------------------------------------- > Async-Service failed. > Exception: org.ofbiz.service.GenericServiceException > Message: Could not commit transaction for service [sendReturnCompleteNotification] call: Roll back error, could not commit transaction, was rolled back instead because of: Error rendering screen [component://order/widget/ordermgr/OrderPrintScreens.xml#CompanyLogo]: groovy.lang.MissingPropertyException: No such property: request for class: CompanyHeadergroovy.lang.MissingPropertyException: No such property: request for class: CompanyHeader (No such property: request for class: CompanyHeader) > ---- stack trace --------------------------------------------------------------- > org.ofbiz.service.GenericServiceException: Could not commit transaction for service [sendReturnCompleteNotification] call: Roll back error, could not commit transaction, was rolled back instead because of: Error rendering screen [component://order/widget/ordermgr/OrderPrintScreens.xml#CompanyLogo]: groovy.lang.MissingPropertyException: No such property: request for class: CompanyHeadergroovy.lang.MissingPropertyException: No such property: request for class: CompanyHeader (No such property: request for class: CompanyHeader) > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:561) > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:226) > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:163) > org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:71) > org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:242) > java.lang.Thread.run(Thread.java:680) > -------------------------------------------------------------------------------- > > > On Nov 9, 2011, at 5:11 AM, [hidden email] wrote: > >> Author: hansbak >> Date: Wed Nov 9 10:11:24 2011 >> New Revision: 1199682 >> >> URL: http://svn.apache.org/viewvc?rev=1199682&view=rev >> Log: >> on invoice and orderheader, show logo properly either from party content or party info >> >> Modified: >> ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy >> >> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1199682&r1=1199681&r2=1199682&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original) >> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Wed Nov 9 10:11:24 2011 >> @@ -27,6 +27,7 @@ import org.ofbiz.entity.util.*; >> import org.ofbiz.party.contact.*; >> import org.ofbiz.order.order.OrderReadHelper; >> import java.sql.Timestamp; >> +import org.ofbiz.party.content.PartyContentWrapper; >> >> orderHeader = parameters.orderHeader; >> orderId = parameters.orderId; >> @@ -118,8 +119,17 @@ if (!partyId) { >> >> // the logo >> partyGroup = delegator.findByPrimaryKey("PartyGroup", [partyId : partyId]); >> -if (partyGroup?.logoImageUrl) { >> - logoImageUrl = partyGroup.logoImageUrl; >> +if (partyGroup) { >> + partyContentWrapper = new PartyContentWrapper(partyGroup, request); >> + partyContent = partyContentWrapper.getFirstPartyContentByType(partyGroup.partyId , partyGroup, "LGOIMGURL", delegator); >> + if (partyContent) { >> + logoImageUrl = "/content/control/stream?contentId="+partyContent.contentId; >> + } >> +} >> +if(logoImageUrl == null){ >> + if (partyGroup?.logoImageUrl) { >> + logoImageUrl = partyGroup.logoImageUrl; >> + } >> } >> context.logoImageUrl = logoImageUrl; >> >> >> |
Free forum by Nabble | Edit this page |