تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2171 أدوات العرض

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
يوليو 23
5343
2
أكتوبر 22
4492
1
أكتوبر 22
8118
2
يونيو 24
10129
0
أبريل 22
3093