Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0] [FIX] Tree m2o clickable: call to get_formview_action() #1498

Merged

Conversation

qgroulard
Copy link
Contributor

When clicking on a m2o field on a form view, the method 'get_formview_action()' is called in order to get the action.
This method can be overridden in order to return specific action for a certain model.

IMO, we should expect the same behaviour when clicking on the m2o field on a tree view.

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Calling get_formview_action avoids the hard-coded the action, and provides for better handling of polymorphic models.

Copy link
Contributor

@AdriaGForgeFlow AdriaGForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@simahawk
Copy link
Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 12.0-ocabot-merge-pr-1498-by-simahawk-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jan 31, 2020
Signed-off-by simahawk
@OCA-git-bot OCA-git-bot merged commit bdbcf40 into OCA:12.0 Jan 31, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a5be337. Thanks a lot for contributing to OCA. ❤️

@sbidoul sbidoul deleted the 12.0-m2o_clickable_get_formview_action-qgr branch June 25, 2020 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants