Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4071 Näkymät

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?

Avatar
Hylkää
Paras vastaus

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
5
helmik. 19
7684
1
marrask. 17
7785
3
toukok. 25
11320
2
tammik. 20
7281
5
jouluk. 18
28614