Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
3703 Weergaven

Hi,

I would like to override testcases of odoo sales module. Is that possible?

Avatar
Annuleer
Beste antwoord

yes, it's possible. 
Inherit the standard test class and override the test case(method) you want to modify. 

Avatar
Annuleer
Auteur

Can you possibly give me an example? Thanks!

https://github.com/odoo/odoo/blob/12.0/addons/sale/tests/test_sale_transaction.py#L11

like this, you can inherit any test class and override its method

Auteur

Thank you! Unfortunately this is not working as expected, because the 'old' code is still executed and throws erros.

Beste antwoord

rather than override, what you want is inherit the test and modify part of his code from an external module?

Avatar
Annuleer