تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3734 أدوات العرض

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?

الصورة الرمزية
إهمال