Enable Dark Mode!
How-to-get-rid-of-the-error.jpg
By: Jesni

Rectify The Error “a Partner Cannot Follow Twice The Same Object” in Odoo

Technical

Do you need our help?

Have you ever faced the following Odoo Warning?

How-to-get-rid-of-the-error-cybrosys

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
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 in 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”.


If you need any assistance in odoo, we are online, please chat with us.



10
Comments



Leave a comment



whatsapp_icon
location

Calicut

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

location

Kochi

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

location

Bangalore

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

Send Us A Message