Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1746 มุมมอง

How can i insert the group here?



What system access to request?
Request
x_studio_stage_id in [2, 3, 4]
 

Also in field attribute? 



อวตาร
ละทิ้ง
ผู้เขียน

I tried a multiple solutions i found everywhere, but none of it worked

<data>
<xpath expr="//field[@name='x_name']" position="attributes">
<attribute name="placeholder">What system access to request?</attribute>
<attribute name="string">Request</attribute>
<attribute name="readonly">x_studio_stage_id in [2, 3, 4]</attribute>
</data>

How can i insert the group in there? 

I also tried in field.

<field name="x_studio_read" groups="base.group_user,trusty.test_users00" readonly="x_studio_stage_id in [2, 3, 4]"/>
<field name="x_studio_write" groups="base.group_user,trusty.test_users00" readonly="x_studio_stage_id in [2, 3, 4]"/>

But it didn't work too.

คำตอบที่ดีที่สุด

Hi,
You can introduce a dummy computed field to control the readonly status of the field. As your field name x_name, add new field named x_name_readonly and then compute and set the value to this field based on stage and logged in user group

Then in the view level, add this field to readonly attribute

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Studio changes create a big mess in XML แก้ไขแล้ว
1
มี.ค. 25
2748
How to activate XML Editor แก้ไขแล้ว
2
ก.ย. 20
11739
2
มิ.ย. 25
3216
0
ต.ค. 24
1246
1
ส.ค. 24
1607