releasenumber=schema.TextLine(
title=(u"Release Number"),
description=(u"Release Number (up to eight chars)"),
default=_(u"1.0"),
max_length=8
)
I want to create a default value for the hidden title field of the release module. This value should be created from the value of the parent objects title and the value of the field releasenumber.
I'm able to get the value from the title field of the parent object with:
context.title
or
self.aq_inner.title
But I have issues to get the value of the releasenumber field.
I could access the object with:
NameOfSchemaClass['field_name']
e.g. : IEUpRelease['releasenumber']
But I don''t get the current value of the field back. I need to get back an unicode string instead of an object.
I've already searched for a way to get the value out of the Dexterity form field but with no success yet.
I created a new module with a class for a computed release title to my add-on, inherited from plone.dexterity.content:Item.
I added this new class to the xml-type description and reinstalled the add-on again. If I try to add a new release to a project, my plone instance get high load and circles without any success (I could view the high load from Python inside top).
thank you for the pointer again. I read the blog post carefully again and started with the second part first. I changed my source code for the URL creation first and worked on the creation of the title/navtree-entry afterwards.
I stumbled over the(in the blog) described issue with setting the title attribute first. This issue was solved once I deleted the title form field in my release type and added another field to host the project name (parent container name).
I committed my changes already to the github repo.