我已将其用作
_sql_constraints = [
('bpv_uniq', 'unique (branch_id,product_id,product_tmpl_id)', "There are Other Reference Purchase Price in same branch, please change branch"),
]
我已删除此代码并升级模块。但是在数据输入上仍然会出现以下错误;
重复键值违反唯一约束";reference_ price_uniq";详细信息:密钥(branch_id,product_id,product_tmpl_id(=(2,31,27(已存在。
请引导。
一种方法是重写约束以不检查任何内容。
_sql_constraints = [('bpv_uniq', 'CHECK(1==1)', "There are Other Reference Purchase Price in same branch, please change branch"),]