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:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
This question has been flagged
2166
Görünümler
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye OlRelated Posts | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
2
Tem 22
|
8192 | ||
|
1
Haz 21
|
1583 | ||
[SOLVED] Get related field
Solved
|
|
2
Şub 21
|
299 | |
|
5
Eyl 20
|
13479 | ||
|
4
Haz 20
|
49006 |