コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
41385 ビュー

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;

アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 15
10322
0
12月 24
9556
3
9月 24
21800
5
12月 24
53101
4
7月 24
10638