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

I added a custom field called "x_test_textbox". And then added the field in the Quotation form view. I added the line 

_sql_constraints = [ ('name_uniq', 'unique(x_test_textbox)', 'text duplicated!!') ]

into sale.py and update the webpage. But the custom field is still repeatable. Does somebody know to solve this problem?

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

Hi,

I think you have to try it in anew database,  sql constrains will not get into effect in  an existing database.


So create a test db and install the module and see whether it is working as expected or not.


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 2 19
7684
1
thg 11 17
7785
3
thg 5 25
11320
2
thg 1 20
7281
5
thg 12 18
28614