跳至内容
菜单
此问题已终结
3 回复
41162 查看

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
10162
0
12月 24
9384
3
9月 24
21474
5
12月 24
52774
4
7月 24
10448