In my form view each record should have an icon with a redirection to a specific website. For Example:
Record 1 | www.test.com/a
Record 2 | www.test.com/b
How is it possible to create such a redirection on click?
I tried a button - but I dont know how to redirect in the action:
<form string="MyForm">
<sheet>
<group>
<page string="MyPage">
<field name="MyRecords" widget="one2many_list">
<tree string="Records">
<field name="identifier"/>
<field name="recordname"/>
<button type="object" name="open_record_action" icon="fa-external-link" />
</tree>
</field>
</page>
<page>
...
</page>
</group>
<group>
...
</group>
</sheet>
In the model:
@api.multi
def open_record_action(self, context):
????
Also a possible solution would be to store the link in a field in the model and to implement it in the view in this way:
<field name="url" widget="url"/>
But with this solution the link is displayed. But I want only to see the icon.
Any ideas how to solve?
<sheet>
,<page>
,<tree>
, etc. ? – grochmalodoo
/openerp
instead ofhyperlink
. People with that specific knowledge will be able to find the question easier. – grochmal