We try to avoid Odoo customizations, but when there is no other way, we apply an approach that helps to get rid of possible issues in future – when you grow or upgrade your Odoo.
Below we explain basic principles that should be applied to Odoo adjustments as an example of a very small task.
Table of contents
1. Business requirement
The customer wanted to add new features to the Odoo CRM module to make it more user-friendly.
The main problem was that when marking an opportunity as ‘Lost’ at the same time archiving took place. There was a need from the sales department to separate the ‘Mark Lost’ and ‘Archive’ processes to make it easier to manage Lost opportunities and upsell more.
At first glance, the task doesn’t seem complicated, you just need to override a few methods, add new fields and update the elements in the view. But this is a business task that needs to be handled efficiently to avoid unexpected issues in future. The first thing to do when analyzing a problem is to draw up a chain of object and method dependencies, identify control points and then select an action plan.
Firstly, a BA drew up a solution plan and discussed it with the team to identify important points. Then, a developer could do their job.
The solution was to separate the standard and user logic by changing the state of one checkbox.
Card statuses have also been converted so that mode changes do not affect stored data. New stage columns have been added for missed opportunities, allowing you to quickly mark them as ‘Lost’ by dragging a card. Filters, object visibility and reports have also been changed and configured.
During implementation we faced an issue which may have prevented the full implementation of the plan. There was a different behavior when you drag a card to the Lost stage and when you mark it as Lost. You should specify the reason. When you drag, the “onchange” method doesn’t allow you to show the wizard.
It took some time to find a solution, but as a result of everyone’s discussion, an idea emerged. It consisted of writing a JS script that extended the functionality of one method, but bypassed the limitations of the standard method in Odoo. The approach has been useful in other projects.
The last stage of implementation was to determine how best and most conveniently to use this functionality.
If the user has enabled a new mode, is it the only mode to operate in? Can it be reverted to the standard workflow without losing all saved data?
Operating in only one mode would be extremely inconvenient for the user. There is also an interesting solution here – adding a conversion process when the user changes mode.
Then testers tested the functionality against a checklist and development was delivered to the customer.
- After implementation, sales guys could increase their sales by managing even lost opportunities that were completely missed before.
- Right approach to this implementation allowed this customer migrate from Odoo v14 to v15 with no issues
- Other third party Odoo addons works with no conflicts with our customization
P.S. We described this case based on a very small Odoo customization to show one of our principles of implementation, but we don’t take ad-hoc tasks and small adjustments requests. We usually take care of the whole Odoo project.
If you are interested, please fill in this short form – https://ventor.tech/estimate-request-form/