Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1856 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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. 

Ảnh đại diện
Huỷ bỏ
Tác giả

thank you

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
2466
2
thg 7 25
7917
2
thg 7 25
4334
2
thg 7 25
4072
2
thg 6 25
2667