Odoo Help


ODOO : How to use a field as an attribute to another field

Ashwin Mahajan
on 11/24/16, 4:17 AM 625 views


I am trying to display an image in the xml. I have file path and name as individual fields but I want to use them as the src attribute of the image tag. I have used the following code to display image but it only works when we create a new record and not after saving it.

<field name="file" filename="file_name" attrs="{'readonly':[('state', '!=', 'new')]}" />

<field name="file_name" invisible="1"/>

So, is there a way to point an attribute to another field? Or how can I make the above code work?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/24/16, 4:17 AM
Seen: 625 times
Last updated: 11/24/16, 4:59 AM