res = ''
vals = {
"name": "test",
"partner_id": 1000,
}
koko_base_config = self.env['koko.bn.mno']
res = koko_base_config.create(vals)
self.assertRaises(IntegrityError, res.write, vals)This gives me:
psycopg2.IntegrityError: insert or update on table "koko_bn_mno" violates foreign key constraint "koko_bn_mno_partner_id_fkey"
How to handle it for running wrong testcase successfully?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
2569
查看
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
2
7月 22
|
9044 | ||
|
1
6月 21
|
2316 | ||
|
2
2月 21
|
299 | ||
|
5
9月 20
|
14178 | ||
|
4
6月 20
|
49624 |