Skip to content

erp5_xhtml_style: Add `form_action` hidden field for normal documents

Carlos Ramos Carreño requested to merge tsxx/erp5:fix/xhtml_form_action into master

Normal documents not in web mode (the forms that have a floppy disk icon for the save action) can have a custom form action too. However, if a relation field is added to the form, the custom save action is not being used by the Base_editRelation script, because the form_action hidden field was added only in web mode.

With this patch, this hidden field is also added for normal documents, and now relations can be correctly set.

Note that this only applies for the old (xhtml) interface: documents using the new (renderjs) interface do not call Base_editRelation, as they do not save after setting a relation field, and do not require a similar change.

Merge request reports