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
- 项目
- MRP
此问题已终结
2967
查看
| 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|
|
2
7月 22
|
10090 | ||
|
|
1
6月 21
|
3253 | ||
|
|
2
2月 21
|
299 | ||
|
|
5
9月 20
|
15313 | ||
|
|
4
6月 20
|
50819 |