Having implemented both fully automated and hybrid approaches across multiple Odoo pricing implementations, I can share what works best. The optimal strategy depends on your change frequency and pricing complexity, but here’s a framework that scales well:
Automation Focus (70-80% of QA effort):
Automate these categories completely:
- Core calculation logic - Base price retrieval, discount application, tax calculations
- Rule precedence - Which price list wins when multiple apply
- Boundary conditions - Date ranges, quantity thresholds, minimum order values
- Currency handling - Conversion rates, rounding rules
- Regression scenarios - Past bugs that shouldn’t resurface
Structure tests as parameterized scenarios using test fixtures. For Odoo 15, leverage the product.pricelist model’s price_compute() method in tests:
test_scenarios = [
{'product': 'PROD-001', 'qty': 10, 'partner': 'customer_a', 'expected': 95.00},
{'product': 'PROD-001', 'qty': 100, 'partner': 'customer_a', 'expected': 85.00},
# Add scenarios as CSV or JSON
]
Maintain these scenarios in external files so business users can review and update without touching code.
Manual Testing Focus (20-30% of QA effort):
Reserve manual testing for:
- New pricing strategies - First implementation of novel business rules
- Cross-module interactions - How pricing affects invoicing, reporting, contracts
- User experience validation - Is the pricing UI intuitive? Are error messages clear?
- Edge case exploration - Scenarios you haven’t thought to automate yet
- Business logic validation - Does the pricing align with business strategy?
Maintenance Strategy:
The brittleness concern is real but manageable:
- Use abstraction layers (helper methods) for Odoo API interactions
- Version your test data with your code
- Run a subset of tests (smoke tests) on every commit, full suite nightly
- When business rules change, update test expectations in batch during the same sprint
- Track test maintenance time as a metric - if it exceeds 15% of total QA time, refactor your test architecture
Practical Implementation:
For your current 4-hour manual cycle:
- Log what you’re testing manually for the next 3 cycles
- Identify the repetitive scenarios (probably 60-70% of your time)
- Automate those first using parameterized tests
- Keep manual testing for the truly exploratory work
You’ll likely reduce manual testing to 1-1.5 hours while increasing overall coverage. The initial automation investment is 2-3 weeks, but ROI appears within 2-3 months through faster release cycles and fewer production pricing errors.
Red Flags for Going Too Far:
- Test maintenance takes longer than feature development
- Tests fail frequently due to minor UI changes
- You’re mocking too much of Odoo’s core pricing logic
The goal isn’t 100% automation - it’s maximizing confidence per hour of QA effort invested.