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:
- CRM
- e-Commerce
- 会計
- 在庫
- PoS
- Project
- MRP
この質問にフラグが付けられました
2587
ビュー
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
2
7月 22
|
9064 | ||
|
1
6月 21
|
2335 | ||
|
2
2月 21
|
299 | ||
|
5
9月 20
|
14194 | ||
|
4
6月 20
|
49630 |