How to get rid of the error A Partner Cannot Follow Twice The Same Object

Posted by Cybrosys Technologies 10/05/2017

http/blog/Uploads/BlogImage/How-to-get-rid-of-the-error.jpg


Do you need our help ???

Have you ever faced the following Odoo Warning ???

http/blog/Uploads/BlogImage/How-to-get-rid-of-the-error-1.png

Do you want to fix it?

Don't worry we are here for you...


Follow these instructions:


class Uninstall(models.Model):


   _inherit = 'base.module.upgrade'

 

   def upgrade_module(self, cr, uid, ids, context=None):


res = super(UnInstall, self).upgrade_module(cr, uid, ids, context=context) ir_module  =



self.pool.get('ir.module.module')



followers  = self.pool.get('mail.followers')



followers_ids = followers.search(cr, uid, [('res_model', 'in', ['job.card'])]) ids = ir_module.search(cr,



uid, [('state', 'in', ['to remove'])])



for j in ir_module.browse(cr, uid, ids):



if j.name == 'vehicle_sales':



    for i in followers.browse(cr, uid, followers_ids): i.unlink()


return res

 

This code helps all the developers to fix the error. You can solve this Odoo warning by following this code. You can edit few lines which are mentioned below.

•followers_ids = followers.search(cr, uid, [('res_model', 'in', ['job.card'])])?   

Here you can fill your table information in which table you face this issue instead  of  “job.card”


if j.name == 'vehicle_sales':

Here you can fill your custom module in which module you face this issue instead of “vehicle_sale”.




Leave a comment

0 Comment

 

Recent posts

 POS Loyality Program

POS Loyality Program

In Odoo POS loyality helps to encourage our customer via giving points and gifts for their sale.We c .....


 ODOO MODULE - BEAUTY SPA MANAGEMENT

ODOO MODULE - BEAUTY SPA

This Spa management system developed by Cybrosys Techno Solutions helps your customers to do the onl .....


 Odoo multicompany

Odoo multicompany

Odoo perfectly meets the needs of multinational companies. Odoo is an outstanding solution to help .....


 WHAT IS THE USE OF USE STRICT IN JAVASCRIPT

WHAT IS THE USE OF USE STRICT ...

The usage of "use strict" in JavaScript indicates that the code should be executed in strict mode.St .....


 Odoo 10 Accounting Enterprise features Overview

Odoo 10 Accounting Enterprise ...

This document contains the main features of accounting module of Odoo 10 enterprise version compared .....