Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
Odoo

Odoo Module Testing

Write TransactionCase/HttpCase tests and run with --test-enable / tagged tests.

Odoo Module Testing — a practical guide to Odoo module testing with clear examples you can reuse in real projects.

Odoo Tutorial Series (108/112). Prefer one article? Read the complete Odoo tutorial.

Short description

Tests protect upgrades and refactors of business logic.

Test tip

from odoo.tests.common import TransactionCase

class TestBook(TransactionCase):
    def test_create_book(self):
        book = self.env['library.book'].create({'name': 'Test'})
        self.assertTrue(book.id)

Leave a reply

Your email address will not be published. Required fields are marked *