[Erp5-dev] how to really hide some allowed portal types

Yoshinori Okuji yo at nexedi.com
Wed Nov 28 21:54:28 CET 2007


On Wednesday 28 November 2007 11:37, Mikolaj Antoszkiewicz wrote:
> Yoshinori Okuji wrote:
> > On Tuesday 27 November 2007 15:46, Mikolaj Antoszkiewicz wrote:
> >> Is there a way of modifying the stock Allowed Portal Types list without
> >> using Hidden Portal Types and modifying stock BusinessTemplate?
> >>
> >> Or the other way, is there a 'proper' way of stopping 'New' icon on the
> >> module form (Folder_create()) from creating random object from Allowed
> >> Portal Types list, even though it is hidden?
> >
> > You can fix the tales expression in the page template, so that when no
> > portal type is allowed, no new icon is shown.
> >
> > YO
>
> That's a good idea. Although I'm in a situation where I have 2 out of 5
> portal types hidden, and when I click the new icon the hidden type gets
> created.

This sounds like a bug.

> Is there any other way besides patching or overwriting Folder_create()
> method?

I think Folder_create should use only visible portal types, because this 
script is used from the UI, and it doesn't make sense to create a hidden 
portal type implicitly.

In short: please send a patch to fix Folder_create. :)

YO
-- 
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org



More information about the Erp5-dev mailing list