I am very new to Ofbiz -- while playing around I noticed that when I attempted to add work effort to a quote it would produce an error when it attempted to render the StatusItemDescription which is part of the QuoteWorkEffortView. It appears that he is attempting to find a resource bundle lookup based on the associated entity (StatusItem) and attempts to get the StatusId from the QuoteWorkEffortView (which fails).
My solution was to update applications/order/entitydef/entitymodel_view.xml and add the following line to the definition of QuoteWorkEffortView: <alias name="statusId" field="statusId" entity-alias="SI"/> This ensured that the QuoteWorkEffortView had the statusId column from the related StatusItem and all was good with the world. Having said this, I am not sure if this is the correct fix for the issue. The underlying code seems to be attempting to generate a resource bundle key based on the primary key values and when a primary key is coming form a member-entity in a view, it is attempting to get the value from the wrong value object (the QuoteWorkEffortView instead of the StatusItem). Can anyone shed any light on this / should I create a jira bug for it / is my solution actually the correct solution? |
Administrator
|
Strangely we have not this problem with ListWorkEffortOrderHeaders. Just scratching the surface for the moment though...
Jacques From: "Bob Morley" <[hidden email]> > > I am very new to Ofbiz -- while playing around I noticed that when I > attempted to add work effort to a quote it would produce an error when it > attempted to render the StatusItemDescription which is part of the > QuoteWorkEffortView. It appears that he is attempting to find a resource > bundle lookup based on the associated entity (StatusItem) and attempts to > get the StatusId from the QuoteWorkEffortView (which fails). > > My solution was to update applications/order/entitydef/entitymodel_view.xml > and add the following line to the definition of QuoteWorkEffortView: > > <alias name="statusId" field="statusId" entity-alias="SI"/> > > This ensured that the QuoteWorkEffortView had the statusId column from the > related StatusItem and all was good with the world. > > Having said this, I am not sure if this is the correct fix for the issue. > The underlying code seems to be attempting to generate a resource bundle key > based on the primary key values and when a primary key is coming form a > member-entity in a view, it is attempting to get the value from the wrong > value object (the QuoteWorkEffortView instead of the StatusItem). > > Can anyone shed any light on this / should I create a jira bug for it / is > my solution actually the correct solution? > -- > View this message in context: http://www.nabble.com/Adding-work-effort-to-quote-produces-rendering-error-tp20796058p20796058.html > Sent from the OFBiz - Dev mailing list archive at Nabble.com. > |
Administrator
|
In reply to this post by Bob Morley
Ha ! We have the relation
<relation type="one" rel-entity-name="StatusItem"> <key-map field-name="statusId"/> </relation> in the ListWorkEffortOrderHeaders view From: "Jacques Le Roux" <[hidden email]> > Strangely we have not this problem with ListWorkEffortOrderHeaders. Just scratching the surface for the moment though... > > Jacques > > From: "Bob Morley" <[hidden email]> >> >> I am very new to Ofbiz -- while playing around I noticed that when I >> attempted to add work effort to a quote it would produce an error when it >> attempted to render the StatusItemDescription which is part of the >> QuoteWorkEffortView. It appears that he is attempting to find a resource >> bundle lookup based on the associated entity (StatusItem) and attempts to >> get the StatusId from the QuoteWorkEffortView (which fails). >> >> My solution was to update applications/order/entitydef/entitymodel_view.xml >> and add the following line to the definition of QuoteWorkEffortView: >> >> <alias name="statusId" field="statusId" entity-alias="SI"/> >> >> This ensured that the QuoteWorkEffortView had the statusId column from the >> related StatusItem and all was good with the world. >> >> Having said this, I am not sure if this is the correct fix for the issue. The underlying code seems to be attempting to generate >> a resource bundle key >> based on the primary key values and when a primary key is coming form a >> member-entity in a view, it is attempting to get the value from the wrong >> value object (the QuoteWorkEffortView instead of the StatusItem). >> >> Can anyone shed any light on this / should I create a jira bug for it / is >> my solution actually the correct solution? >> -- >> View this message in context: http://www.nabble.com/Adding-work-effort-to-quote-produces-rendering-error-tp20796058p20796058.html >> Sent from the OFBiz - Dev mailing list archive at Nabble.com. >> |
Administrator
|
In reply to this post by Bob Morley
As it was almost the same I tried to use ListWorkEffortRequests by adding a request item to a workeffort but I got another type of
error (not related, at least so far I guess so). So I will have a look at this one 1st.... Then hopefully I will see if it works there or if we should take care of both or even others of the same type... No needs to say that any help is welcome ;o) Jacques From: "Bob Morley" <[hidden email]> > > I am very new to Ofbiz -- while playing around I noticed that when I > attempted to add work effort to a quote it would produce an error when it > attempted to render the StatusItemDescription which is part of the > QuoteWorkEffortView. It appears that he is attempting to find a resource > bundle lookup based on the associated entity (StatusItem) and attempts to > get the StatusId from the QuoteWorkEffortView (which fails). > > My solution was to update applications/order/entitydef/entitymodel_view.xml > and add the following line to the definition of QuoteWorkEffortView: > > <alias name="statusId" field="statusId" entity-alias="SI"/> > > This ensured that the QuoteWorkEffortView had the statusId column from the > related StatusItem and all was good with the world. > > Having said this, I am not sure if this is the correct fix for the issue. > The underlying code seems to be attempting to generate a resource bundle key > based on the primary key values and when a primary key is coming form a > member-entity in a view, it is attempting to get the value from the wrong > value object (the QuoteWorkEffortView instead of the StatusItem). > > Can anyone shed any light on this / should I create a jira bug for it / is > my solution actually the correct solution? > -- > View this message in context: http://www.nabble.com/Adding-work-effort-to-quote-produces-rendering-error-tp20796058p20796058.html > Sent from the OFBiz - Dev mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |