تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1853 أدوات العرض

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
يوليو 25
2452
2
يوليو 25
7907
2
يوليو 25
4323
2
يوليو 25
4059
2
يونيو 25
2662