Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
41246 Переглядів

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.

Аватар
Відмінити
Найкраща відповідь

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;

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
бер. 15
10232
0
груд. 24
9448
3
вер. 24
21598
5
груд. 24
52893
4
лип. 24
10557