Odoo Help


dynamic placeholder name change

Vincent Myo
on 2/10/15, 6:34 AM 948 views

i would like to chage the placeholder name when click something....let me show you.

First :

<field name="name" default_focus="1" placeholder="Name" />

then i change  like the following.

<xpath expr="//form/sheet/div/h1/field[@name='name']" position="attributes">
                    <attribute name="placeholder" attrs="{'invisible': ['&amp;', ('is_company', '=', False), ('supplier', '=', False)]}">[Something]</attribute>


At that time, i like to click the company's checkbox, change the original one.

<field name="name" default_focus="1" placeholder="Name" />



what am i doing like the above case?


I don't have enough insight to answer how you can implement dynamic placeholder as you have states, but the <attribute tag can only contain "name" attribute and nothing else (cannot contain "attrs")

on 2/11/15, 5:01 AM

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

2 follower(s)


Asked: 2/10/15, 6:34 AM
Seen: 948 times
Last updated: 3/16/15, 8:10 AM