Skip to Content
Menu
This question has been flagged
1 Reply
2744 Views

in odoo14, when set placehold of many2one field in form, but the placehold do not display.

 

<odoo>
    <data>
        <record id="trade_employee" model="ir.ui.view">
            <field name="name">trade.employee.form</field>
            <field name="model">hr.employee</field>
            <field name="inherit_id" ref="hr.view_employee_form"/>
            <field name="arch" type="xml">
                <field name="job_title" position='replace'>
                    <field name="job_id" placeholder="Job position"/>
                </field>
            </field>
        </record>
    </data>
</odoo>
Avatar
Discard

i have tried it in my Odoo 14 instance and works well.

Make sure you have pulled the latest build of odoo14 and your field is not replaced somewhere ( You may want to add a string to your field in XML to make sure that it is exactly the one displayed in the form view, ex string="JOB" ).

Hope it helps.

Best Answer

If you still have the problem. You can read it here: https://github.com/odoo/odoo/issues/42105

TL;DR: you can not have multiple placeholder for the fields with the same name. Since your "job_id" existed in HR Settings page I believe, you should use xpath to modify the placeholder of that "job_id" field.

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
1486
1
Nov 24
1195
2
Sep 24
1047
1
Aug 24
2455
3
Aug 24
2687