コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1843 ビュー

I want to show the number of the document in a link, like this:


related_invoice_url = self.env['ir.config_parameter'].get_param('web.base.url')

related_invoice_url += '/web#id=%d&view_type=form&model=%s' % (invoice_id.id, 'account.move')


< field widget="url" text="????" name="related_invoice" >< /field>


How can I show the invoice number as text in the link?


Thank you

アバター
破棄
最善の回答

Hi,

Try with a html field and pass the required parameters in it for link creation
just like :

related_invoice_html_field = """
(div)
    (a href='""" + related_invoice_url + """')
        (font style="font-size: 14px;")""" + "(u)" + invoice number + "(/u)" + """(/font)
    (/a)
(/div)
"""

User readonly attribute in xml file if it is useful. 

アバター
破棄
著作者

thank you

関連投稿 返信 ビュー 活動
1
7月 25
2437
2
7月 25
7901
2
7月 25
4309
2
7月 25
4058
2
6月 25
2659