plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
243 stars 186 forks source link

Readonly fields are not created in the registry #3851

Open wesleybl opened 10 months ago

wesleybl commented 10 months ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

I created an interface with a readonly field and registered it in the registry. The interface looks like this:

class IMyInterface(Interface):

    my_field = schema.TextLine(
        title=_("My Field"),
        readonly=True,
        default="My Field",
    )

I installed the profile that registers the interface.

What I expect to happen:

I hope the my_field field is created in the registry.

What actually happened:

The my_field field is not created in the registry. You can go to: Site Setup -> Configuration Registry and try to search the field. But he's not there

What version of Plone/ Addons I am using:

Plone 6.0.7

davisagli commented 10 months ago

What is a read-only field in the registry useful for?

wesleybl commented 10 months ago

What is a read-only field in the registry useful for?

In my case, it would be to show the value of a field of another record.