[Erp5-dev] own workflow state catalogged in own table, its translation - how to?
Jérome Perrin
jerome at nexedi.com
Fri Sep 12 14:23:14 CEST 2008
Le jeudi 11 septembre 2008 à 11:55 +0200, Łukasz Nowak a écrit :
> Hello,
>
> We are using our own workflow state - operation_state.
>
> I created my own table for this state in catalog: ventisopstate.
>
> Searching/sorting is working for this operation_state column. So far so
> good.
>
> But I wanted to be able to sort/search by this state translated title.
>
> So I've copy&pasted:
> * z_related_translated_validation_state
> => z_related_translated_operation_state
>
> * z_related_translated_validation_state_title =>
> z_related_translated_operation_state_title
>
> Modified both scripts, updated sql_catalog_related_keys.
Hello,
What did you add in sql_catalog_related_keys ?
My guess is that you should add ventisopstate table in the related key
definition, so that the query builder adds it in the FROM clause.
Maybe something like:
translated_operation_state_title
| ventisopstate/translation/translated_message/z_related_translated_operation_state_title
Jérome
> So columns using this state are automatically recognised as
> searchable/sortable.
>
> But invoking such simple script:
>
> return context.portal_catalog(
> portal_type='Production Order',
> translated_operation_state_title='Finished',
> )
>
> Gives me attached traceback.
>
> Ok - I understand, that no column is found in those tables, as there is
> no such column. But what else shall I do, to have my own table in this
> query? I've analysed catalog properties, but no property is looking good
> to configure this... Where can I read more about it (except code - I'll
> do it anyway if anything else fails...)
>
> Regards,
> Luke
>
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://mail.nexedi.com/mailman/listinfo/erp5-dev
More information about the Erp5-dev
mailing list