Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3753 Widoki

Hi,

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Autor

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

Najlepsza odpowiedź

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

Awatar
Odrzuć