Odoo Help

0

0
4 Semua Jawaban
1
Avatar

Hilar AK Switzerland

--Hilar AK--
15891
| 7 6 11
Switzerland
--Hilar AK--
Experienced Odoo / Python Developer with a demonstrated history of working in the information technology and services industry with 3.5+years of experience. Skilled in Python, PostgreSQL, SQL, HTML, JavaScript. Strong engineering professional with a Bachelor of Technology (BTech) focused on Computer Science from the College of Engineering Munnar.

 Blogs:-

https://medium.com/@hilarak
        https://hilarlive.wordpress.com/
 StackOverflow:
       https://stackoverflow.com/users/7561347/burmese-pythis-hilar-ak

Quora:
    

            https://www.quora.com/profile/Hilar-Ak-1

Github:


https://github.com/hilarak



Hilar AK Switzerland
27/09/18 02.55

you should delete the records from mail_followers.

eg:

delete from mail_followers where res_model in ('hr.attendance.status', 'hr_timesheet_sheet.sheet')

update the code with your concerned model. This is a limitation of the mail_followers model.

0

Hi, you can use this code:

class Followers(models.Model):
_inherit = 'mail.followers'

@api.model
def create(self, vals):
if 'res_model' in vals and 'res_id' in vals and 'partner_id' in vals:
dups = self.env['mail.followers'].search([('res_model', '=',vals.get('res_model')),
('res_id', '=', vals.get('res_id')),
('partner_id', '=', vals.get('partner_id'))])
if len(dups):
for p in dups:
p.unlink()
res = super(Followers, self).create(vals)
return res
0
Avatar

Niyas Raphy India

--Niyas Raphy--
26373
| 7 7 11
Wayanad, Kerala, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123
Whatsapp : +917736136763
Happy to help :)

Niyas Raphy India
18/08/17 11.27
0
Othmane Ghandi Morocco
18/08/17 11.31

I already see it, I want a general solution for all the models

Mengajukan pertanyaan
Writer
Keep Informed
1 Follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now