跳至內容
選單
此問題已被標幟
2 回覆
3743 瀏覽次數

Hi,

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

頭像
捨棄
最佳答案

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

頭像
捨棄
作者

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

作者

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

最佳答案

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

頭像
捨棄