-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I am using Plone 6.0.15 ClassicUI and DGF 3.0.4. My custom converter for my schema.Decimal field is not being triggered in display mode.
My DictRow schema:
class IOrderDetails(model.Schema):
order_category = schema.Choice(
title="Category",
vocabulary="srstims.common.OrderCategory",
required=False,
)
directives.widget("amount", DecimalCurrencyTextFieldWidget)
amount = schema.Decimal(
title="Amount",
required=False,
)
My converter:
@adapter(IDecimal, IDecimalCurrencyTextWidget)
class DecimalCurrencyTextDataConverter(BaseDataConverter):
def toWidgetValue(self, value):
if value is self.field.missing_value:
return ""
return str(value)
The converter works on regular schema fields but not if it is used in DGF.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels