Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !886

Open
Created Jun 10, 2019 by Tatuya Kamada@tatuyaContributor
  • Report abuse
Report abuse

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

  • Overview 1
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: multi_relation_field
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7