Unlock Odoo’s Full Potential: Navigating Odoo Module vs Developer Mode
Are you looking to customize your Odoo system but unsure whether to use developer mode or build a dedicated module? The choice between Odoo module vs developer mode is crucial for the long-term health and scalability of your Odoo instance. Making the right decision can save you countless hours, prevent future headaches, and ensure your customizations are robust and maintainable.
This comprehensive guide will demystify the two primary approaches to Odoo customization, providing clear, step-by-step insights into when and how to use each. We’ll explore the benefits, drawbacks, and best practices, empowering you to make informed decisions that drive your business forward.
Understanding Odoo Customization: The Core Concepts
Odoo’s flexibility is one of its greatest strengths, allowing businesses to tailor the ERP to their unique needs. At its heart, customization in Odoo involves modifying existing functionalities or adding new ones. This can range from simple field adjustments to complex application development.
The two main avenues for achieving this are:
- Developer Mode (UI-based customization): Making direct changes through the Odoo user interface.
- Custom Module Development (Code-based customization): Writing Python and XML code to create new features or override existing ones.
Each method has its place, and understanding their nuances is key to effective Odoo management.
Odoo Developer Mode: Quick Tweaks and Rapid Prototyping
Developer mode, often referred to as “debug mode,” provides a powerful set of tools directly within the Odoo UI. It’s designed for quick adjustments, testing, and understanding Odoo’s underlying structure without diving into code.
When to Use Odoo Developer Mode:
- Minor UI Adjustments: Changing field labels, hiding/showing fields, or reordering elements on a form view.
- Testing and Debugging: Inspecting data, understanding model structures, and debugging issues on the fly.
- Rapid Prototyping: Quickly testing a concept or a small change before committing to full module development.
- SaaS Environments: For Odoo SaaS users, developer mode is often the only available method for direct UI customizations, as direct code deployment is restricted.
How to Activate and Use Odoo Developer Mode:
- Activate: Go to
Settingsand scroll to the bottom. Click “Activate the developer mode” (or “Activate the developer mode (with assets)” for more advanced debugging). - Inspect Elements: Once active, a “bug” icon appears in the top right corner. Click it to access tools like “Edit View: Form,” “Edit View: List,” “Edit Action,” etc.
- Make Changes: Use these tools to modify views, create automated actions, or inspect record data. For example, to make a field read-only, you can use “Edit View: Form,” find the field, and add
readonly="1"to its definition.
Example: Preventing portal users from changing their email address can be done quickly in developer mode by making the login field read-only in their portal view. This is a perfect example of a quick UI tweak.
Limitations of Odoo Developer Mode:
While convenient, developer mode has significant limitations:
- Not Version Controlled: Changes made in developer mode are not tracked in a version control system (like Git). This makes collaboration difficult and reverting changes risky.
- Difficult to Migrate: UI-based changes can be lost during Odoo upgrades or when moving between instances.
- Limited Scope: You cannot create entirely new functionalities, complex business logic, or integrate with external systems solely through developer mode.
- Maintenance Overhead: Tracking and managing numerous small UI changes across different Odoo instances becomes a nightmare.
For anything beyond minor, temporary adjustments, the Odoo module vs developer mode debate strongly favors custom modules.
Custom Odoo Module Development: The Professional Approach
Custom module development involves writing Python and XML code to extend Odoo’s capabilities. This is the recommended approach for any significant, reusable, or complex customization.
When to Choose Custom Odoo Module Development:
- New Features/Applications: Building entirely new modules (e.g., a custom project management tool, a specialized manufacturing process).
- Complex Business Logic: Implementing intricate workflows, calculations, or data validations that go beyond Odoo’s standard capabilities.
- Integrations: Connecting Odoo with external systems (e.g., e-commerce platforms like Shopee, shipping carriers, payment gateways).
- Overriding Core Functionality: Modifying how existing Odoo modules behave (e.g., changing how sales orders are confirmed, customizing inventory valuation).
- Long-Term Maintainability: Ensuring your customizations are robust, upgrade-proof, and easily managed over time.
- Version Control: All code is tracked, allowing for collaborative development, easy rollbacks, and clear change history.
The Process of Custom Odoo Module Development:
- Define Requirements: Clearly outline what the custom module needs to achieve.
- Design: Plan the data models, views, and business logic.
- Code: Write Python files for models and business logic, and XML files for views, menus, and security rules.
- Test: Thoroughly test the module to ensure it functions as expected and doesn’t break existing Odoo features.
- Version Control: Push your code to a Git repository (e.g., GitHub, GitLab). This is a critical step for professional development.
- Deploy: Install the module on your Odoo instance.
Example: If you need to automatically calculate employee mileage based on customer locations using a mapping API, this would require a custom module. It involves external API integration, complex calculations (like the Haversine formula), and new data models—all beyond developer mode’s capabilities.
Advantages of Custom Odoo Modules:
- Scalability: Custom modules are designed to grow with your business.
- Maintainability: Code is organized, documented, and easier to debug and update.
- Upgrade-Proof: With proper development practices, custom modules are less likely to break during Odoo version upgrades.
- Reusability: Modules can be easily installed on multiple Odoo instances.
- Collaboration: Version control facilitates team development.
- Robustness: Provides a stable and reliable foundation for complex functionalities.
Odoo Module vs Developer Mode: The “10-Hour Rule”
A good rule of thumb, often cited by Odoo insiders, is the “10-hour rule.” If a customization is expected to take more than 10 hours of work, it should be developed as a separate module rather than being done directly in developer mode.
This rule helps in deciding when to invest in proper module development. Small, quick fixes might be fine in developer mode, but anything substantial benefits immensely from the structured approach of a custom module.
Case Study: Email Notification Troubleshooting
Consider the scenario where email notifications for successful payments aren’t being sent. While you might use developer mode to check email logs or outgoing mail server settings, a deeper issue (like a bug in a payment integration or a need for custom email templates based on specific payment statuses) would warrant a custom module. A module could, for instance, add custom logging, retry mechanisms, or more granular control over email triggers.
Case Study: Shopee Product Synchronization
For a complex integration like synchronizing 500 products with Shopee, a custom module is indispensable. It handles:
- Scheduled Actions: Automating product creation, updates, and inventory synchronization.
- Error Handling: Managing API limits, network issues, and data discrepancies.
- Data Mapping: Ensuring fields between Odoo and Shopee are correctly mapped.
- Performance: Optimizing data transfer for large volumes of products.
Attempting this solely through developer mode would be impossible and unsustainable.
Best Practices for Odoo Customization
Regardless of whether you choose Odoo module vs developer mode, adhering to best practices is crucial:
- Understand Odoo’s Core: Before customizing, thoroughly understand Odoo’s standard functionalities. Often, a built-in feature can achieve what you need without customization.
- Document Everything: Keep detailed records of all customizations, whether in code comments for modules or external documentation for developer mode changes.
- Test Rigorously: Always test your customizations in a staging environment before deploying to production.
- Plan for Upgrades: Design custom modules with future Odoo upgrades in mind. Avoid directly modifying core Odoo files.
- Seek Expert Advice: If you’re unsure, consult with experienced Odoo developers or partners.
Conclusion: Strategic Customization for Odoo Success
The debate of Odoo module vs developer mode isn’t about one being inherently superior, but rather about choosing the right tool for the job. Developer mode is excellent for quick, temporary fixes and UI tweaks, especially in SaaS environments. However, for any significant, long-term, or complex customization, investing in custom module development is the professional and strategic choice.
By understanding the strengths and limitations of each approach, you can ensure your Odoo customizations are efficient, scalable, and contribute positively to your business operations. Embrace the power of Odoo’s flexibility, but always with an eye towards maintainability and future growth.
Internal Links:
External Links:
This tutorial is a Q&A session about Odoo, covering various technical and functional aspects of the platform. The presenter, an Odoo insider, answers questions from the audience on topics ranging from user permissions and product management to email delivery and landed costs.
Odoo Insider: Regular Q&A Session
1. General Announcements & Community Engagement
- The presenter welcomes viewers to another “Odoo Insider” session.
- They encourage viewers to ask questions on YouTube and LinkedIn (and Twitch, though they note less activity there).
- They mention the upcoming Odoo Experience event (September 18-20), highlighting it as a major business event with conferences, talks, concerts, and networking opportunities.
- They tease an upcoming session with “Winand” to discuss invoicing in Europe, especially relevant for 2026 when e-invoicing becomes mandatory.
2. Preventing Portal Users from Changing Email Addresses
A common question from Odoo partners is how to prevent portal users from changing their email addresses in the portal.
- Problem: By default, portal users can change their email, which is also their login. This can lead to confusion if the contact email (on the partner record) differs from the login email.
- Solution (Automated Action):
- Go to
Settings>Technical(Developer Mode must be active). - Under
Automation, selectAutomated Actions. - Create a new automated action.
- Model:
Users(orres.users). - Trigger:
On Save(orOn Creation & On Updatein Odoo 16, but Odoo 18 usesOn Save). - Apply On: Add a domain filter to target only portal users. You can check if the user is part of the “Portal” group (
portalgroup’s external ID isbase.group_portal). - Condition (Optional but Recommended): Add a condition to check if the
loginfield (which is the email for portal users) is being changed by the user themselves. This prevents internal users (admins) from being blocked when updating a portal user’s email. You can compareuser.id(the current user making the change) withrecord.id(the user record being changed). - Action: Raise a
UserErrormessage (e.g., “You cannot change your email address.”) to prevent the save operation.
- Go to
- Alternative (UI-based): You can also make the email field read-only in the portal view.
- Activate Developer Mode.
- Go to the portal user’s view (e.g.,
Contacts> select a portal user > clickPortal Usersmart button). - Click the “Developer” icon (bug icon) >
Edit View: Form. - Locate the email field (
field name="login"). - Add
readonly="1"orattrs="{'readonly': [('user_id', '!=', user.id)]}"(more complex condition to allow admins to edit). - Save the view.
3. Selling Products with Multiple Units of Measure (UoM) in POS
A user asked if it’s possible to sell products with different units of measure (e.g., grams and kilograms) in the Point of Sale (POS).
- Odoo’s Approach: Odoo typically treats products with different UoMs (like a 1kg bag of coffee vs. a 250g bag) as separate products, each with its own barcode.
- POS Behavior: When you scan a product in POS, it identifies the specific product and its default UoM. If you want to sell the same “item” in different UoMs, you would usually create separate product variants or separate products for each UoM, each with its own barcode.
- Example: For “toothpaste,” you might have “toothpaste (gram)” and “toothpaste (kilogram)” as separate products.
- POS Categories: Ensure your products are assigned to the correct POS categories for them to appear in the POS interface. If a product isn’t showing, check its “Point of Sale Category” in the product settings.
- Conversion: Odoo handles conversions between UoMs if they belong to the same UoM category (e.g., grams and kilograms are both “weight”). You can define conversion rates in the product’s UoM settings.
4. Email Notification for Successful Payments
A user reported not receiving email notifications after successful payments and customers not getting order confirmations.
- Troubleshooting Steps:
- Check Odoo’s Email Log: Go to
Settings>Technical>Email>Emailsto see if the emails were generated and sent by Odoo. - Verify Payment Status: Ensure the payment is actually “paid” in Odoo and not “pending” or “in process.”
- Email Server Configuration: Confirm your outgoing email server (SMTP) is correctly configured in Odoo (
Settings>Technical>Email>Outgoing Mail Servers). Issues here can prevent emails from leaving Odoo. - Spam Folders: Advise users to check their spam or junk folders.
- Email Delivery Services (SPF/DKIM/DMARC): For better deliverability, ensure your email domain has proper SPF, DKIM, and DMARC records configured. Odoo’s documentation provides guidance on this. The presenter notes that Google (Gmail) might flag emails without proper authentication as spam.
- Payment Provider Integration: For online payments (e.g., Stripe), ensure the integration is correctly set up in Odoo and the payment provider’s dashboard. Sometimes, test mode credentials might be used in a live environment, causing issues.
- Check Odoo’s Email Log: Go to
5. Tracking Employee Travel Expenses
A user asked how to track employee travel expenses (mileage) automatically without manual input.
- Odoo’s Standard Functionality: Odoo’s standard Expenses module allows employees to submit expense reports. However, automatic mileage calculation based on distance traveled between customer locations is not a standard feature.
- Customization/Integration: To achieve automatic mileage calculation, you would likely need:
- Custom Development: Develop a custom module in Odoo to integrate with a mapping service (e.g., Google Maps API, OpenStreetMap API) to calculate distances between addresses.
- External Service Integration: Use a third-party mileage tracking service that integrates with Odoo or provides data that can be imported.
- Calculations: The calculation would involve getting the latitude and longitude of the start and end points (customer location, employee’s home/office) and using a geographical distance formula (like Haversine formula).
- Data Source: Odoo can store addresses for contacts and companies.
- Limitations: Directly calculating “road distance” (which considers actual routes) is more complex than “as-the-crow-flies” distance (straight line) and usually requires external mapping APIs.
6. Shopee Integration: Product Synchronization
A user with 500 products on Shopee linked via a connector asked if products are automatically updated in Odoo.
- General Principle: Integrations with e-commerce platforms like Shopee typically involve scheduled actions for synchronization.
- Odoo Connector Behavior (Likely):
- Product Creation/Update: The connector likely has a scheduled action to “pull” product information from Shopee into Odoo (creating new products or updating existing ones based on a unique identifier like SKU/internal reference).
- Inventory Synchronization: There’s usually a separate scheduled action to synchronize inventory levels between Odoo and Shopee.
- Order Synchronization: Orders placed on Shopee are typically pulled into Odoo as sales orders.
- Manual vs. Automatic: If automatic updates aren’t happening, check the scheduled actions for the Shopee connector in Odoo (
Settings>Technical>Automation>Scheduled Actions). These actions often run periodically (e.g., every 30 or 60 minutes). - Debugging: The presenter suggests checking the code of the Shopee connector module to understand its specific triggers and synchronization logic.
7. Creating Custom Applications in Odoo
When creating custom applications in Odoo, there are two main approaches:
- Developer Mode (Quick & Dirty / SAS): Making changes directly in Odoo’s developer mode (via the UI) is quick for small tweaks or testing. This is suitable for minor customizations on Odoo’s SaaS (Software as a Service) platform.
- Custom Module Development (Professional & Reusable): For professional, reusable, and maintainable custom applications, it’s highly recommended to develop a dedicated Odoo module.
- Process: Write the code (Python, XML for views), push it to a version control system like GitHub, and then deploy it to your Odoo instance.
- Benefits: Ensures proper version control, easier updates, better maintainability, and reusability across different Odoo instances.
- Rule of Thumb (Odoo’s Internal Rule): If a customization is expected to take more than 10 hours of work, it should be developed as a separate module rather than being done directly in developer mode.
Discover more from teguhteja.id
Subscribe to get the latest posts sent to your email.

