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

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?

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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
5
ก.พ. 19
7814
1
พ.ย. 17
7933
3
พ.ค. 25
11495
2
ม.ค. 20
7502
5
ธ.ค. 18
28803