コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2472 ビュー
In Odoo 11 This below Code Works Fine but this is not working in Odoo 16. 

        

        

I have tried the below solution for Odoo 16 but no result. 

        



       

   


       

   


アバター
破棄
最善の回答

Hi,

Please try using below code


<record id="employee_inherited_basic_form_view" model="ir.ui.view">
<field name="name">hr.employee.form.inherit.employee.basic</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.employee_inherited_basic_form_view"/>
        <field name="arch" type="xml">
<xpath expr="//field[@name='custom_field']" position="attributes">
                <attribute name="readonly">1</attribute>

                <attribute name="groups">base.group_user</attribute>
            </xpath>
        </field>
    </record>


In this we need to add the module name of the reference record in ref


Hope it helps

アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 24
10
1
5月 23
3711
2
3月 24
6255
2
6月 23
4541
1
5月 24
1930