[Erp5-dev] *_divergence_testers view returns error.

Rafael Monnerat rafael at nexedi.com
Thu May 10 18:30:59 CEST 2007


The Project and Project Line (portal types) starts with this problem too. I just
went at portal_types tool an "save" again the Project and Project Line and
everything starts to work again.

I didn't check why works again, but it can be related with portal type
Permissions that should be updated in XML. 


Quoting Shrenik Bhura <shrenik.bhura at intelliant.net>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Shresth,
> 
> Apply the following to the *DivergenceTester.py and the problem will be
> solved.
> 
> 
> Index: ERP5/Document/CategoryDivergenceTester.py
> ===================================================================
> - --- ERP5/Document/CategoryDivergenceTester.py   (revision 14268)
> +++ ERP5/Document/CategoryDivergenceTester.py   (working copy)
> @@ -44,7 +44,8 @@
>    add_permission = Permissions.AddPortalContent
>    isPortalContent = 1
>    isRADContent = 1
> - -
> +  allowed_types = ()
> +
>    # Declarative security
>    security = ClassSecurityInfo()
>    security.declareObjectProtected(Permissions.AccessContentsInformation)
> 
> 
> Index: ERP5/Document/PropertyDivergenceTester.py
> ===================================================================
> - --- ERP5/Document/PropertyDivergenceTester.py   (revision 14268)
> +++ ERP5/Document/PropertyDivergenceTester.py   (working copy)
> @@ -45,7 +45,8 @@
>    add_permission = Permissions.AddPortalContent
>    isPortalContent = 1
>    isRADContent = 1
> - -
> +  allowed_types = ()
> +
>    # Declarative security
>    security = ClassSecurityInfo()
>    security.declareObjectProtected(Permissions.AccessContentsInformation)
> 
> 
> Index: ERP5/Document/QuantityDivergenceTester.py
> ===================================================================
> - --- ERP5/Document/QuantityDivergenceTester.py   (revision 14268)
> +++ ERP5/Document/QuantityDivergenceTester.py   (working copy)
> @@ -44,7 +44,8 @@
>    add_permission = Permissions.AddPortalContent
>    isPortalContent = 1
>    isRADContent = 1
> - -
> +  allowed_types = ()
> +
>    # Declarative security
>    security = ClassSecurityInfo()
>    security.declareObjectProtected(Permissions.AccessContentsInformation)
> 
> 
> Can anyone from Nexedi or more informed souls confirm the same?
> 
> Regards,
> SB
> 
> "I am not intelligent, I only try to observe...."
> 
> Shresth K wrote:
> > Hello,
> > 
> > I have been experimenting with ERP5 since the release of rc11 live CD.
> > 
> > I was exploring portal_rules when I ran into some trouble with the
> > default_order_rule/*_divergence_testers view. The same was the case with
> > default_order_rule which I have managed to workaround with changing the
> > portal type of rule tool to 'ERP5 Folder' .
> > 
> > I am currently using revision14268.
> > 
> > 
> > Here is the detailed error log when I attempt to access
> > portal_rules/default_order_rule/1
> > 
> > 
> > Time   2007/05/08 14:08:10.551 GMT+0530    
> >    User Name (User Id)    itcon (itcon)    
> >    Request URL  
> > http://localhost:9080/erp5dev/portal_rules/default_order_rule/1/view    
> >    Exception Type   AttributeError    
> >    Exception Value   'NoneType' object has no attribute
> > 'isConstructionAllowed'
> > 
> > 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 Products.CMFCore.PortalContent, line 117, in view
> >   Module Products.CMFCore.PortalContent, line 109, in __call__
> >   Module Products.ERP5Form.Form, line 364, in __call__
> >   Module Products.ERP5Form.Form, line 402, in __call__
> >   Module Products.PageTemplates.PageTemplate, line 96, in pt_render
> >    - <ZopePageTemplate at /erp5dev/form_view used for
> > /erp5dev/PropertyDivergenceTester_view>
> >   Module TAL.TALInterpreter, line 190, in __call__
> > 
> > - snip-
> > 
> >   Module TAL.TALInterpreter, line 460, in do_setLocal_tal
> >   Module Products.PageTemplates.TALES, line 221, in evaluate
> >    - URL: /erp5dev/context_box_render
> >    - Line 71, Column 6
> >    - Expression: standard:'here/getVisibleAllowedContentTypeList |
> > python:[]'
> >    - Names:
> >       {'container': <OrderRule at
> > /erp5dev/portal_rules/default_order_rule>,
> >        'context': <ERP5Form at /erp5dev/PropertyDivergenceTester_view
> > used for /erp5dev/portal_rules/default_order_rule/1>,
> >        'default': <Products.PageTemplates.TALES.Default instance at
> > 0xb6a7e18c>,
> >        'form': <ERP5Form at /erp5dev/PropertyDivergenceTester_view used
> > for /erp5dev/portal_rules/default_order_rule/1>,
> >        'here': <PropertyDivergenceTester at
> > /erp5dev/portal_rules/default_order_rule/1>,
> >        'loop': <SafeMapping instance at b00032a0>,
> >        'modules':
> > <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
> > 0xb6a787ac>,
> >        'nothing': None,
> >        'options': {'args': ()},
> >        'repeat': <SafeMapping instance at b00032a0>,
> >        'request': <HTTPRequest, URL=
> >
>
http://zklphoenix.dyndns.org:9080/erp5dev/portal_rules/default_order_rule/1/view>,
> >        'root': <Application instance at b3839cb0>,
> >        'template': <ERP5Form at /erp5dev/PropertyDivergenceTester_view
> > used for /erp5dev/portal_rules/default_order_rule/1>}
> >   Module Products.PageTemplates.Expressions, line 174, in __call__
> >   Module Products.PageTemplates.Expressions, line 169, in _eval
> >   Module Products.PageTemplates.Expressions, line 74, in render
> >   Module Products.ERP5Type.Core.Folder , line 715, in
> > getVisibleAllowedContentTypeList
> >   Module Products.ERP5Type.Cache, line 192, in __call__
> >   Module Products.ERP5Type.Cache, line 109, in __call__
> >   Module Products.ERP5Type.Core.Folder, line 704, in
> > _getVisibleAllowedContentTypeList
> >   Module Products.ERP5Type.patches.CMFBTreeFolder, line 54, in
> > CMFBTreeFolder_allowedContentTypes
> >   Module Products.ERP5Type.patches.CMFBTreeFolder, line 52, in <lambda>
> > AttributeError: 'NoneType' object has no attribute 'isConstructionAllowed'
> > 
> > Is it something from ERP5Type or CMFCore that needs to be imported into
> > the Tester documents such as Folder? Just guessing.
> > 
> > Thanks in advance for any help or guidance.
> > 
> > Regards,
> > Shresth
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Erp5-dev mailing list
> > Erp5-dev at erp5.org
> > http://erp5.org/mailman/listinfo/erp5-dev
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> 
> iD8DBQFGQGYqwqjb3kq05PgRAut1AKCKsx1I2hEfO4U3EDBMFtFrBakGAACgi7Nf
> PqvD9FMfGMwnjnJ2qQ9SN2s=
> =oOoO
> -----END PGP SIGNATURE-----
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://erp5.org/mailman/listinfo/erp5-dev
> 


Rafael Manhaes Monnerat 
ERP5 Developer

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Erp5-dev mailing list