compatibility-issues-while-installing-multiple-modules-odoo.png
Blogger_636894212542259474.png
By: Nimisha Muralidhar

Compatibility Issues While Installing Multiple Modules in Odoo

Technical

Odoo provides base modules for almost all business, but customizing according to client needs is an important part while implementing odoo in a business. If we have third party modules which perfectly meet our needs! Wow, We would definitely go for that rather than investing in outsourcing, right?

Here comes the question, What happens when multiple third party modules are installed to our system? 

When buying different custom modules from different suppliers there is a chance for compatibility issues. Compatibility issues are that working of one module may conflict with the working of other modules. It can also happen in the case of custom modules from the same party. The reason is that all the custom modules are developed by different authors. Each one creates custom modules based on the default odoo functionality. So multiple custom modules for similar functionality may conflict with each other. 

Lets now move on to the issues faced when installing multiple third party modules:

1. Overriding same function in different modules
For similar custom modules of similar functionality, there is a chance to override the same function in different custom modules.

Let's take an example:
In a custom_module, the function is overridden to continue selling only from the session opened today. 

class SessionResume(models.Model):
   _inherit = 'pos.config'
 
   @api.multi
   def open_ui(self):
       result = super(SessionResume, self).open_ui()
       today = date.today()
       config_id = self.id
       session = self.env['pos.session'].search([])
       for data in session:
           if data.config_id.id == config_id:
               start_date = dateutil.parser.parse(data.start_at).date()
               if today == start_date:
                   self.ensure_one()
                   return result
               else:
                   raise UserError("You can't continue selling in that session, "
                                   "you have to close this session and open a new one !")
 
In another custom_module same function is overridden  to open a wizard for cashier login:

class PosCashierLogin(models.Model):
   _inherit = 'pos.config'
   login_user = fields.Char('Login user')
   @api.multi
   def open_ui(self):
       super(PosCashierLogin, self).open_ui()
       return {
           'name': 'POS Cashier Login',
           'type': 'ir.actions.act_window',
           'res_model': 'login.wizard',
           'view_mode': 'form',
           'view_type': 'form',
           'target': 'new'
       }

When we try to install both modules in a single database, it throws the error. Since we overrode the same function for different functionality.

2. Replacement of the same template
When a template is replaced in a custom module and if the same template is referred to in another custom module.

3. Replacement of the same menu 
If a menu is replaced in a module and the functionality of another custom module works with that menu. It throws an error.

4. The same model name for custom modules
The Model name is something that we give, according to the functionality of that model. If similar functionality is there in different custom modules? 
There is a chance to give the same model name.

5. Replacement of view elements 
If a field is replaced in a custom module and if it is referred to in another custom module. It returns an error. Similarly, it can happen with a page, group, notebook, etc.

Let us take an example: In the case of views, if a third party module is created to represent the modules with a customized list view. They would have customized in such a way that it supports the odoo base modules. And it may not support the view in other third-party modules, which may result in breaking the view of the custom module.

These are some of the issues that can happen when multiple third party modules are installed in a system.

Solution?
Customizing modules according to your needs is always better. If multiple third-party modules are necessary. Complete testing of third party modules is required. Both the unit and integration testing is compulsory. Or else it may later affect the functioning of other modules. All these steps require its own time, it varies from module to module. So nothing can be done in a hurry.
 



cybrosys youtube

Comments

0


Leave a comment

 
Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

London

Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message