You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bob Morley <rm...@emforium.com> on 2008/12/02 18:13:44 UTC

Adding work effort to quote produces rendering error

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.


Re: Adding work effort to quote produces rendering error

Posted by Jacques Le Roux <ja...@les7arts.com>.
Strangely we have not this problem with ListWorkEffortOrderHeaders. Just scratching the surface for the moment though...

Jacques

From: "Bob Morley" <rm...@emforium.com>
> 
> 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.
>

Re: Adding work effort to quote produces rendering error

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <rm...@emforium.com>
>
> 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.
>