Discussion:
[Erp5-dev] Allowed Content Types in a module
Chetan Kumar
2009-08-24 03:27:14 UTC
Permalink
Hi
I created a module (mydoc_module) with the following parameters

Module ID: mydoc_module
Module Portal Type: Mydoc Module
Module Title: Mydocs
Object Portal Type: Mydoc
Object Title: Mydoc
Portal Skins Folder: mydoc_module

Following all the instructions for creating a new module, I see that the
Mydoc portal_type is not allowed to be added to the mydoc_module
although the settings are correct. It gives the error "You are not
allowed to add new content in this context."
However, if I check other already existing portal_types (like File,
Document, Order, Person etc.) these can be added.
In an script I used to test the setting
portal.person_module.getVisibleAllowedContentTypeList() shows ['Person']
portal.organisation_module.getVisibleAllowedContentTypeList() shows
['Organisaion']
as expected and
portal.mydoc_module.getVisibleAllowedContentTypeList() shows []

In case I allow other content types to be added to my_module I see
['Person', 'Organisation', 'Order'] etc but no 'Mydoc'

Regards,
Chetan
Chetan Kumar
2009-09-07 11:35:28 UTC
Permalink
Hello all
I wanted to find out if some help is possible on this.
Regards,
Chetan
Post by Chetan Kumar
Hi
I created a module (mydoc_module) with the following parameters
Module ID: mydoc_module
Module Portal Type: Mydoc Module
Module Title: Mydocs
Object Portal Type: Mydoc
Object Title: Mydoc
Portal Skins Folder: mydoc_module
Following all the instructions for creating a new module, I see that the
Mydoc portal_type is not allowed to be added to the mydoc_module
although the settings are correct. It gives the error "You are not
allowed to add new content in this context."
However, if I check other already existing portal_types (like File,
Document, Order, Person etc.) these can be added.
In an script I used to test the setting
portal.person_module.getVisibleAllowedContentTypeList() shows ['Person']
portal.organisation_module.getVisibleAllowedContentTypeList() shows
['Organisaion']
as expected and
portal.mydoc_module.getVisibleAllowedContentTypeList() shows []
In case I allow other content types to be added to my_module I see
['Person', 'Organisation', 'Order'] etc but no 'Mydoc'
Regards,
Chetan
Łukasz Nowak
2009-09-07 16:00:18 UTC
Permalink
Hello,

Does create module dialog run without any error?

Is Mydoc portal type available?

Is it possible to manually add Mydoc portal type to Mydoc Module portal
type?

Regards,
Luke
Post by Chetan Kumar
Hello all
I wanted to find out if some help is possible on this.
Regards,
Chetan
Post by Chetan Kumar
Hi
I created a module (mydoc_module) with the following parameters
Module ID: mydoc_module
Module Portal Type: Mydoc Module
Module Title: Mydocs
Object Portal Type: Mydoc
Object Title: Mydoc
Portal Skins Folder: mydoc_module
Following all the instructions for creating a new module, I see that the
Mydoc portal_type is not allowed to be added to the mydoc_module
although the settings are correct. It gives the error "You are not
allowed to add new content in this context."
However, if I check other already existing portal_types (like File,
Document, Order, Person etc.) these can be added.
In an script I used to test the setting
portal.person_module.getVisibleAllowedContentTypeList() shows ['Person']
portal.organisation_module.getVisibleAllowedContentTypeList() shows
['Organisaion']
as expected and
portal.mydoc_module.getVisibleAllowedContentTypeList() shows []
In case I allow other content types to be added to my_module I see
['Person', 'Organisation', 'Order'] etc but no 'Mydoc'
Regards,
Chetan
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
Chetan Kumar
2009-09-07 16:13:42 UTC
Permalink
Post by Łukasz Nowak
Hello,
Does create module dialog run without any error?
Yes.
Post by Łukasz Nowak
Is Mydoc portal type available?
Yes. It is listed in portal_types.
Post by Łukasz Nowak
Is it possible to manually add Mydoc portal type to Mydoc Module portal
type?
No. That is the surprising part.
Is there something else to check here? I mentioned that

portal.mydoc_module.getVisibleAllowedContentTypeList() returns an empty list.

Regards.
Chetan
Łukasz Nowak
2009-09-07 20:12:34 UTC
Permalink
Post by Chetan Kumar
Post by Łukasz Nowak
Hello,
Does create module dialog run without any error?
Yes.
Post by Łukasz Nowak
Is Mydoc portal type available?
Yes. It is listed in portal_types.
Post by Łukasz Nowak
Is it possible to manually add Mydoc portal type to Mydoc Module portal
type?
No. That is the surprising part.
Is there something else to check here? I mentioned that
AFAIK if Mydoc portal type is in available portal types it have to be in
list of Allowed portal types for Mydoc Module.

I played your scenario on my quite recent instance - everything works
fine, so it might be problem in your configuration.

Regards,
Luke
Post by Chetan Kumar
portal.mydoc_module.getVisibleAllowedContentTypeList() returns an empty list.
Regards.
Chetan
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
Boris Kocherov
2009-09-07 23:00:30 UTC
Permalink
Post by Łukasz Nowak
AFAIK if Mydoc portal type is in available portal types it have to be in
list of Allowed portal types for Mydoc Module.
I played your scenario on my quite recent instance - everything works
fine, so it might be problem in your configuration.
I played too. Works fine.
Chetan Kumar
2009-09-08 11:30:12 UTC
Permalink
Post by Boris Kocherov
Post by Łukasz Nowak
AFAIK if Mydoc portal type is in available portal types it have to be in
list of Allowed portal types for Mydoc Module.
I played your scenario on my quite recent instance - everything works
fine, so it might be problem in your configuration.
I played too. Works fine.
I tried again (very carefully this time). It works fine for me too.
There must have been mistake in settings while adding the module.
The objects can be added to the module.
Thanks a lot.
Chetan

Boris Kocherov
2009-09-08 00:07:26 UTC
Permalink
If you use buildout for install erp5, send me output command:
ls parts/instance/{Extensions,Document}/

In my case:
"""
parts/instance/Document/:

parts/instance/Extensions/:
Barcode.py DocumentManagement.py GetRssDataAsDict.py
README.txt StandardSecurity.py
CustomerRelationshipManagement.py DocumentSecurity.py Glossary.py
SecurityCloner.py VObject_export.py
DocumentExtraction.py Ecommerce.py
PythonScriptParserUtility.py Security.py
"""
Post by Chetan Kumar
Hello all
I wanted to find out if some help is possible on this.
Regards,
Chetan
Post by Chetan Kumar
Hi
I created a module (mydoc_module) with the following parameters
Module ID: mydoc_module
Module Portal Type: Mydoc Module
Module Title: Mydocs
Object Portal Type: Mydoc
Object Title: Mydoc
Portal Skins Folder: mydoc_module
Following all the instructions for creating a new module, I see that the
Mydoc portal_type is not allowed to be added to the mydoc_module
although the settings are correct. It gives the error "You are not
allowed to add new content in this context."
However, if I check other already existing portal_types (like File,
Document, Order, Person etc.) these can be added.
In an script I used to test the setting
portal.person_module.getVisibleAllowedContentTypeList() shows ['Person']
portal.organisation_module.getVisibleAllowedContentTypeList() shows
['Organisaion']
as expected and
portal.mydoc_module.getVisibleAllowedContentTypeList() shows []
In case I allow other content types to be added to my_module I see
['Person', 'Organisation', 'Order'] etc but no 'Mydoc'
Regards,
Chetan
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
Crisis had come unexpectedly, just as winter comes unexpectedly to
Russia every year.
Loading...