Skip to Content
Menú
This question has been flagged
3 Respostes
41151 Vistes

I want to remove _sql_constraints (database level).

For example in account_invoice.py there is a constraints on number field. Now I want to remove it.

Can anyone have idea how to deal with this?

Thank you.

Avatar
Descartar
Best Answer

you could remove it using psql command. for example if you have the following constraint

_sql_constraints = [
('phone_company_unique', 'unique(type,phone)', 'The phone unique among companies!')
]

you could use:

ALTER TABLE res_partner DROP CONSTRAINT res_company_phone_company_unique;

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de març 15
10153
0
de des. 24
9377
3
de set. 24
21462
5
de des. 24
52761
4
de jul. 24
10438