Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3453 Lượt xem

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>
Ảnh đại diện
Huỷ bỏ

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.

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 25
2716
0
thg 8 25
317
1
thg 8 25
2336
2
thg 7 25
8142
2
thg 7 25
4578