By: Jesni

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

Do you need our help ???

Have you ever faced the following Odoo Warning ???


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  =


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

followers_ids =, uid, [('res_model', 'in', ['job.card'])]) ids =,

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

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

if == '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 =, 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 == '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