Hi!

 I'm writing a product, with a type called "Portaria". But something scary
happens when I redefine description field (also happens with title).

 I've added some "Portaria" contents (a different description for each), and
when looking at site, it's description was set the same from his parent
folder. And more stranger: when using pdb, different methods return
different descriptions:

(Pdb) portaria_item.description
'my portaria item description'

(Pdb) portaria_item.Description()
'parent folder description'

(Pdb) portaria_item.getDescription()
'my portaria item description'

Any ideas? Some code bellow:


content/portaria.py


.
.
.
PortariaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    atapi.TextField(
        'description',
        storage=atapi.AnnotationStorage(),
        widget=atapi.TextAreaWidget(
            label=_(u"Descri\xe7\xe3o"),
            description=_(u"Resumo da portaria"),
        ),
        required=True,
    ),
.
.
.
))

PortariaSchema['description'].storage = atapi.AnnotationStorage()
.
.
.


 
Thanks! 
-- 
View this message in context: 
http://plone.293351.n2.nabble.com/Strange-things-when-Overwriting-description-at-product-new-type-tp4977325p4977325.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to