Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2752 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

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


Thanks & Regards

Walnut Software Solutions

Ảnh đại diện
Huỷ bỏ
Tác giả

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>

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
7245
0
thg 6 22
1752
1
thg 10 19
4962
3
thg 4 18
5156
4
thg 8 21
67069