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

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
7188
0
يونيو 22
1713
1
أكتوبر 19
4911
3
أبريل 18
5124
4
أغسطس 21
66981