[Erp5-dev] Problem with portal_selections tool
Jerome Perrin
jerome at nexedi.com
Fri Aug 12 14:11:30 CEST 2005
On Fri, Aug 12, 2005 at 05:28:40PM +0530, Shrenik Bhura wrote:
> Hi Jerome,
>
> > In the current implementation of ERP5Defaults, (we also sometimes call them
> > PortalMethods), you can 'dynamically' override these parameters by setting
> > properties on the portal (using the ZMI), no need to modify the code for this.
> > Looking at the code of ERP5Site.py, we can see that to override
> > getPortalDefaultSectionCategory(), you can set a property named
> > portal_default_section_category on the site.
>
> Does this mean that:
> 1. We have to add a string property from the portal_type tool for the
> Accounting Transaction portal type by the name -
> portal_default_section_category and set it's value to whatever we
> desire, like 'group/xyz'.
> This is not happening as whenever I click on the 'Add' button after
> filling in the property name, etc it does not add anything and gives an
> authentication failure even though I am logged in with manager account.
> or,
Not exactly, for now if you want to override a portal configuration, you have
to add the property directly on the site instance using the ZMI. You add a
string property, but not from the portal_types tool, but directly on the portal
object (ie. the ERP5 Site itself). Looking at the URL in your previous mail,
in your configuration, it should be :
http://localhost/9480/erp5_demo/manage_propertiesForm
In this screen you add new a string property called
'portal_default_section_category', with value 'group/xyz'. The method
getPortalDefaultSectionCategory() will now return 'group/xyz'.
Then if you want to use this for accounting, make sure that the category
group/xyz exists in portal_categories and that your Organisation (in
organisation module) belongs to that group.
Note that these days we are working on a (much) more easyier way to set this
kind of configurations, adding user profiles / user preferences concept in
ERP5.
--
Jérôme
More information about the Erp5-dev
mailing list