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
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
2161
Visualizzazioni
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
2
lug 22
|
8182 | ||
|
1
giu 21
|
1577 | ||
[SOLVED] Get related field
Risolto
|
|
2
feb 21
|
299 | |
|
5
set 20
|
13476 | ||
|
4
giu 20
|
49004 |