How to open new URL window from Button


User input the values at form and click on the “Preview” button. We will use the value to generate the custom URL and calling third party website.

  1. May I know how to open URL from Button?

I had tried to create the “ir.action.url” and using decorator “@ModelView.Button_action(action)”. Tryton can open the URL from “ir.action.url” but it return fixed value of URL “ir.action.url”.

  1. Beside question [1] or can dynamic value “URL” using button_action?

Best regards

You could use a char field filled with the URL and display using the url widget.

But I think be good to allow dynamic action: Issue 8766: Allow ModelView.button_action returns action values - Tryton issue tracker

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.