Odoo Help

Welcome!

This community 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.

1

How to insert properties of the data model in the xml view?

By
thenon
on 4/9/13, 10:48 AM 928 views

I have something like this in my view for a custom module:

 <field name="arch" type="xml">
            <xpath expr="/form/sheet/notebook/page[@string='Contacts']" position="after">
                <page string="External">
                    <iframe src="http://www.example.com?email=__EMAIL_SHOULD_GO_HERE__"></iframe>               
              </page>
        </xpath>
  </field>

where __EMAIL_SHOULD_GO_HERE__ currently is, I need to insert the partner's email. What is the best way to get that value in there?

The only examples I've found use something like:

<field name="email"></field>

Thanks.

If you wanted to insert the partner's name into the xml, in the place where "XXXXXXYYYYYYYYYZZZZ" currently is, how would you do that?

thenon
on 4/9/13, 12:02 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/9/13, 10:48 AM
Seen: 928 times
Last updated: 3/16/15, 8:10 AM