WIP: ERP5Form: Take into account the portal_type in Multi Relation Field
Before this commit, MultiRelationField partially used the specified portal_type.
An example this commit fixes:
ID | Value |
---|---|
field_id | my_causality_related_title_list |
context | a Purchase Order [purchase_order/10] |
base_category | causality_related |
portal_type | Purchase Packing List |
causality_related_list | ['portal_simulation/1', 'purchase_packing_list_module/10'] |
causality_related_title_list | ['Simulation 1', 'PPL: 10'] |
[Note]: "Simulation 1" is the title of the Simulation Movement in this example.
With this setting, the render_view created the following link.
<a class="relationfieldlink" href="erp5_site/purchase_packing_list/10">Simulation 1</a>
The href attribute was correct, but the link text was wrong, because the portal_type parameter was not used to display the link text.
A known workaround was having the following configuration at the Default TALES:
python: context.getCausalityRelatedTitleList(portal_type='Purchase Packing List')