diff --git a/bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml b/bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml index bfa45955f4a3759e7124fd8519a2a0b54e360094..7c0764bfd1cc54c428fc5e85a91f35e4accad97e 100644 --- a/bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml +++ b/bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml @@ -58,7 +58,11 @@ if not context.getReference():\n context.FreeSubscriptionRequest_generateReference()\n if context.getValidationState() != \'submitted\':\n return\n -if context.getDestination():\n +person = context.getDestinationValue()\n +if person:\n + email = person.getDefaultEmailCoordinateText()\n + if email and not context.getDefaultEmailCoordinateText(): # XXX workaround to fill the email field if not already set\n + context.setDefaultEmailCoordinateText(email)\n context.accept()\n elif context.getDefaultEmailCoordinateText():\n email = context.getDefaultEmailCoordinateText()\n