Discussion:
[Erp5-dev] Problem with portal_selections tool
Shrenik Bhura
2005-08-12 08:39:45 UTC
Permalink
Hello,

On trying to access the portal_selections tool, we encounter this error
-

Request URL
http://localhost:9080/erp5_demo/portal_selections/manage_overview
Exception Type
ValueError
Exception Value
DTML file error: Check logfile for
details

Traceback (innermost last):


* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.Scripts.Bindings, line 306, in __call__
* Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
* Module App.special_dtml, line 180, in _exec

ValueError: DTML file error: Check logfile for details


and the log file has the following-
PROBLEM(100) ZPublisher DTML file
'/var/lib/zope/Products/ERP5Form/dtml/explainCategoryTool.dtml' could
not be read

I was trying to access the portal_selections tool to check-out the
selection parameters/keys for the accounting_selection when I
encountered this error.

I believe this is the right approach. The other way I found was to
change the default section category in ERP5Defaults.

Any correction in approach or alternate suggestions to fix this shall be
welcome.

Regards,
SB


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20050812/48eaae80/attachment.htm>
Jerome Perrin
2005-08-12 10:43:34 UTC
Permalink
Post by Shrenik Bhura
Hello,
On trying to access the portal_selections tool, we encounter this error
-
PROBLEM(100) ZPublisher DTML file
'/var/lib/zope/Products/ERP5Form/dtml/explainCategoryTool.dtml' could
not be read
Hello,

I've just commited some management screens for portal_selections in CVS. Now
you will be able to see what are your selection parameters from the ZMI.
Post by Shrenik Bhura
I was trying to access the portal_selections tool to check-out the
selection parameters/keys for the accounting_selection when I
encountered this error.
I believe this is the right approach. The other way I found was to
change the default section category in ERP5Defaults.
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.

Cheers,
--
J?r?me
Shrenik Bhura
2005-08-12 11:35:53 UTC
Permalink
Hi Jerome,
Post by Jerome Perrin
I've just commited some management screens for portal_selections in CVS. Now
you will be able to see what are your selection parameters from the ZMI.
Thanks for this.
Post by Jerome Perrin
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'.
or,
2. Add a property to the AccountingTransaction.py by the above name.
or,
3. i am crapping about something i don't know, so pls clarify. ;-)

Cheers,
SB

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20050812/0f7ecd5b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smiley-4.png
Type: image/png
Size: 822 bytes
Desc: not available
URL: <Loading Image...>
Shrenik Bhura
2005-08-12 11:58:40 UTC
Permalink
Hi Jerome,
Post by Jerome Perrin
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,
2. Add a property to the AccountingTransaction.py by the above name. - I
realise this may not be possible as there is no existing property sheet
for the same.
or,
3. i am crapping about something i don't know, so pls clarify. ;-)

Cheers,
SB

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20050812/4f92cfff/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smiley-4.png
Type: image/png
Size: 822 bytes
Desc: not available
URL: <Loading Image...>
Jerome Perrin
2005-08-12 12:11:30 UTC
Permalink
Post by Shrenik Bhura
Hi Jerome,
Post by Jerome Perrin
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.
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
Loading...