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

Hello everyone,

I need to make partner and bill/invoice date required field in when create bill or invoice, i did it using xpath but i notice that when i try to create and save journal entries it show an error message say that the field partner and date are required.

using python inherit cause same issue.

any idea how to avoid that but i need the field required when create invoice.

Thank all


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

If you have directly given required = 1, try giving as follows:  attrs="{'required':[('move_type', '!=', 'entry')]}"


Thanks & Regards

Walnut Software Solutions

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

Thank For Replay,
but i used like that:
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="attrs">attrs="{'required':[('move_type', '!=', 'entry')]}"</attribute>
</xpath>
and i get 500 internal server error
any idea ?

Written syntax is wrong.
Try this:
<attribute name="attrs">{'required':[('move_type', '!=', 'entry')]}</attribute>

ผู้เขียน

You are great, its work now.
you save me, i really appreciate your help.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
7299
0
มิ.ย. 22
1805
1
ต.ค. 19
5018
3
เม.ย. 18
5205
Help with XPath and View Inheritance แก้ไขแล้ว
4
ส.ค. 21
67323