Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !886

WIP: ERP5Form: Take into account the portal_type in Multi Relation Field

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Tatuya Kamada requested to merge tatuya/erp5:multi_relation_field into master Jun 10, 2019
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

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')
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: multi_relation_field
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7