Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3431 มุมมอง

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>
อวตาร
ละทิ้ง

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.

คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ย. 25
2682
0
ส.ค. 25
298
1
ส.ค. 25
2302
2
ก.ค. 25
8124
2
ก.ค. 25
4561