[Erp5-dev] broken Account_getGap* scripts

Bartek Gorny bartek at redpoint.mn.pl
Mon Jan 9 18:46:11 CET 2006


On 1/9/06, Jérôme Perrin <jerome at nexedi.com> wrote:
> Le Lundi 9 Janvier 2006 17:55, Bartek Gorny a écrit:
> > Hello
> >
> > Scripts Account_getGapItemList and Account_getGapId are broken because
> > of a change in behaviour of portal_preferences.
> >
> > The portal_preferences apparently used to acquire default properties
> > from default_site_preference (function
> > getPreferredAccountingTransactionGap returned value of
> > default_site_preference/preferred_accounting_transaction_gap). Now it
> > does not, and you have to explicitly call
> > portal_preferences.default_site_preference.getSomething, the result
> > being that scripts Account_getGapItemList and Account_getGapId return
> > nothing.
>
> Hello,
>
> portal_preference didn't change his behaviour, the only change that have been
> done is that now it uses the catalog to search preferences (searchFolder)
> instead of using contentValues.
> Please make sure that your portal_preference is correctly indexed in the
> catalog.

What I can say is that portal_preferences/default_site_preference is
in the catalog - can't see the details, however, since a click on a
cataloged object throws a "tuple index out of range" error.

Anyway, it doesn't say it can't find the value, or return None, it
just says "resource not found" when I call
portal_preferences/getPreferredAccountingTransactionGap, so the getter
is just not there.

BG

> Also, note that you if you have activated user level preferences, they have
> precedence over the default site preference, this is the default behaviour of
> preference tool, which is described in erp5.org
> http://www.erp5.org/workspaces/members/jerome/pub/portal_preferences/view
>
> --
> Jérome
>



More information about the Erp5-dev mailing list