跳至内容
菜单
此问题已终结
2 回复
2056 查看

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

形象
丢弃
最佳答案

Hi,

You can try like this:

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



Thanks

形象
丢弃

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

编写者

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>

最佳答案

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


形象
丢弃
相关帖文 回复 查看 活动
3
7月 23
5183
2
10月 22
4306
1
10月 22
7920
2
6月 24
9870
0
4月 22
2900