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

hi all iam trying to hide create and edit option in project task form but its not working 


my code below :


            <xpath expr = "// field [@ name = 'project_id']" position = "attributes">

                <attrs name = 'options'> {'no_create': True} </attrs>

            </xpath>

            <xpath expr = "// field [@ name = 'user_id']" position = "attributes">

                <attrs name = 'options'> {'no_create': True} </attrs>

            </xpath>

            <xpath expr = "// field [@ name = 'hr_category_ids']" position = "attributes">

                <attrs name = 'options'> {'no_create': True} </attrs>

            </xpath>

<! - <field name = "user_id" position = "attributes">

                <attrs name = 'options'> {'no_create': True} </attrs>

            </field> ->

<! - <field name = "task_tkt_id" position = "attributes">

                <attrs name = 'options'> {'no_create': True, 'no_open': True} </attrs>

            </field> ->

<! - <field name = "hr_category_ids" position = "attributes">

                <attrs name = 'options'> {'no_create': True} </attrs>

            </field> ->

Avatar
Discard
Best Answer

Hi,

Replace attrs with attribute,

<xpath expr="//field[@name='your_field']" position="attributes">

       <attribute name="options">{'no_create':True, 'no_open':True}</attribute>

 </xpath>

Hope it helps,

Thanks

Avatar
Discard