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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
2579
Vistas
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
2
jul 22
|
9052 | ||
|
1
jun 21
|
2324 | ||
[SOLVED] Get related field
Resuelto
|
|
2
feb 21
|
299 | |
|
5
sept 20
|
14185 | ||
How to install new module in Odoo 11
Resuelto
|
|
4
jun 20
|
49626 |