Skip to Content
Menu
This question has been flagged
2 Replies
2116 Views

Hello,

I need to make 'taxes_id' field in Purchase order line, v15, as read only and unselectable. 

I made an inherited view, but didn't work:

{'readonly':[('state', 'in', ['draft','purchase', 'done', 'cancel'])]}

True

{'no_create_edit': True}



Thanks

Avatar
Discard
Best Answer

Hi,

You can try like this:

xpath expr="//field[@name='order_line']/tree[1]/field[@name='taxes_id']" position="attributes"
"readonly">1
/xpath



Thanks

Avatar
Discard

<xpath expr="/field[@name='order_line']/tree[1]/field[@name='taxes_id']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>

Author

Thanks Niyas,
I tried it but still not working:
<?xml version="1.0"?>
<data>
<xpath expr="//field[@name='order_line']/tree[1]//field[@name='taxes_id']" position="attributes">
<attribute name="readonly">1</attribute>
<attribute name="force_save">1</attribute>
</xpath>
</data>

Best Answer

Hi,

Please try this XML code:


<xpath expr="/field[@name='order_line']/tree[1]/field[@name='taxes_id']"
           position="attributes">
        <attribute name="readonly">1</attribute>
    </xpath>




Hope it helps


Avatar
Discard
Related Posts Replies Views Activity
3
Jul 23
5284
2
Oct 22
4405
1
Oct 22
8047
2
Jun 24
10006
0
Apr 22
2993