How-to-get-rid-of-the-error.jpg
Blogger_636313953512117529.jpg
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 ???

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




Comments

8

investment

31/05/2017 - 11:11PM

An interesting discussion is worth comment. I do think that you need to publish more on this topic, it might not be a taboo subject but typically people do not talk about these issues. To the next! All the best!!


career

31/05/2017 - 6:46AM

Hello, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam remarks? If so how do you reduce it, any plugin or anything you can suggest? I get so much lately it's driving me crazy so any help is very much appreciated.


job postings sites

29/05/2017 - 2:50PM

each time i used to read smaller articles or reviews which also clear their motive, and that is also happening with this article which I am reading now.


abc

20/09/2017 - 3:35AM

Any ideas to solve this problem in odoo 10?


health plan

01/06/2017 - 6:17PM

Great post however , I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Cheers!


importance of education

01/06/2017 - 3:02PM

Attractive portion of content. I just stumbled upon your site and in accession capital to claim that I get in fact enjoyed account your weblog posts. Anyway I'll be subscribing to your augment and even I success you get admission to constantly rapidly.


help starting a small business

01/06/2017 - 8:29AM

Hola! I've been reading your website for a long time now and finally got the bravery to go ahead and give you a shout out from Dallas Tx! Just wanted to mention keep up the good job!


video camera

01/06/2017 - 12:55AM

I have read so many articles or reviews regarding the blogger lovers but this piece of writing is genuinely a fastidious article, keep it up.




Leave a comment