Software Engineering · Odoo glossary
Code Refactoring
Refactoring improves the internal structure of existing code while preserving behaviour. Understand its role alongside Odoo repairs and testing.
Definition
In general ERP practice
Code refactoring changes the internal organization of existing code while preserving its observable behaviour. It can make a change easier to understand and maintain without introducing a new business feature.
Fixing a defect changes incorrect behaviour; refactoring preserves behaviour while improving structure. A repair engagement may include both, but its acceptance criteria should distinguish them.
In Odoo
In an Odoo customization, refactoring may reorganize duplicated logic or clarify module responsibilities. Tests should check that the business workflows continue to behave as intended.
Replacing a customization with standard functionality is a separate design decision. It may reduce the custom code that the client needs to maintain, but it is not automatically a behaviour-preserving refactoring.
How to control the scope
Record the behaviour that must remain stable, identify the structural change and verify the relevant workflows after each coherent change. If a bug is being fixed at the same time, document the corrected behaviour separately.
Engineering references
The definitions draw on the primary engineering references below. The Odoo context explains their application to custom development, not a version-specific feature guarantee.
Related glossary terms
Continue reading